/* ==========================================================================
   QMAKS CHATBOT STYLES
   ========================================================================== */

/* Chatbot Button */
.chatbot-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #D4AF37 0%, #F4E4A6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    z-index: 9998;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.chatbot-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.6);
}

.chatbot-trigger i {
    width: 28px;
    height: 28px;
    color: #0A192F;
}

@keyframes pulse {
    0% {
        box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    }
    50% {
        box-shadow: 0 8px 35px rgba(212, 175, 55, 0.7);
    }
    100% {
        box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    }
}

/* Notification Badge */
.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF4444;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    border: 2px solid white;
}

/* Chatbot Window */
.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chatbot-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, #0A192F 0%, #162d4a 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #D4AF37 0%, #F4E4A6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-avatar i {
    width: 24px;
    height: 24px;
    color: #0A192F;
}

.chatbot-header-info h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.chatbot-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #D4AF37;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.chatbot-close svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Chatbot Body */
.chatbot-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #F8F9FA;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chatbot-body::-webkit-scrollbar {
    width: 6px;
}

.chatbot-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chatbot-body::-webkit-scrollbar-thumb {
    background: #D4AF37;
    border-radius: 3px;
}

/* Initial Actions */
.chatbot-initial-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.chat-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: white;
    border: 2px solid #E5E5E5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    color: #0A192F;
}

.chat-action-btn:hover {
    border-color: #D4AF37;
    background: #FFF9E6;
    transform: translateX(5px);
}

.chat-action-btn i {
    width: 20px;
    height: 20px;
    color: #D4AF37;
}

.chat-action-btn.call i {
    color: #4CAF50;
}

.chat-action-btn.whatsapp i {
    color: #25D366;
}

.chat-action-btn.chat i {
    color: #2196F3;
}

/* Chat Messages */
.chat-message {
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.bot {
    flex-direction: row;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D4AF37 0%, #F4E4A6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-avatar i {
    width: 18px;
    height: 18px;
    color: #0A192F;
}

.chat-message.user .message-avatar {
    background: #0A192F;
}

.chat-message.user .message-avatar i {
    color: #D4AF37;
}

.message-content {
    max-width: 70%;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.chat-message.bot .message-bubble {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
}

.chat-message.user .message-bubble {
    background: linear-gradient(135deg, #D4AF37 0%, #F4E4A6 100%);
    color: #0A192F;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 0.75rem;
    color: #999;
    margin-top: 5px;
    padding: 0 5px;
}

/* Chat Options */
.chat-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.chat-option-btn {
    padding: 12px 16px;
    background: white;
    border: 2px solid #E5E5E5;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: #0A192F;
    text-align: left;
    font-weight: 500;
}

.chat-option-btn:hover {
    border-color: #D4AF37;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(244, 228, 166, 0.1) 100%);
    transform: translateX(5px);
}

/* Chat Input */
.chatbot-input {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #E5E5E5;
}

.input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input-field {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #E5E5E5;
    border-radius: 25px;
    font-size: 0.95rem;
    color: #0A192F;
    transition: all 0.3s ease;
}

.chat-input-field:focus {
    outline: none;
    border-color: #D4AF37;
    background: #FFF9E6;
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #D4AF37 0%, #F4E4A6 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-send-btn i {
    width: 18px;
    height: 18px;
    color: #0A192F;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 10px;
    align-items: center;
}

.typing-dots {
    display: flex;
    gap: 5px;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #D4AF37;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Welcome Screen */
.chatbot-welcome {
    text-align: center;
    padding: 20px;
}

.welcome-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #D4AF37 0%, #F4E4A6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.welcome-icon i {
    width: 40px;
    height: 40px;
    color: #0A192F;
}

.chatbot-welcome h3 {
    color: #0A192F;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.chatbot-welcome p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 30px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.success-icon i {
    width: 40px;
    height: 40px;
    color: white;
}

.success-message h3 {
    color: #0A192F;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.success-message p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.close-chat-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #D4AF37 0%, #F4E4A6 100%);
    color: #0A192F;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

/* Responsive */
@media (max-width: 767.98px) {
    .chatbot-window {
        width: calc(100% - 20px);
        height: calc(100vh - 120px);
        right: 10px;
        bottom: 90px;
    }

    .chatbot-trigger {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }

    .chatbot-trigger i {
        width: 24px;
        height: 24px;
    }
}

/* Hidden Class */
.hidden {
    display: none !important;
}
