/* ============================================================
   Chatbot Widget Styles - Clean & Modern
   ============================================================ */

.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Chatbot Widget Button */
.chatbot-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

    .chatbot-toggle-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    }

    .chatbot-toggle-btn.active {
        background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    }

.chatbot-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Chatbot Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 400px;
    height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
}

    .chatbot-window.active {
        opacity: 1;
        transform: scale(1) translateY(0);
        pointer-events: auto;
    }

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chatbot-header-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.chatbot-header-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin: 4px 0 0 0;
}

.chatbot-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .chatbot-close-btn:hover {
        transform: rotate(90deg);
    }

/* Chatbot Body */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
}

    .chatbot-messages::-webkit-scrollbar {
        width: 6px;
    }

    .chatbot-messages::-webkit-scrollbar-track {
        background: #e2e8f0;
        border-radius: 3px;
    }

    .chatbot-messages::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }

        .chatbot-messages::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

.chatbot-message {
    display: flex;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.chatbot-message.bot {
    justify-content: flex-start;
}

.chatbot-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    border: none;
    padding: 0;
}

.chatbot-message.user .chatbot-message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.chatbot-message.bot .chatbot-message-avatar {
    background: #e2e8f0;
    color: #667eea;
}

.chatbot-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 14px;
}

.chatbot-message.user .chatbot-message-content {
    background: #667eea;
    color: white;
    border-radius: 12px 4px 12px 12px;
}

.chatbot-message.bot .chatbot-message-content {
    background: white;
    color: #1e293b;
    border-radius: 4px 12px 12px 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

    .chatbot-message.bot .chatbot-message-content a {
        color: #667eea;
        text-decoration: none;
        font-weight: 500;
    }

        .chatbot-message.bot .chatbot-message-content a:hover {
            text-decoration: underline;
        }

.chatbot-typing {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: white;
    border-radius: 4px 12px 12px 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

    .chatbot-typing span {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #667eea;
        animation: bounce 1.4s infinite;
    }

        .chatbot-typing span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .chatbot-typing span:nth-child(3) {
            animation-delay: 0.4s;
        }

@keyframes bounce {
    0%, 80%, 100% {
        opacity: 0.5;
        transform: translateY(0);
    }

    40% {
        opacity: 1;
        transform: translateY(-10px);
    }
}

/* Quick Replies */
.chatbot-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.chatbot-quick-reply {
    padding: 8px 12px;
    background: #e2e8f0;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
}

    .chatbot-quick-reply:hover {
        background: #cbd5e1;
        border-color: #94a3b8;
        transform: translateY(-2px);
    }

    .chatbot-quick-reply i {
        font-size: 14px;
    }

/* Chatbot Input */
.chatbot-input-area {
    padding: 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.chatbot-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 20px;
    padding: 0 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

    .chatbot-input-wrapper:focus-within {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

.chatbot-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    color: #1e293b;
    padding: 10px 0;
    font-family: inherit;
}

    .chatbot-input::placeholder {
        color: #94a3b8;
    }

.chatbot-send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
    flex-shrink: 0;
}

    .chatbot-send-btn:hover:not(:disabled) {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }

    .chatbot-send-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
        max-width: 100%;
    }

    .chatbot-container {
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
    }

    .chatbot-message-content {
        max-width: 85%;
    }

    .chatbot-toggle-btn {
        width: 56px;
        height: 56px;
        font-size: 20px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .chatbot-window {
        background: #1e293b;
    }

    .chatbot-messages {
        background: #0f172a;
    }

    .chatbot-input-area {
        background: #1e293b;
        border-top-color: #334155;
    }

    .chatbot-message.bot .chatbot-message-content {
        background: #334155;
        color: #e2e8f0;
        border-color: #475569;
    }

    .chatbot-input-wrapper {
        background: #334155;
        border-color: #475569;
    }

    .chatbot-input {
        color: #e2e8f0;
    }

        .chatbot-input::placeholder {
            color: #64748b;
        }

    .chatbot-quick-reply {
        background: #334155;
        color: #e2e8f0;
        border-color: #475569;
    }

        .chatbot-quick-reply:hover {
            background: #475569;
            border-color: #64748b;
        }

    .chatbot-typing {
        background: #334155;
        border-color: #475569;
    }
}

/* Print Styles */
@media print {
    .chatbot-container {
        display: none;
    }
}
