@charset "utf-8";
/* CSS Document */

@layer formularios {

    :root {
        --c-primary: rgb(0, 76, 151);
        --c-secondary: rgb(0, 115, 119);
        --c-dark: rgb(0, 40, 85);
        --c-light: rgb(208, 211, 212);
        --c-border: rgb(0 40 85 / 0.15);
    }

    /* ==============================================================
       FORMULARIOS Solicitudes de Inscripción para el Examen
    ============================================================== */

    #inscripcion-examen {
        width: 100%;
        max-width: 720px;
        margin: 2rem auto;
        padding: 1.5rem;
        background: #fff;
        border-radius: 0.75rem;
        box-shadow: 0 8px 20px rgb(0 0 0 / 0.2);
    }

    /* HEADER */
    #inscripcion-examen .form-header h2 {
        color: var(--c-primary);
        font-size: var(--fs-lg);
        margin-bottom: 1.2rem;
        text-align: left;
    }

    /* FIELDSET como card ligera */
    #inscripcion-examen fieldset {
        border: 1px solid var(--c-border);
        border-radius: 0.6rem;
        padding: 1.2rem;
        background: rgb(208 211 212 / 0.12);
    }

    /* GRID ajuste más compacto */
    #inscripcion-examen .form-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 0.9rem;
    }

    /* LABELS */
    #inscripcion-examen label {
        font-size: var(--fs-sm);
        font-weight: 500;
        color: var(--c-dark);
    }

    /* INPUTS */
    #inscripcion-examen input,
    #inscripcion-examen select {
        height: 40px;
        border-radius: 0.4rem;
        border: 1px solid var(--c-border);
        padding: 0 0.65rem;
        font-size: var(--fs-sm);
        transition: all 0.2s ease;
    }

    #inscripcion-examen select {
        width: 100px;
    }

    /* FOCUS */
    #inscripcion-examen input:focus,
    #inscripcion-examen select:focus {
        border-color: var(--c-secondary);
        box-shadow: 0 0 0 2px rgb(0 115 119 / 0.15);
        outline: none;
    }

    /* INLINE (fecha) */
    #inscripcion-examen .form-inline {
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

    #inscripcion-examen .form-inline span {
        font-size: var(--fs-sm);
        color: var(--c-dark);
    }

    /* año */
    #inscripcion-examen .year {
        font-weight: 500;
        color: var(--c-primary);
    }

    /* ERROR */
    #inscripcion-examen .error {
        font-size: 0.75rem;
        color: #c0392b;
    }

    /* BOTÓN */
    #inscripcion-examen .form-actions {
        margin-top: 1.2rem;
        display: flex;
        justify-content: flex-end;
    }

    #inscripcion-examen button[type="submit"] {
        padding: 0.55rem 1.2rem;
        border-radius: 0.45rem;
        font-size: var(--fs-sm);
        font-weight: 600;
        background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
        border: none;
        color: #fff;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    #inscripcion-examen button[type="submit"]:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 14px rgb(0 0 0 / 0.15);
    }

    /* RESPONSIVE */
    @media (max-width: 768px) {
        #inscripcion-examen {
            padding: 1rem;
        }

        #inscripcion-examen .form-grid {
            grid-template-columns: 1fr;
        }

        #inscripcion-examen .form-actions {
            justify-content: stretch;
        }

        #inscripcion-examen button {
            width: 100%;
        }

        /* FIX fecha en móvil */

        #inscripcion-examen .form-field .form-inline {
            flex-direction: row;   /* 🔥 evita que se apilen */
            flex-wrap: nowrap;     /* 🔥 evita salto de línea */
            align-items: center;
            gap: 0.35rem;
        }

        #inscripcion-examen .form-field .form-inline select {
            width: auto;           /* 🔥 evita que ocupen 100% */
            min-width: 70px;       /* opcional, para que no colapsen */
        }

    }
    /*****
    Fin de FORMULARIOS Solicitudes de Inscripción para el Examen
    *****/

    /* CONTENEDOR PRINCIPAL */
    .form-card {
        width: 100%;
        max-width: 900px;
        margin: auto;
        padding: 2rem;
        background: #fff;
        border-radius: 0.75rem;
        box-shadow: 0 10px 25px rgb(0 0 0 / 0.06);
    }

    .form-card h2 {
        color: var(--c-primary);
        margin-bottom: 1.5rem;
    }

    /* SECCIONES */
    .form-section {
        color: var(--c-dark);
        font-weight: 600;
        margin: 2rem 0 1rem;
        border-left: 4px solid var(--c-secondary);
        padding-left: 0.6rem;
    }

    section {
        margin-bottom: 1.5rem;
    }

    /* FIELDSET */
    fieldset {
        border: 1px solid var(--c-border);
        border-radius: 0.6rem;
        padding: 1.5rem;
        margin-top: 1rem;
        background: rgb(208 211 212 / 0.15);
    }

    legend {
        font-weight: 600;
        color: var(--c-primary);
        padding: 0 0.5rem;
    }

    /* GRID */
    .form-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1rem;
        margin-top: 0.8rem;
    }

    .form-field {
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
    }

    /* INLINE (radios) */
    .form-inline {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        align-items: center;
        margin-bottom: 0.8rem;
    }

    .form-inline label {
        font-size: var(--fs-sm);
        color: var(--c-dark);
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }

    /* INPUTS */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    select {
        width: 100%;
        height: 42px;
        border-radius: 0.4rem;
        border: 1px solid var(--c-border);
        padding: 0 0.75rem;
        font-family: inherit;
        font-size: var(--fs-sm);
        background: #fff;
        transition: all 0.2s ease;
    }

    select {
        cursor: pointer;
    }
    
    /* Ajustar el contenedor .chosen_select */
	.chosen-container-single .chosen-single {
		height: 40px !important;
		line-height: 40px !important; /* Centra el texto verticalmente */
		display: block;
	}

	/* Ajustar el icono de la flecha lateral */
	.chosen-container-single .chosen-single div b {
		background-position-y: 10px !important;
	}

	/* Texto interno */
	.chosen-container-single .chosen-single span {
		line-height: 40px !important;
	}

	/* Ajustar el buscador interno */
	.chosen-container-single .chosen-search input[type="text"] {
		height: 30px !important;
	}

    /* FOCUS */
    input:focus,
    select:focus {
        outline: none;
        border-color: var(--c-secondary);
        box-shadow: 0 0 0 2px rgb(0 115 119 / 0.15);
    }

    /* RADIO */
    input[type="radio"] {
        accent-color: var(--c-primary);
        cursor: pointer;
    }

    /* TEXTO LEGAL */
    .texto-legal {
        font-size: var(--fs-sm);
        color: #555;
        line-height: 1.4;
        margin-bottom: 1rem;
    }

    /* TEXTO SUBIR ARCHIVOS */
    .texto-subir-archivos {
        font-size: var(--fs-md);
        font-weight:500;
        color: #007377;
        line-height: 1.4;
        margin-bottom: 1rem;
    }

    /* BOTONES */
    .form-actions {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        margin-top: 1.5rem;
        flex-wrap: wrap;
    }

    /* BASE */
    .form-actions button {
        font-family: var(--font-sans);
        font-size: var(--fs-sm);
        font-weight: 600;
        padding: 0.65rem 1.4rem;
        border-radius: 0.45rem;
        cursor: pointer;
        transition: all 0.15s ease;
        border: none;
    }

    /* BOTÓN PRINCIPAL (Guardar) */
    .form-actions button[type="submit"] {
        background: rgb(0, 76, 151);
        color: #fff;
        box-shadow: 0 2px 6px rgb(0 0 0 / 0.12);
    }

    .form-actions button[type="submit"]:hover {
        background: rgb(0, 40, 85);
        box-shadow: 0 4px 10px rgb(0 0 0 / 0.18);
    }

    .form-actions button[type="submit"]:active {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgb(0 0 0 / 0.1);
    }

    /* BOTÓN SECUNDARIO (Regresar) */
    .form-actions button[type="button"] {
        background: transparent;
        color: rgb(0, 76, 151);
        border: 1px solid rgb(0, 76, 151);
    }

    .form-actions button[type="button"]:hover {
        background: rgb(0 76 151 / 0.08);
        color: rgb(0, 40, 85);
        border-color: rgb(0, 40, 85);
    }

    .form-actions button[type="button"]:active {
        background: rgb(0 76 151 / 0.15);
    }

    /* RADIOS EN LA ZONA DE ACCIÓN */
    .form-actions label {
        font-size: var(--fs-sm);
        color: var(--c-dark);
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }

    /* RESPONSIVE */
    @media (max-width: 768px) {
    	.chosen-container-single .chosen-single {
			width: 100%;
		}
        .form-actions {
            flex-direction: column;
            align-items: stretch;
        }

        .form-actions button {
            width: 100%;
            text-align: center;
        }
    }

    /* =====================================================
       ESTILOS COMPLEMENTARIOS PARA FORMULARIO DE INSCRIPCIÓN
       ===================================================== */
    /* ====== ESTADOS ====== */
    .hidden {
        display: none;
    }

    .uploading {
        background: rgb(208 211 212 / 0.25);
        border-left: 4px solid var(--c-secondary);
        padding: 0.75rem 1rem;
        border-radius: 0.4rem;
        margin-bottom: 1rem;
        font-size: var(--fs-sm);
    }

    /* ====== PASOS ====== */
    .form-steps {
        margin: 1rem 0;
        padding-left: 1.5rem;
        color: var(--c-dark);
    }

    .form-steps li {
        margin-bottom: 0.4rem;
        list-style-type: decimal;
        font-size: var(--fs-sm);
    }

    /* ====== TIPO CERTIFICACIÓN ====== */
    .form-tipo {
        background: rgb(208 211 212 / 0.15);
        padding: 1rem;
        border-radius: 0.6rem;
        border: 1px solid var(--c-border);
    }

    /* ====== ARCHIVOS ====== */
    .archivos-box {
        border: 1px solid var(--c-border);
        border-radius: 0.5rem;
        padding: 1rem;
        background: #fff;
        margin-bottom: 1rem;
    }

    .archivos-box .empty {
        color: #777;
        font-size: var(--fs-sm);
        margin-top: 0.5rem;
    }

    /* ====== INFO ARCHIVO ====== */
    .file-info {
        display: grid;
        gap: 0.3rem;
        font-size: var(--fs-sm);
        color: #555;
        margin-bottom: 1rem;
    }

    .file-info span:first-child {
        font-weight: 600;
        color: var(--c-dark);
    }

    /* ====== BOTÓN SECUNDARIO ====== */
    .btn-sec {
        background: #fff;
        border: 1px solid var(--c-secondary);
        color: var(--c-secondary);
    }

    .btn-sec:hover {
        background: rgb(0 115 119 / 0.08);
    }

    /* ====== AVISO ERROR ====== */
    .aviso-error {
        margin-top: 0.8rem;
        padding: 0.6rem 0.8rem;
        border-radius: 0.4rem;
        font-size: var(--fs-sm);
        background: rgb(255 0 0 / 0.05);
        border-left: 4px solid #d93025;
        color: #7a1c1c;
    }

    /* ====== RESPONSIVE FINO ====== */
    @media (max-width: 768px) {

        .form-steps {
            font-size: var(--fs-sm);
        }

        .file-info {
            font-size: var(--fs-xs);
        }

    }
    /* GRID MÁS CLARO */
    .form-tipos {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 1.2rem;
    }

    /* TARJETA */
    .form-tipo-card {
        border: 1px solid var(--c-border);
        border-radius: 0.6rem;
        padding: 1rem;
        background: #fff;
        transition: all 0.2s ease;
    }

    /* HOVER SUAVE */
    .form-tipo-card:hover {
        box-shadow: 0 6px 14px rgb(0 0 0 / 0.06);
    }

    /* RADIO + LABEL */
    .tipo-option {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-weight: 600;
        color: var(--c-dark);
        margin-bottom: 0.6rem;
        cursor: pointer;
    }

    /* RADIO */
    .tipo-option input {
        accent-color: var(--c-primary);
    }

    /* ESTADO ACTIVO (CLAVE UX) */
    .form-tipo-card:has(input:checked) {
        border-color: var(--c-secondary);
        box-shadow: 0 0 0 2px rgb(0 115 119 / 0.15);
        background: rgb(208 211 212 / 0.1);
    }

    /* SELECT DESHABILITADO VISUALMENTE */
    .form-tipo-card select:disabled {
        background: #f3f3f3;
        color: #999;
    }

    /* MOBILE */
    @media (max-width: 768px) {
        .form-tipos {
            grid-template-columns: 1fr;
        }
    }

    /* CONTENEDOR FILE UPLOAD */
    .file-upload {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
    }

    /* LABEL COMO BOTÓN */
    .file-label {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        cursor: pointer;
        border: 1px dashed var(--c-border);
        border-radius: 0.6rem;
        padding: 0.6rem 0.8rem;
        transition: all 0.2s ease;
        background: #fff;
    }

    /* HOVER */
    .file-label:hover {
        border-color: var(--c-secondary);
        background: rgb(0 115 119 / 0.05);
    }

    /* BOTÓN VISUAL */
    .file-btn {
        background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
        color: #fff;
        padding: 0.4rem 0.8rem;
        border-radius: 0.4rem;
        font-size: var(--fs-sm);
        font-weight: 600;
        white-space: nowrap;
    }

    /* NOMBRE ARCHIVO */
    .file-name {
        font-size: var(--fs-sm);
        color: #555;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* ESTADO ACTIVO */
    .file-label:focus-within {
        box-shadow: 0 0 0 2px rgb(0 115 119 / 0.2);
    }

    /* MOBILE */
    @media (max-width: 600px) {
        .file-label {
            flex-direction: column;
            align-items: flex-start;
        }
    }
}