/* ===========================
   CHATBOT STYLES
   =========================== */

.chatbot-toggle {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0077be 0%, #00c9ff 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 119, 190, 0.4);
    z-index: 998;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 119, 190, 0.6);
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.chatbot-container {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 998;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s ease;
}

.chatbot-container.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.chatbot-header {
    background: linear-gradient(135deg, #0077be 0%, #00c9ff 100%);
    color: white;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chatbot-header-text h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chatbot-status {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.9;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.chatbot-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f5f7fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.chatbot-message {
    display: flex;
    gap: 10px;
    animation: slideInMessage 0.3s ease;
}

@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #0077be 0%, #00c9ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.message-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: 75%;
}

.message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.bot-message .message-content {
    border-bottom-left-radius: 4px;
}

.user-message {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.user-message .message-content {
    background: linear-gradient(135deg, #0077be 0%, #00c9ff 100%);
    color: white;
    border-bottom-right-radius: 4px;
    margin-left: auto;
}

.message-time {
    font-size: 11px;
    color: #94a3b8;
    padding: 0 5px;
}

.user-message .message-time {
    text-align: right;
}

.typing-indicator .typing-dots {
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    display: flex;
    gap: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

.chatbot-quick-replies {
    padding: 15px 20px;
    background: white;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid #e2e8f0;
}

.quick-reply-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-weight: 500;
}

.quick-reply-btn:hover {
    background: #0077be;
    color: white;
    border-color: #0077be;
    transform: translateY(-2px);
}

.quick-reply-btn i {
    font-size: 11px;
}

.chatbot-input-area {
    padding: 15px 20px;
    background: white;
    border-radius: 0 0 20px 20px;
    display: flex;
    gap: 10px;
    border-top: 1px solid #e2e8f0;
}

.chatbot-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.chatbot-input:focus {
    border-color: #0077be;
    box-shadow: 0 0 0 3px rgba(0, 119, 190, 0.1);
}

.chatbot-send-btn {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #0077be 0%, #00c9ff 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 119, 190, 0.3);
}

.chatbot-send-btn:active {
    transform: scale(0.95);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-toggle {
        bottom: 170px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 24px;
    }

    .chatbot-container {
        bottom: 20px;
        right: 20px;
        left: 20px;
        width: auto;
        height: 500px;
    }
}

@media (max-width: 480px) {
    .chatbot-container {
        bottom: 0;
        right: 0;
        left: 0;
        border-radius: 20px 20px 0 0;
        height: 100vh;
        max-height: 600px;
    }

    .chatbot-toggle {
        bottom: 160px;
        right: 15px;
    }

    .message-wrapper {
        max-width: 80%;
    }

    .quick-reply-btn {
        font-size: 11px;
        padding: 6px 12px;
    }
}
