/* Estilos para el chat de prueba */
#chatMessagesContainer {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    /* Asegurar espacio para el input */
    padding-bottom: 80px;
}

.message-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 20px;
    flex: 1;
}

.user-message-container, .assistant-message-container {
    max-width: 80%;
    margin-bottom: 5px;
}

.user-message-container {
    align-self: flex-end;
    margin-left: auto;
}

.assistant-message-container {
    align-self: flex-start;
    margin-right: auto;
}

.message-bubble {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
    line-height: 1.4;
}

.message-bubble p {
    margin-bottom: 0;
}

.message-bubble p:not(:last-child) {
    margin-bottom: 0px;
}

.user-message {
    background-color: #8BC34A; /* Verde claro similar a la imagen */
    color: white;
    border-top-right-radius: 4px;
}

.assistant-message {
    background-color: #e9ecef; /* Gris claro similar a la imagen */
    color: #212529;
    border-top-left-radius: 4px;
}

.message-bubble.user {
    background-color: #7AB239;
    color: #fff;
    border-bottom-right-radius: 4px;
    margin-left: auto;
    text-align: left;
}

.message-bubble.bot {
    background-color: #f0f0f0;
    color: #333;
    border-bottom-left-radius: 4px;
    margin-right: auto;
    text-align: left;
    display: flex;
    align-items: flex-start;
}

.message-time {
    font-size: 0.75rem;
    display: block;
    margin-top: 4px;
    text-align: right;
}

.user-message-container .message-time {
    color: rgba(255, 255, 255, 0.7);
}

.assistant-message-container .message-time {
    color: rgba(0, 0, 0, 0.5);
}

/* Animación para el indicador de escritura */
.typing-indicator {
    padding: 12px 16px;
    background-color: #e9ecef;
    border-radius: 18px;
    border-top-left-radius: 4px;
    display: inline-flex;
    align-items: center;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    margin: 0 2px;
    background-color: #adb5bd;
    border-radius: 50%;
    display: inline-block;
    opacity: 0.4;
}

.typing-indicator span:nth-child(1) {
    animation: typing 1s infinite;
}

.typing-indicator span:nth-child(2) {
    animation: typing 1s infinite 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation: typing 1s infinite 0.4s;
}

@keyframes typing {
    0% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 0.4;
        transform: scale(1);
    }
}

/* Botón de enviar */
#sendDemoMessage {
    height: 38px;
}

#membershipsContainer {
    /*background-color: #f8f9fa;*/
    overflow-y: auto;
    padding: 25px !important;
    max-height: 100%;
    height: 100%;
    scroll-behavior: smooth;
    position: relative;
    padding-bottom: 70px; /* Espacio para el botón de volver */
}

/* Centrado vertical y márgenes para planes */
#membershipsRow {
    display: flex;
    justify-content: center;
    align-items: stretch;
    margin: 0 auto;
    max-width: 1000px;
}

/* Estilos para las tarjetas individuales */
.membership-card {
    height: 100%;
    border: none;
    border-radius: 12px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
    overflow: hidden;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.membership-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}

.membership-card .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Header de la tarjeta */
.membership-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.membership-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Sección de precio */
.price-container {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center; /* Centra horizontalmente */
    align-items: baseline; /* Mantiene la alineación de baseline */
    flex-wrap: wrap; /* Permite que los elementos se ajusten en pantallas pequeñas */
    gap: 0.5rem; /* Espacio entre elementos */
}

.membership-price {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.price-period {
    font-size: 0.9rem;
    color: #6c757d;
    margin-left: 0.25rem;
}

.membership-time {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.membership-item {
    display: flex;
    align-items: center;
}

.membership-item i {
    color: #28a745;
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.membership-item-title {
    font-size: 0.9rem;
}

/* Separador */
.membership-divider {
    height: 1px;
    background-color: rgba(0,0,0,0.1);
    margin: 1.5rem 0;
    width: 100%;
}

/* Botón de compra */
.membership-button {
    padding: 0.75rem 1rem;
    font-weight: 600;
    width: 100%;
    border-radius: 6px;
    transition: all 0.2s;
    margin-top: auto;
}

/* Clases para diferentes tipos de membresías */
.membership-pro {
    border-top: 4px solid #88C640;
}

.membership-premium {
    border-top: 4px solid #198754;
}

.membership-free {
    border-top: 4px solid #6c757d;
}

.modal-content.memberships-mode {
    max-height: unset;
}

#demoModal.modal.show {
    padding-right: 0 !important; /* Evitar saltos laterales */
}

.modal-xl .membership-card-wrapper {
    padding: 0 10px;
}

.modal-xl .membership-items-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Botón de volver al chat */
.memberships-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    padding: 15px;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.1);
    z-index: 1030;
}

.modal-dialog-scrollable .modal-body {
    overflow-y: auto !important;
}

.payment-form-container {
    padding: 20px;
    overflow-y: auto !important;
}

.card-number-input {
    letter-spacing: 2px;
}

.membership-summary {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

#couponMessage .alert {
    padding: 8px 12px;
    margin-bottom: 0;
}

/* Estilos para los inputs de tarjeta */
#card_number, #card_expiry, #card_cvc {
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 10px;
}

/* Estilo para el botón de validar cupón */
#validateCouponBtn {
    white-space: nowrap;
}

.nav-link {
    font-weight: normal;
}

.message-item {
    background-color: transparent !important;
    border: none !important;
    padding: 5px !important;
    padding-right: 20px !important;
    padding-left: 20px !important;
}

