﻿/* ConfirmarDatos.css - Versión Mejorada y Organizada */

/* ===== ESTILOS BASE ===== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: white url(../../img/se-ApEscolar/registro/bg.jpg) no-repeat center / cover;
}

/* ===== ESTRUCTURA PRINCIPAL ===== */

.registro-logotipo {
    position: absolute;
    top: 32px;
    left: 32px;
    width: 180px;
}

.registro-container {
    display: flex;
    max-width: 1200px;
    margin: 2rem auto;
    min-height: auto;
    border-radius: 1rem;
}

/* Sección de imagen */
.registro-ilustracion {
    flex: 1;
    overflow: hidden;
    position: relative;
    max-width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /*background-color: #f9f9f9;*/
}

    .registro-ilustracion img {
        width: 80%;
        /* height: 100%; */
        object-fit: contain;
    }

/* Sección de formulario */
.registro-formulario {
    flex: 1;
    padding: 40px;
    max-width: 50%;
    overflow-y: auto;
    background: #fff;
    box-shadow: 0px 0px 12px 4px rgb(27 39 55 / 20%);
    border-radius: 16px;
}

h2 {
    color: #235692;
    margin-bottom: 30px;
    font-size: 22px;
    font-weight: 600;
}

/* ===== ESTILOS DE FORMULARIO ===== */
.form-section {
    margin-bottom: 35px;
}

.form-section-title {
    font-size: 16px;
    color: #235692;
    margin-bottom: 20px;
    font-weight: bold;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-col {
    flex: 1;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #235692;
    font-weight: 500;
}

input, select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 14px;
    transition: all 0.3s ease;
}

    input:focus, select:focus {
        outline: none;
        border-color: #008CDE;
        box-shadow: 0 0 3px rgba(0,140,222,0.2);
    }

select {
    appearance: menulist;
    background-color: white;
}

/* Campos requeridos */
.required::after {
    content: " *";
    color: #dc3545;
}

/* Elementos con iconos */
.input-with-icon {
    position: relative;
}

.edit-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #008CDE;
}

/* ===== BOTONES ===== */
.btn-confirmar {
    background-color: #235692;
    color: white;
    border: none;
    padding: 15px 20px;
    width: 100%;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    text-transform: uppercase;
    margin-top: 30px;
    transition: background-color 0.3s;
}

    .btn-confirmar:hover {
        background-color: #1a4578;
    }

/* ===== VALIDACIÓN Y ERRORES ===== */
.alert-error {
    display: none;
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.input-error {
    border-color: #dc3545 !important;
}

.input-warning {
    border-color: #ffc107 !important;
}

.error-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    background: #dc3545;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 5px;
    z-index: 10;
    white-space: nowrap;
}

/* Estilos específicos para fecha */
.date-input-container {
    position: relative;
}

input[type="date"] {
    padding-right: 35px;
    background-color: white;
}

    input[type="date"]::-webkit-calendar-picker-indicator {
        position: absolute;
        right: 0;
        padding: 0;
        margin: 0;
        opacity: 0;
        width: 100%;
        height: 100%;
        cursor: pointer;
    }

.date-input-error {
    display: none;
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* ===== MODAL DE CONFIRMACIÓN ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.close-modal {
    color: #aaa;
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

    .close-modal:hover {
        color: #333;
    }

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    20%, 60% {
        transform: translateX(-5px);
    }

    40%, 80% {
        transform: translateX(5px);
    }
}

@keyframes pulseWarning {
    0% {
        border-color: #ffc107;
    }

    50% {
        border-color: #ffdd59;
    }

    100% {
        border-color: #ffc107;
    }
}

/* Aplicar animaciones */
.modal {
    animation: fadeIn 0.3s ease;
}

.input-error {
    animation: shake 0.5s;
}

.input-warning {
    animation: pulseWarning 1.5s infinite;
}

/* ===== DISEÑO RESPONSIVO ===== */

@media (max-width: 1024px) and (orientation: portrait){
    body {
        height: 100vh;
    }
    
    .registro-container {
        flex-direction: column;
        margin: 100px auto;
        justify-content: flex-start;
        align-items: center;
        gap: 2rem;
    }
}

@media (max-width: 992px) {
    body {
        background: #fff;
    }
    .registro-container {
        flex-direction: column;
        margin-top: 100px;
    }
    

    .registro-ilustracion,
    .registro-formulario {
        max-width: 100%;
    }

    .registro-ilustracion {
        /*height: 300px;*/
        display: none;
    }
}

@media (max-width: 768px) {
    .registro-logotipo {
        left: 16px;
    }

    .registro-container {
        flex-direction: column;
        margin-top: 100px;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .registro-formulario {
        padding: 20px;
        margin: 16px;
        width: 80%;
    }

    .error-tooltip,
    .date-input-error {
        position: static;
        margin-top: 5px;
        display: inline-block;
    }
}

@media (max-width: 600px) {
    .modal-content {
        margin: 20% auto;
        width: 85%;
    }
}

/* ===== LOADER Y OVERLAY ===== */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(200, 200, 200, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #235692;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.modal {
    z-index: 1000; /* Ya lo tienes, asegura que sea mayor que el del loader-overlay */
}

/* ===== MODAL TÉRMINOS Y CONDICIONES ===== */
#terminosModal .modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    position: relative;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    max-height: 90vh;
    overflow: hidden;
}

#terminosModal .pdf-container {
    margin-top: 20px;
    height: 500px;
    width: 100%;
}

    #terminosModal .pdf-container iframe {
        width: 100%;
        height: 100%;
        border: none;
    }

/* Estilos para el enlace de términos */
.terminos-link {
    color: #0066cc;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

    .terminos-link:hover {
        color: #004499;
        text-decoration: none;
    }

.terminos-error {
    color: #d32f2f;
    font-size: 14px;
    margin-top: 5px;
    padding: 5px 10px;
    background-color: #ffebee;
    border-radius: 4px;
    border-left: 4px solid #d32f2f;
}

@media (max-width: 768px) {
    #terminosModal .modal-content {
        width: 95%;
        margin: 2% auto; 
        padding: 20px;
        max-height: 95vh;
    }

    #terminosModal .pdf-container {
        height: 65vh; 
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    #terminosModal .modal-content {
        width: 98%;
        margin: 1% auto; 
        padding: 15px;
        max-height: 98vh; 
    }

    #terminosModal .pdf-container {
        height: 70vh; 
        margin-top: 8px;
    }
}

/* ===== ESTILOS PARA CHECKBOX DE TÉRMINOS ===== */
.check-aceptacion {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

    .check-aceptacion input[type="checkbox"] {
        margin-top: 3px;
        flex-shrink: 0;
        width: 18px;
        height: 18px;
    }

    .check-aceptacion label {
        margin: 0;
        line-height: 1.4;
        font-size: 14px;
        color: #333;
    }

@media (max-width: 768px) {
    .check-aceptacion {
        align-items: flex-start;
        gap: 8px;
    }

        .check-aceptacion input[type="checkbox"] {
            margin-top: 2px;
            transform: scale(1.1);
        }

        .check-aceptacion label {
            font-size: 13px;
            line-height: 1.3;
        }
}