/* Chatbot Styles */

/* WhatsApp Button */
.whatsapp-button {
    position: fixed;
    bottom: 2rem;
    right: 8rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 9997;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-button:hover {
    background: #20BA5A;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.chatbot-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.chatbot-toggle:hover {
    background: #b91c1c;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.6);
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.chatbot-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 380px;
    height: 600px;
    max-height: 80vh;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateY(100%) scale(0.8);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.chatbot-container.chatbot-open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

.chatbot-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 1rem 1rem 0 0;
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.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: 1.5rem;
}

.chatbot-info h3 {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}

.chatbot-status {
    font-size: 0.85rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chatbot-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-light);
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    flex-direction: row-reverse;
}

.bot-message {
    flex-direction: row;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.user-message .message-avatar {
    background: var(--accent-color);
    color: white;
}

.message-content {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    line-height: 1.5;
}

.bot-message .message-content {
    background: white;
    color: var(--text-dark);
    border-bottom-left-radius: 0.25rem;
    box-shadow: var(--shadow);
}

.user-message .message-content {
    background: var(--accent-color);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.message-content p {
    margin: 0;
    font-size: 0.95rem;
}

.chatbot-suggestions {
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: white;
    border-top: 1px solid var(--border-color);
}

.suggestion-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-dark);
    font-weight: 500;
}

.suggestion-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.chatbot-input-container {
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid var(--border-color);
}

.chatbot-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 2rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.chatbot-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.chatbot-send {
    width: 45px;
    height: 45px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.chatbot-send:hover {
    background: #b91c1c;
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .chatbot-container {
        width: calc(100% - 2rem);
        height: calc(100vh - 2rem);
        max-height: calc(100vh - 2rem);
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .chatbot-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 55px;
        height: 55px;
    }

    .whatsapp-button {
        bottom: 1rem;
        right: 5rem;
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .chatbot-container {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        bottom: 0;
        right: 0;
        left: 0;
        border-radius: 0;
    }

    .chatbot-header {
        border-radius: 0;
    }

    .whatsapp-button {
        bottom: 1rem;
        right: 4.5rem;
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }

    .chatbot-toggle {
        width: 50px;
        height: 50px;
    }
}

