/* ==================== modal-pagar.css ==================== */

/** TABLE OF CONTENTS PC
------------------------------------------------------------/

1 - Modal Overlay...................................... 21-35
2 - Modal Overlay...................................... 37-47
3 - Modal Container.................................... 49-55
4 - Modal Column Left (QR)............................. 57-72
5 - Modal Column Right (Form).......................... 74-79
6 - Modal Titulo....................................... 81-87
7 - Labels and Inputs................................. 89-117
8 - Select........................................... 119-135
9 - Modal Date and Time.............................. 137-145
10 - Modal Btns...................................... 147-180
11 - Modal Btn Box................................... 182-200
    
/// END TABLE OF CONTENTS PC
------------------------------------------------------------*/

/* ==================== 1 - Modal Overlay ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 20px;
    display: none;
}

/* ==================== 2 - Modal Overlay ==================== */
.modal-content {
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 800px;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ==================== 3 - Modal Container ==================== */
.modal-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* ==================== 4 - Modal Column Left (QR) ==================== */
.modal-left {
    width: 100%;
    max-width: 250px;
    background-color: #f7f7f7;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-image {
    max-width: 100%;
    border-radius: 10px;
    object-fit: contain;
}

/* ==================== 5 -  Modal Column Right (Form) ==================== */
.modal-right {
    padding: 30px;
    display: flex;
    flex-direction: column;
}

/* ==================== 6 - Modal Titulo ==================== */
.modal-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 16px;
}

/* ==================== 7 - Labels and Inputs ==================== */
.label {
    font-size: 14px;
    font-weight: 500;
    color: #4a4a4a;
    margin-bottom: 8px;
}

.file-input-label {
    cursor: pointer;
    color: #007bff;
    display: flex;
    align-items: center;
}

.icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.hidden {
    display: none;
}

.file-name {
    font-size: 14px;
    color: #6c757d;
}
/* Contenedor principal relativo para posicionar el despliegue */
.custom-select-container {
    position: relative;
    width: 100%;
    /* margin-bottom: 20px; */
}

/* El botón principal que simula el select */
.custom-select-trigger {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    color: #1e293b;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Separa el texto de la flecha */
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    text-align: left;
}

/* Hover y Focus del botón */
.custom-select-trigger:hover {
    border-color: #94a3b8;
    background-color: #f8fafc;
}

.custom-select-trigger:focus,
.custom-select-container:focus-within .custom-select-trigger {
    border-color: var(--secundary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    outline: none;
}

/* Animación de la flecha */
.select-arrow {
    width: 16px;
    height: 16px;
    color: #64748b;
    transition: transform 0.2s ease;
}

.arrow-rotate {
    transform: rotate(180deg);
    color: #3b82f6;
}

/* La caja flotante de las opciones */
.custom-select-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    z-index: 50;
    max-height: 240px; /* Limita la altura si hay muchas materias */
    overflow-y: auto;  /* Scroll bonito interno si desborda */
    padding: 6px;
}