.message-footer {
    background-color: transparent !important;
    border: none !important;
    padding: 0px !important;
    height: 5rem !important;
}

.message-item.answer-item.typing .message-bubble.bot {
    min-width: 70px; /* Ancho mínimo para la burbuja */
    padding: 10px 10px; /* Padding ajustado */
}

/* Estilos unificados para el chat */
.chat {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 400px;
    overflow: hidden;
}

.chat-content {
    flex: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 15px;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

#chatSection {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.chat-container {
    max-width: 100%;
    margin: 0 auto;
}

.chat-input {
    padding: 8px 12px;
    background-color: var(--bs-body-bg);
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.chat-input-group {
    background-color: var(--bs-body-bg);
    border-radius: 10px;
    padding: 0px;
    border: 1px solid var(--bs-border-color);
    max-width: 100%;
}

.chat-form-control {
    flex: 1;
    resize: none;
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    margin: 0 10px;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    min-height: 40px;
    max-height: 120px;
    overflow-y: auto;
    box-shadow: none;
    word-break: break-word;
    overflow-wrap: break-word;
}

.chat-form-control:focus {
    outline: none;
    box-shadow: none;
}

/* Estilos unificados para botones de micrófono y enviar */
.btn-mic, .btn-send-chat {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    background-color: transparent;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-mic:hover, .btn-send-chat:hover {
    background-color: #f0f0f0;
}

.btn-mic.recording {
    background-color: #dc3545;
}

.btn-mic.recording i {
    color: white !important;
}

.btn-send-chat i {
    color: #88C640;
    font-size: 20px;
}

/* Estilos unificados para los puntos de escribiendo */
.typing-dots {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 24px;
    padding-left: 10px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.typing-dots .dot {
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background-color: #88C640;
    border-radius: 50%;
    animation: typing-animation 1.4s infinite;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
}

.typing-dots .dot:first-child {
    margin-left: 0;
}

.typing-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-animation {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* Estilos para la barra de desplazamiento */
.chat-content::-webkit-scrollbar {
    width: 8px;
}

.chat-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chat-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.chat-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Media queries */
@media (min-width: 992px) {
    #membershipsRow {
        display: flex;
        flex-wrap: wrap;
    }
    
    .membership-card-wrapper {
        flex: 0 0 auto;
        width: 33.333333%;
        padding: 0 10px;
    }
    
    .single-plan .membership-card-wrapper {
        width: 400px;
        max-width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .membership-card-wrapper {
        flex: 0 0 auto;
        width: 50%;
        padding: 0 10px;
    }
}

@media (max-width: 767.98px) {
    .membership-card-wrapper {
        flex: 0 0 auto;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        padding: 0 10px;
    }
    
    .chat-input {
        padding: 10px;
    }
    
    #chatMessagesContainer {
        padding-bottom: 70px;
    }
    
    .chat {
        height: calc(100vh - 150px);
    }
    
    .chat-input-group {
        padding: 3px 8px;
    }
    
    .chat-form-control {
        padding: 8px 10px;
        font-size: 14px;
    }
}

@media (min-height: 800px) {
    .modal-body {
        max-height: unset !important;
    }
}

@media (max-height: 700px) {
    .modal-xl .membership-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .modal-xl .membership-description {
        margin-bottom: 0.75rem;
    }
    
    .modal-xl .membership-divider {
        margin: 1rem 0;
    }
}

@media (max-width: 768px) {
    .payment-form-container {
        padding: 15px;
    }
    
    .row.mb-3 {
        margin-bottom: 10px !important;
    }
    
    .mb-3, .mb-4 {
        margin-bottom: 15px !important;
    }
}

.modal-body {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0 !important;
}


/*
.btn-icon[title="Cerrar sesión"] {
    transition: all 0.2s ease;
}

.btn-icon[title="Cerrar sesión"]:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.btn-icon[title="Cerrar sesión"] i {
    font-size: 18px;
    transition: all 0.2s ease;
}

.btn-icon[title="Cerrar sesión"]:hover i {
    color: #ff3547 !important;
}

.btn-icon[title="Cerrar sesión"] {
    margin-right: 0.5rem;
}

.main-content {
    min-height: calc(100vh - 120px);
    padding-bottom: 40px;
}
.card {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.card-header {
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.navbar {
    background-color: #252540 !important;
}
.btn-primary {
    background-color: #3498db;
    border-color: #3498db;
}
.btn-success {
    background-color: #2ecc71;
    border-color: #2ecc71;
}
.btn-info {
    background-color: #00bbf9;
    border-color: #00bbf9;
    color: white;
}
.btn-outline-primary {
    border-color: #3498db;
    color: #3498db;
}
.btn-outline-primary:hover {
    background-color: #3498db;
    color: white;
}
.text-info {
    color: #00bbf9 !important;
}
.text-success {
    color: #2ecc71 !important;
}
.pagination .page-item.active .page-link {
    background-color: #3498db;
    border-color: #3498db;
}
.pagination .page-link {
    color: #3498db;
    background-color: #252540;
    border-color: #333;
}
.pagination .page-link:hover {
    background-color: #1e1e2f;
}
    */



.membership-original-price {
    font-size: 1rem;
    vertical-align: middle;
}

.membership-price {
    color: #28a745; /* Verde para indicar descuento */
}

#couponSuccessText {
    font-weight: bold;
}

/* En tu archivo CSS */
#couponInput:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

#validateCouponBtn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}