/* ========== Chatbot Styles ========== */

.chatbot-trigger {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    font-size: 1.5rem;
    color: var(--white);
    z-index: 999;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.chatbot-trigger.show {
    opacity: 1;
    transform: scale(1);
    animation: pulse 2s infinite;
}

.chatbot-trigger:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: var(--shadow-lg), 0 0 0 0 rgba(0, 102, 255, 0.7);
    }
    50% {
        box-shadow: var(--shadow-lg), 0 0 0 10px rgba(0, 102, 255, 0);
    }
}

.chatbot-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 550px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    z-index: 998;
    opacity: 0;
    transform: scale(0) translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

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

.chatbot-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.chatbot-title i {
    font-size: 1.3rem;
}

.chatbot-close {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

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

.chatbot-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color) transparent;
}

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

.chatbot-body::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-body::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 3px;
}

.chatbot-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chatbot-welcome,
.chatbot-subtitle {
    font-size: 0.95rem;
    color: var(--dark);
    margin: 0;
    font-weight: 600;
}

.chatbot-welcome {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.chatbot-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.chatbot-option-btn {
    background: var(--light);
    border: 2px solid transparent;
    padding: 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
    color: var(--dark);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
}

.chatbot-option-btn:hover {
    background: var(--gray-light);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.chatbot-option-btn:active {
    background: var(--secondary-color);
    color: var(--white);
}

.option-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.option-text {
    flex: 1;
}

.question-btn i {
    color: var(--primary-color);
}

.chatbot-answer {
    background: var(--light);
    padding: 1rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.answer-question {
    font-size: 0.95rem;
    color: var(--dark);
    margin: 0 0 0.8rem 0;
    line-height: 1.5;
}

.answer-text {
    font-size: 0.9rem;
    color: var(--gray-dark);
    margin: 0;
    line-height: 1.6;
    white-space: pre-wrap;
}

.chatbot-answer.thank-you {
    text-align: center;
    border: none;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.1) 0%, rgba(0, 212, 255, 0.1) 100%);
}

.chatbot-answer.thank-you .answer-question {
    color: var(--primary-color);
}

.chatbot-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.helpful-btn {
    flex: 1;
    padding: 0.7rem !important;
    font-size: 0.85rem !important;
    background: var(--gray-light) !important;
}

.helpful-btn:hover {
    background: var(--primary-color) !important;
    color: var(--white) !important;
}

.chatbot-footer {
    padding: 1rem;
    border-top: 1px solid var(--gray-light);
    background: var(--white);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    min-height: 50px;
    display: flex;
}

.chatbot-back {
    background: var(--light);
    border: 1px solid var(--gray-light);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--dark);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chatbot-back:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-widget {
        width: calc(100% - 40px);
        height: 70vh;
        max-height: 600px;
        bottom: 80px;
        right: 20px;
        left: 20px;
    }

    .chatbot-trigger {
        bottom: 75px;
        right: 15px;
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }

    .chatbot-header {
        padding: 1rem 1.2rem;
    }

    .chatbot-title {
        font-size: 1rem;
    }

    .chatbot-body {
        padding: 1rem;
    }

    .chatbot-option-btn {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .option-icon {
        font-size: 1.2rem;
    }
}

@media (max-width: 360px) {
    .chatbot-widget {
        width: calc(100% - 30px);
        height: 65vh;
        bottom: 75px;
        right: 15px;
        left: 15px;
    }

    .chatbot-trigger {
        width: 50px;
        height: 50px;
        bottom: 70px;
        right: 10px;
    }

    .chatbot-option-btn {
        padding: 0.7rem;
        font-size: 0.85rem;
    }
}