/* Cada una de las opciones (DIVs) */
.custom-option {
    /* padding: 10px 14px; */
    font-size: 0.95rem;
    color: #334155;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}

.custom-option:last-child {
    margin-bottom: 0;
}

/* Hover hermoso sobre las opciones */
.custom-option:hover {
    background-color: #f1f5f9; /* Gris clarito elegante */
    color: #0f172a;
    padding-left: 18px; /* Pequeño efecto dinámico al pasar el mouse */
}

/* Opción que está actualmente seleccionada */
.custom-option.is-selected {
    background-color: #eff6ff; /* Fondo azul sutil */
    color: var(--primary-color);            /* Texto azul fuerte */
    font-weight: 600;
}

/* Estilo para la opción de reset / por defecto */
.default-option {
    color: #94a3b8;
    font-style: italic;
}

/* Checkmark (✓) indicador de la opción elegida */
.option-check {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Personalizar la barra de scroll dentro del menú por si hay muchas opciones */
.custom-select-options::-webkit-scrollbar {
    width: 6px;
}
.custom-select-options::-webkit-scrollbar-track {
    background: transparent;
}
.custom-select-options::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
/* ==================== 8 - Select ==================== */
.select-container {
    margin-bottom: 16px;
}

.select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.select:focus {
    border-color: #007bff;
}

/* ==================== 9 - Modal Date and Time ==================== */
.datetime-container {
    background-color: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    color: #495057;
    margin-top: 12px;
}

/* ==================== 10 - Modal Btns ==================== */
.buttons-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.btn {
    padding: 14px;
    font-weight: bold;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cancel-btn {
    background-color: #f1f1f1;
    color: #333;
}

.cancel-btn:hover {
    background-color: #e2e2e2;
}

.reserve-btn {
    background-color: #007bff;
    color: white;
}

.reserve-btn:hover {
    background-color: #0056b3;
}

/* ==================== 11 - Modal Btn Box ==================== */
.tutor-pay-btn-box {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.tutor-pay-btn {
    padding: 12px 24px;
    background-color: #007bff;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.tutor-pay-btn:hover {
    background-color: #0056b3;
}

/*---------------------------movil---------------------------*/
/* Responsive Styles */


@media (max-width: 768px) {
    .modal-container {
        flex-direction: column;
    }

    /* Columna Izquierda (QR) */
    .modal-left {
        width: 100%;
        max-width: none;
        margin-bottom: 20px;
    }

    /* Columna Derecha (Formulario) */
    .modal-right {
        padding: 15px;
    }

    /* Ajustes a la imagen QR */
    .qr-image {
        width: 100%;
        max-width: 200px;
    }

    /* Botones de Acción */
    .buttons-container {
        flex-direction: column;
        gap: 10px;
    }

    /* Botones */
    .btn {
        padding: 12px;
        width: 5rem;
    }
}

/* ==================== 12 - Selector de método de pago QR ==================== */

/* Contenedor de las dos pestañas */
.qr-method-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    width: 100%;
}

/* Botón de pestaña base */
.qr-method-tab {
    flex: 1;
    padding: 8px 6px;
    font-size: 12px;
    font-weight: 600;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.3;
    text-align: center;
}

.qr-method-tab:hover {
    border-color: var(--secundary-color);
    color: var(--secundary-color);
    background: #eff6ff;
}

/* Pestaña activa */
.qr-method-tab--active {
    background: var(--secundary-color);
    /* border-color: #2563eb; */
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.qr-method-tab--active:hover {
    background: var(--secundary-color);
    /* border-color: #1d4ed8; */
    color: #ffffff;
}

/* Descripción debajo del QR */
.qr-method-info {
    margin-top: 10px;
    text-align: center;
}

.qr-method-titulo {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 4px 0;
}

.qr-method-desc {
    font-size: 11.5px;
    color: #6b7280;
    line-height: 1.4;
    margin: 0;
}

.btn-coupon{
    padding: 0;
}

.form-error{
    color: red;
}

/* Estilo gris apagado para la frase inicial */
.select-placeholder {
    color: #94a3b8; /* Gris tenue */
    font-weight: 400;
}
/* Estado activo mientras se arrastra un archivo encima de la caja */
.file-upload-cta-box.is-dragging {
    border-color: var(--primary-color) !important;     /* Azul más intenso */
    background-color: #dbeafe !important; /* Fondo azul destacado */
    transform: scale(0.99);               /* Pequeño efecto de presión */
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}


/* --- ESTADOS DE ERROR VISUAL (TEMBLOR Y ROJO) --- */

/* 1. Definición del efecto de temblor horizontal rápido */
@keyframes ctaShake {
    0%, 100% { transform: translateX(0); }
    15%, 45%, 75% { transform: translateX(-6px); }
    30%, 60%, 90% { transform: translateX(6px); }
}

/* 2. Clase contenedora que activa el error */
.input-error-active {
    animation: ctaShake 0.4s ease-in-out;
}

/* 3. Cambiar la etiqueta (Label) a rojo */
.input-error-active .input-label {
    color: #ef4444 !important; /* Rojo de alerta */
    transition: color 0.2s ease;
}

/* 4. Cambiar el botón del select a rojo pulsante/destacado */
.input-error-active .custom-select-trigger {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important; /* Fondo rojizo muy sutil */
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
    color: #b91c1c !important;
}

/* 5. Cambiar la caja de arrastre de archivos a rojo */
.input-error-active .file-upload-cta-box {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}

/* Cambiar el título interno de la caja de archivo a rojo */
.input-error-active .file-upload-cta-box .cta-main-title {
    color: #b91c1c !important;
}
/* Responsivo: pestañas apiladas en móvil muy pequeño */
@media (max-width: 400px) {
    .qr-method-tabs {
        flex-direction: column;
    }
}

    /* Contenedor del Llamado a la Acción (CTA) */
.file-upload-cta-box {
    display: block;
    border: 2px dashed var(--secundary-color); /* Azul llamativo */
    background-color: #f0f6ff;
    border-radius: 12px;
    padding: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    /* margin-bottom: 12px; */
}

.file-upload-cta-box:hover {
    background-color: #e0f0fe;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Estado cuando ya tiene un archivo arriba */
.file-upload-cta-box.has-file {
    border: 2px solid #10b981; /* Verde éxito */
    background-color: #f0fdf4;
}
.file-upload-cta-box.has-file:hover {
    background-color: #dcfce7;
}

/* Tipografías internas del CTA */
.cta-main-title {
    display: block !important;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 8px 0 4px 0;
}
.file-upload-subtext {
    display: block !important;
    font-size: 0.85rem;
    color: #64748b;
    /* margin-bottom: 12px; */
}
.cta-action-btn {
    display: inline-block;
    padding: 6px 16px;
    background-color: #3b82f6;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

/* Estilos de éxito (Archivo cargado) */
.cta-title-success {
    display: block !important;
    font-size: 1rem;
    font-weight: 700;
    color: #065f46;
    margin-top: 6px;
}
.file-name-text {
    display: block !important;
    font-size: 0.85rem;
    color: #047857;
    font-family: monospace;
    background: #e6f4ea;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    margin: 4px 0 8px 0;
}
.cta-action-link {
    font-size: 0.8rem;
    color: var(--primary-color);
    /* text-decoration: underline; */
    font-weight: 500;
}

/* Iconos de gran tamaño */
.cta-upload-icon { font-size: 2rem; }
.cta-success-icon { 
    font-size: 1.8rem; 
    color: white; 
    background: #10b981; 
    border-radius: 50%; 
    display: inline-flex; 
    width: 40px; 
    height: 40px; 
    align-items: center; 
    justify-content: center;
}

/* --- ESTILOS DE LA BARRA DE CARGA --- */
.progress-container {
    margin-top: 10px;
    background: #ffffff;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.progress-bar-wrapper {
    width: 100%;
    background-color: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
    height: 8px;
}
.progress-bar-fill {
    height: 100%;
    background-color: #3b82f6; /* Barra azul */
    width: 0%;
    transition: width 0.1s linear; /* Movimiento fluido */
}
.progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-top: 6px;
    color: #64748b;
    font-weight: 500;
}
.progress-percentage {
    color: #3b82f6;
    font-weight: 700;
}

/* Ocultar el input nativo */
.file-input-hidden {
    display: none !important;
}
.reserva-success-message {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
    padding: 14px 18px;
    border-radius: 12px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}
.modal-full-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    display: flex ;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    width: 100%;
    height: 100%;
}

.loading-center-box {
    display: flex;
    flex-direction: column;
    text-align: center;
    /* max-width: 360px; */
    align-items: center;
    justify-content: center;
    padding: 30px;
     /* width: 100%;*/
    height: 100%; 
}

.main-loading-ring {
    width: 64px;
    height: 64px;
    border: 6px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 50%;
    margin: 0 auto 18px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-view-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.loading-view-desc {
    display: block !important;
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
}

.modal-success-panel {
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    /* min-height: 350px; */
}

.success-icon {
    width: 70px;
    height: 70px;
    background-color: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
    font-size: 2rem;
    font-weight: bold;
}

.input-error-active {
    border: 2px solid #ef4444 !important;
    border-radius: 12px;
}

.file-upload-cta-box.input-error-active,
.custom-select-trigger.input-error-active {
    border: 2px solid #f21111 !important;
    background-color: #ffe1e1;
}

.field-error-message {
    margin: 6px 0 0;
    color: #dc2626;
    font-size: 0.82rem;
    font-weight: 600;
}

/*  boton de descarga*/

/* Botón pequeño para descargar el QR seleccionado */
.modal-qr-column .qr-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: fit-content;
    margin: 10px auto 0;
    padding: 7px 12px;

    border: 1px solid var(--secundary-color);
    border-radius: 7px;
    background: #ffffff;
    color: var(--secundary-color);

    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;

    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.modal-qr-column .qr-download-btn:hover {
    background: var(--secundary-color);
    color: #ffffff;
    transform: translateY(-1px);
}

.modal-qr-column .qr-download-btn:focus-visible {
    outline: 2px solid var(--secundary-color);
    outline-offset: 3px;
}

.modal-qr-column .qr-download-btn svg {
    flex-shrink: 0;
}