/* ===================================
   Burhani Herbals - Chatbot Styles
   ====================================*/

.chatbot-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 550px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateY(calc(100% + 90px));
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
}

.chatbot-container.chatbot-open {
    transform: translateY(0);
    opacity: 1;
}

.chatbot-header {
    background: linear-gradient(135deg, var(--herbal-green), var(--herbal-green-light));
    color: white;
    padding: 1.25rem;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.chatbot-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

.chatbot-title {
    font-weight: 600;
    font-size: 1.125rem;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--soft-beige);
}

.chatbot-message {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.chatbot-message-user {
    align-items: flex-end;
}

.chatbot-message-bot {
    align-items: flex-start;
}

.message-bubble {
    max-width: 75%;
    padding: 0.875rem 1.125rem;
    border-radius: 16px;
    line-height: 1.6;
    word-wrap: break-word;
}

.chatbot-message-user .message-bubble {
    background: var(--herbal-green);
    color: white;
    border-bottom-right-radius: 4px;
}

.chatbot-message-bot .message-bubble {
    background: white;
    color: var(--text-dark);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    padding: 0 0.5rem;
}

.chatbot-input-area {
    display: flex;
    padding: 1rem;
    background: white;
    border-top: 1px solid var(--soft-beige);
    gap: 0.5rem;
}

.chatbot-input-area input {
    flex: 1;
    border: 2px solid var(--soft-beige);
    border-radius: 24px;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input-area input:focus {
    border-color: var(--herbal-green);
}

.chatbot-send-btn {
    background: var(--herbal-green);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.2s;
}

.chatbot-send-btn:hover {
    background: var(--herbal-green-dark);
    transform: scale(1.05);
}

.chatbot-quick-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0 1rem 1rem 1rem;
    background: white;
    border-radius: 0 0 16px 16px;
    flex-wrap: wrap;
}

.quick-action-btn {
    flex: 1;
    min-width: 80px;
    padding: 0.5rem 0.75rem;
    background: var(--soft-beige);
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.quick-action-btn:hover {
    background: var(--herbal-green);
    color: white;
    transform: translateY(-2px);
}

.chatbot-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    height: 56px;
    background: linear-gradient(135deg, var(--warm-saffron), var(--saffron-dark));
    border: none;
    border-radius: 28px;
    box-shadow: 0 4px 20px rgba(255, 140, 66, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.75rem;
    gap: 12px;
    z-index: 9998;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: white;
    font-family: var(--font-body);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chatbot-toggle-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 140, 66, 0.5);
    background: linear-gradient(135deg, var(--saffron-dark), var(--warm-saffron));
    animation: none;
}

.chatbot-toggle-btn {
    animation: faq-pulse 3s infinite;
}

@keyframes faq-pulse {
    0% {
        box-shadow: 0 4px 20px rgba(255, 140, 66, 0.4);
    }

    50% {
        box-shadow: 0 4px 25px rgba(255, 140, 66, 0.7);
    }

    100% {
        box-shadow: 0 4px 20px rgba(255, 140, 66, 0.4);
    }
}

.chatbot-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px;
    border-radius: 50%;
}

.chatbot-toggle-label {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1;
}

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #25D366;
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.3);
    z-index: 9998;
    text-decoration: none;
    transition: all 0.3s;
}

.whatsapp-float:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 32px rgba(37, 211, 102, 0.4);
    color: white;
}

.chatbot-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--error);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Dark mode styles */
[data-theme="dark"] .chatbot-container,
[data-theme="dark"] .chatbot-input-area,
[data-theme="dark"] .chatbot-quick-actions {
    background: #2a2520;
}

[data-theme="dark"] .chatbot-messages {
    background: #1a1410;
}

[data-theme="dark"] .chatbot-message-bot .message-bubble {
    background: #3a342e;
    color: #f5f1e8;
}

[data-theme="dark"] .chatbot-input-area input {
    background: #3a342e;
    border-color: #4a4540;
    color: #f5f1e8;
}

[data-theme="dark"] .quick-action-btn {
    background: #3a342e;
    color: #f5f1e8;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .chatbot-container {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        max-width: 100vw;
        border-radius: 0;
        transform: translateY(100%);
    }

    .chatbot-container.chatbot-open {
        transform: translateY(0);
    }

    .chatbot-toggle-btn {
        right: 20px;
        left: auto;
        bottom: 20px;
        width: 56px;
        height: 56px;
        padding: 0;
        border-radius: 50%;
    }

    .chatbot-toggle-label {
        display: none;
    }

    .chatbot-toggle-icon {
        background: transparent;
        padding: 0;
    }
}