/* Estilos específicos de la página de usuario */

/* Filtros de la tabla de archivos */
.filtros-grid {
    display: grid; 
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr; 
    gap: 15px; 
    margin-top: 10px;
    align-items: flex-end;
}
@media (max-width: 900px) {
    .filtros-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
    .filtros-grid { grid-template-columns: 1fr; }
}

/* Etiqueta visual para indicar que la tabla está limitada */
.limite-aviso {
    text-align: right;
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 10px;
    font-style: italic;
}

/* ── UABC checkbox ── */
.uabc-check-label span:first-child { display: block; margin-bottom: 8px; }
.uabc-checkbox-row {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    background: #f0f8ff;
    border: 1.5px solid #b6d9f7;
    border-radius: 10px;
    cursor: pointer;
    font-size: .95rem;
    font-weight: 500;
    color: #1a4a7a;
    transition: background .2s;
}
.uabc-checkbox-row:hover { background: #ddf0ff; }
.uabc-checkbox-row input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: #1a4a7a; cursor: pointer; flex-shrink: 0;
}
#wrapOtraUniversidad { transition: opacity .2s; }
#wrapOtraUniversidad.hidden { display: none; }

/* ── Modal de encuesta de descarga ── */
#downloadSurveyOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 25, 47, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
}
#downloadSurveyOverlay.active {
    display: flex;
}
.dl-modal-box {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(10,30,60,.28);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    animation: dlFadeUp .28s cubic-bezier(.4,0,.2,1);
}
@keyframes dlFadeUp {
    from { opacity: 0; transform: translateY(18px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.dl-modal-header {
    padding: 24px 24px 0;
    text-align: center;
    flex-shrink: 0;
}
.dl-modal-header .dl-icon { font-size: 2rem; margin-bottom: 6px; }
.dl-modal-header h3 {
    margin: 0 0 6px;
    font-size: 1.15rem;
    color: #18211e;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}
.dl-modal-header p {
    margin: 0 0 6px;
    font-size: .85rem;
    color: #5d6964;
    line-height: 1.5;
}
.dl-modal-body {
    padding: 16px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 11px;
    overflow-y: auto;
}
.dl-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dl-field span {
    font-size: .85rem;
    font-weight: 600;
    color: #2c3e50;
    font-family: 'Outfit', sans-serif;
}
.dl-field input,
.dl-field textarea,
.dl-field select {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #dde1e7;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: .92rem;
    box-sizing: border-box;
    background: #f9fafb;
    outline: none;
    transition: border-color .2s;
}
.dl-field input:focus,
.dl-field textarea:focus {
    border-color: #0d699e;
    background: #f0f8ff;
}
.dl-field textarea { resize: vertical; min-height: 72px; }
.dl-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
}
.dl-uabc-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    background: #f0f8ff;
    border: 1.5px solid #b6d9f7;
    border-radius: 12px;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 500;
    color: #1a4a7a;
    font-family: 'Outfit', sans-serif;
}
.dl-uabc-row input[type="checkbox"] {
    width: 17px; height: 17px;
    accent-color: #1a4a7a;
    flex-shrink: 0;
    cursor: pointer;
}
.dl-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
}
#dlMensaje {
    min-height: 16px;
    font-size: .82rem;
    color: #e74c3c;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    margin: 0;
}
/* Landscape mobile */
@media (max-height: 520px) and (orientation: landscape) {
    .dl-modal-box {
        flex-direction: row;
        max-width: 700px;
        max-height: 95vh;
        align-items: stretch;
    }
    .dl-modal-header {
        padding: 20px 18px;
        width: 200px;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        border-right: 1px solid #f0f0f0;
        text-align: left;
    }
    .dl-modal-header .dl-icon { font-size: 1.6rem; }
    .dl-modal-header h3 { font-size: 1rem; }
    .dl-modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 16px 20px;
        gap: 9px;
    }
    .dl-row-2 { grid-template-columns: 1fr 1fr; }
}
/* Desktop */
@media (min-width: 768px) {
    .dl-modal-box { max-width: 520px; border-radius: 24px; }
    .dl-modal-header { padding: 28px 28px 0; }
    .dl-modal-header h3 { font-size: 1.2rem; }
    .dl-modal-body { padding: 18px 28px 28px; gap: 13px; }
}
/* Bloquear scroll cuando el modal está abierto */
body.dl-modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
}
