/* ====================== */
/* CHATBOT STYLES */
/* ====================== */

.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    max-width: 90%;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.chatbot-container.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

.chatbot-header {
    padding: 16px 20px;
    background: #3b82f6;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.chatbot-header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    opacity: 0.9;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.chatbot-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    border-radius: 50%;
}

.chatbot-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f9fafb;
}

.chatbot-message {
    display: flex;
    gap: 12px;
    max-width: 85%;
    animation: fadeIn 0.3s ease;
}

.chatbot-message.bot {
    align-self: flex-start;
}

.chatbot-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chatbot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    align-self: flex-start;
}

.chatbot-message-content {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
}

.chatbot-message.bot .chatbot-message-content {
    background: white;
    color: #1f2937;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.chatbot-message.user .chatbot-message-content {
    background: #3b82f6;
    color: white;
    border-bottom-right-radius: 4px;
}

.chatbot-message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 6px;
    display: block;
    text-align: right;
}

.chatbot-input-container {
    padding: 15px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    outline: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.chatbot-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.chatbot-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    border: none;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chatbot-send-btn:hover {
    background: #2563eb;
    transform: scale(1.05);
}

.chatbot-suggestions {
    background: white;
    border-radius: 16px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.chatbot-suggestions-header {
    padding: 14px 20px;
    background: #f9fafb;
    color: #3b82f6;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.chatbot-suggestions-header i {
    transition: transform 0.3s ease;
}

.chatbot-suggestions-header.active i {
    transform: rotate(180deg);
}

.chatbot-suggestions-content {
    padding: 10px;
    display: none;
}

.chatbot-suggestions-content.active {
    display: block;
}

.chatbot-suggestion-btn {
    display: block;
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 8px;
    background: #f9fafb;
    border: none;
    border-radius: 8px;
    text-align: left;
    font-size: 0.9rem;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chatbot-suggestion-btn:hover {
    background: #e5e7eb;
    color: #3b82f6;
    padding-left: 20px;
}

.chatbot-typing-indicator {
    display: flex;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    width: fit-content;
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.chatbot-typing-dot {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    margin: 0 3px;
    opacity: 0.4;
    animation: chatbotTyping 1s infinite ease-in-out;
}

.chatbot-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

.chatbot-icon {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 25px rgba(59, 130, 246, 0.3);
    z-index: 999;
    transition: all 0.3s ease;
}

.chatbot-icon:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.chatbot-icon i {
    color: white;
    font-size: 1.5rem;
}

.chatbot-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
    font-weight: bold;
    animation: pulse 2s infinite;
}

/* Dark Mode Support */
[data-theme="dark"] .chatbot-container {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .chatbot-messages {
    background: #0f172a;
}

[data-theme="dark"] .chatbot-message.bot .chatbot-message-content {
    background: #334155;
    color: #f8fafc;
    border-color: #475569;
}

[data-theme="dark"] .chatbot-input-container {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .chatbot-input {
    background: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}

[data-theme="dark"] .chatbot-suggestions {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .chatbot-suggestions-header {
    background: #0f172a;
    color: #60a5fa;
}

[data-theme="dark"] .chatbot-suggestion-btn {
    background: #0f172a;
    color: #94a3b8;
}

[data-theme="dark"] .chatbot-suggestion-btn:hover {
    background: #1e293b;
    color: #60a5fa;
}

[data-theme="dark"] .chatbot-typing-indicator {
    background: #334155;
    border-color: #475569;
}

[data-theme="dark"] .chatbot-typing-dot {
    background: #94a3b8;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes chatbotTyping {

    0%,
    100% {
        opacity: 0.4;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .chatbot-container {
        width: 90%;
        right: 5%;
        bottom: 80px;
    }

    .chatbot-icon {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}