/*--------------------------------------------------------------
# Chat Widget Styles
--------------------------------------------------------------*/
#ai-chat-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 9999;
    font-family: var(--default-font);
}

/* Chat megnyitó buborék */
.chat-opener {
    width: 60px;
    height: 60px;
    background-color: #7BC53F;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(123, 197, 63, 0.3);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.chat-opener:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(123, 197, 63, 0.4);
}

.chat-opener i {
    color: white;
    font-size: 24px;
}

/* Pulzáló animáció */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(123, 197, 63, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(123, 197, 63, 0.6);
    }
    100% {
        box-shadow: 0 4px 20px rgba(123, 197, 63, 0.3);
    }
}

/* Chat ablak */
.chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.chat-window.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

/* Chat fejléc */
.chat-header {
    background: linear-gradient(135deg, #7BC53F, #6AB02F);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.chat-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.chat-header .title {
    font-weight: 600;
    font-size: 16px;
    flex: 1;
}

.chat-header .close-chat {
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: background 0.2s ease;
}

.chat-header .close-chat:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Chat tartalom */
.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-track {
    background: transparent;
}

.chat-body::-webkit-scrollbar-thumb {
    background: rgba(123, 197, 63, 0.3);
    border-radius: 3px;
}

.chat-body::-webkit-scrollbar-thumb:hover {
    background: rgba(123, 197, 63, 0.5);
}

/* Üzenetek */
.message {
    display: flex;
    margin-bottom: 15px;
    animation: slideIn 0.3s ease;
}

.message.ai {
    justify-content: flex-start;
}

.message.user {
    justify-content: flex-end;
}

.message .bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message.ai .bubble {
    background: white;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom-left-radius: 6px;
}

.message.user .bubble {
    background: #7BC53F;
    color: white;
    border-bottom-right-radius: 6px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat lábléc */
.chat-footer {
    padding: 20px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-footer #chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-footer #chat-input:focus {
    border-color: #7BC53F;
}

.chat-footer #chat-send-btn {
    width: 40px;
    height: 40px;
    background: #7BC53F;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    font-size: 16px;
}

.chat-footer #chat-send-btn:hover {
    background: #6AB02F;
}

.chat-footer #chat-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Mobil reszponzivitás */
@media (max-width: 480px) {
    #ai-chat-widget {
        bottom: 15px;
        right: 15px;
    }
    
    .chat-window {
        width: 280px;
        height: 450px;
        bottom: 65px;
    }
    
    .chat-opener {
        width: 55px;
        height: 55px;
    }
    
    .chat-opener i {
        font-size: 22px;
    }
}

/* Betöltő animáció */
.chat-loading {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
}

.chat-loading .dot {
    width: 6px;
    height: 6px;
    background: #7BC53F;
    border-radius: 50%;
    animation: loading 1.4s ease-in-out infinite both;
}

.chat-loading .dot:nth-child(1) { animation-delay: -0.32s; }
.chat-loading .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes loading {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}