/* ============ CHATBOT STYLES ============ */

.chatbot-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.4s ease;
    font-family: 'Yantramanav', sans-serif;
    border: 2px solid #e01751;
    display: none;
}

.chatbot-widget.active {
    transform: translateY(0);
    opacity: 1;
}

.chatbot-header {
    background: linear-gradient(135deg, #e01751, #db1850);
    color: #fff;
    padding: 15px 20px;
    border-radius: 18px 18px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header .bot-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-header .bot-avatar {
    width: 35px;
    height: 35px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e01751;
    font-size: 18px;
}

.chatbot-header .bot-name {
    font-weight: 600;
    font-size: 16px;
}

.chatbot-header .bot-status {
    font-size: 12px;
    opacity: 0.9;
}

.chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.2s;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-body {
    padding: 20px;
    max-height: 350px;
    overflow-y: auto;
    background: #fafafa;
}

.chatbot-body::-webkit-scrollbar {
    width: 6px;
}

.chatbot-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chatbot-body::-webkit-scrollbar-thumb {
    background: #e01751;
    border-radius: 3px;
}

.chatbot-body::-webkit-scrollbar-thumb:hover {
    background: #c71547;
}

.chatbot-message {
    margin-bottom: 15px;
    animation: fadeInUp 0.3s ease;
}

.chatbot-message.bot {
    text-align: left;
}

.chatbot-message.user {
    text-align: right;
}

.message-bubble {
    display: inline-block;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
}

.chatbot-message.bot .message-bubble {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #333;
    border-bottom-left-radius: 6px;
    border: 1px solid #dee2e6;
}

.chatbot-message.user .message-bubble {
    background: linear-gradient(135deg, #e01751, #db1850);
    color: #fff;
    border-bottom-right-radius: 6px;
    box-shadow: 0 2px 8px rgba(224, 23, 81, 0.3);
}

.question-options {
    margin-top: 16px;
    animation: fadeInUp 0.4s ease;
}

.question-options .question-btn:nth-child(1) { animation-delay: 0.1s; }
.question-options .question-btn:nth-child(2) { animation-delay: 0.2s; }
.question-options .question-btn:nth-child(3) { animation-delay: 0.3s; }
.question-options .question-btn:nth-child(4) { animation-delay: 0.4s; }
.question-options .question-btn:nth-child(5) { animation-delay: 0.5s; }
.question-options .question-btn:nth-child(6) { animation-delay: 0.6s; }

.question-category {
    margin-bottom: 15px;
}

.category-title {
    font-weight: 600;
    color: #e01751;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-left: 10px;
    border-left: 3px solid #e01751;
}

.question-btn {
    display: block;
    width: 100%;
    background: #fff;
    border: 2px solid #e9ecef;
    color: #333;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    font-family: inherit;
    line-height: 1.4;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.3s ease both;
}

.question-btn:hover {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-color: #e01751;
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(224, 23, 81, 0.15);
}

.question-btn:active {
    transform: translateX(8px) scale(0.98);
}

.question-btn:focus {
    outline: none;
    border-color: #e01751;
    box-shadow: 0 0 0 3px rgba(224, 23, 81, 0.1);
}

.back-btn {
    background: #6c757d !important;
    color: #fff !important;
    border-color: #6c757d !important;
}

.back-btn:hover {
    background: #5a6268 !important;
    border-color: #5a6268 !important;
}

.whatsapp-redirect {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    text-align: center;
}

.whatsapp-redirect p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 13px;
}

.whatsapp-btn {
    background: #25d366;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.whatsapp-btn:hover {
    background: #22bf5a;
    transform: translateY(-2px);
}

.chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 90px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e01751, #db1850);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 9998;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(224, 23, 81, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(224, 23, 81, 0.4);
}

.chatbot-toggle:active {
    transform: scale(0.95);
}

.chatbot-toggle.active {
    transform: rotate(45deg);
}

.chatbot-toggle.hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(224, 23, 81, 0.4);
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-message {
    animation: fadeInUp 0.3s ease;
}

.question-btn {
    animation: fadeInUp 0.3s ease;
}

/* Responsive */
@media (max-width: 1200px) {
    .chatbot-widget {
        width: 360px;
        max-width: 90%;
        bottom: 80px;
    }
}

@media (max-width: 1024px) {
    .chatbot-widget {
        width: 350px;
        max-width: 85%;
        bottom: 75px;
        right: 15px;
    }
    
    .chatbot-toggle {
        bottom: 20px;
        right: 85px;
    }
}

@media (max-width: 768px) {
    .chatbot-widget {
        width: 95%;
        max-width: 380px;
        right: 2.5%;
        left: 2.5%;
        bottom: 90px;
        max-height: 450px;
    }
    
    .chatbot-toggle {
        width: 55px;
        height: 55px;
        font-size: 22px;
        bottom: 20px;
        right: 80px;
    }
    
    .chatbot-body {
        max-height: 300px;
        padding: 15px;
    }
    
    .chatbot-header {
        padding: 12px 15px;
    }
    
    .chatbot-header .bot-name {
        font-size: 15px;
    }
    
    .chatbot-header .bot-status {
        font-size: 12px;
    }
    
    .question-btn {
        padding: 12px 15px;
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .message-bubble {
        font-size: 13px;
        padding: 10px 14px;
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    .chatbot-widget {
        width: 98%;
        right: 1%;
        left: 1%;
        bottom: 85px;
        max-height: 400px;
        border-radius: 15px;
    }
    
    .chatbot-toggle {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 20px;
        right: 70px;
    }
    
    .chatbot-body {
        max-height: 250px;
        padding: 12px;
    }
    
    .chatbot-header {
        padding: 10px 12px;
        border-radius: 13px 13px 0 0;
    }
    
    .chatbot-header .bot-name {
        font-size: 14px;
    }
    
    .chatbot-header .bot-status {
        font-size: 11px;
    }
    
    .chatbot-header .bot-avatar {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .question-btn {
        padding: 10px 12px;
        font-size: 13px;
        margin-bottom: 8px;
        border-radius: 10px;
    }
    
    .message-bubble {
        font-size: 12px;
        padding: 8px 12px;
        max-width: 90%;
        line-height: 1.3;
    }
    
    .whatsapp-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .question-options {
        margin-top: 12px;
    }
}

@media (max-width: 360px) {
    .chatbot-widget {
        width: 99%;
        right: 0.5%;
        left: 0.5%;
        bottom: 80px;
        max-height: 350px;
    }
    
    .chatbot-toggle {
        width: 45px;
        height: 45px;
        font-size: 18px;
        bottom: 20px;
        right: 60px;
    }
    
    .chatbot-body {
        max-height: 220px;
        padding: 10px;
    }
    
    .chatbot-header {
        padding: 8px 10px;
    }
    
    .chatbot-header .bot-name {
        font-size: 13px;
    }
    
    .chatbot-header .bot-status {
        font-size: 10px;
    }
    
    .chatbot-header .bot-avatar {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .question-btn {
        padding: 8px 10px;
        font-size: 12px;
        margin-bottom: 6px;
        border-radius: 8px;
    }
    
    .message-bubble {
        font-size: 11px;
        padding: 6px 10px;
        max-width: 92%;
    }
    
    .whatsapp-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .question-options {
        margin-top: 10px;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .chatbot-widget {
        max-height: 300px;
        bottom: 70px;
    }
    
    .chatbot-body {
        max-height: 180px;
    }
    
    .chatbot-toggle {
        bottom: 15px;
    }
}