/*
    Estilos comunes de Umbral que se usan en varias páginas.
    (Los de una sola página van junto a ella, en su archivo .cshtml.css.)
*/

/* --- Base: tipografía y tamaño de letra (cada tema define sus fuentes) ------------------ */
html {
    font-size: 16px;   /* el mismo tamaño en el móvil: se lee de un vistazo en la mesa */
}
body {
    font-family: var(--fuente-texto, system-ui, sans-serif);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--fuente-titulos, inherit);
}
/* Marca "Umbral" en la barra superior: siempre con la tipografía del portal. */
.marca {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 600;
    font-size: 1.6rem;
    letter-spacing: .02em;
    line-height: 1;
}
/* Nombre de quien ha iniciado sesión, en la barra (enlace a "Mi cuenta"): se corta si es muy largo. */
.usuario-sesion {
    max-width: 12rem;
    color: inherit;
    text-decoration: none;
}
.usuario-sesion:hover,
.usuario-sesion:focus-visible { text-decoration: underline; }
/* Firma de Ailosan Studio (pie del portal y pantalla de entrada). */
.firma {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: 2rem 1rem 1.5rem;
    font-size: .85rem;
    color: var(--bs-secondary-color);
}
.firma svg {
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 auto;
}
.firma a {
    color: inherit;
}


/* --- Pestañas: en el móvil se desplazan en horizontal en vez de partirse en dos líneas -- */
.ficha-pestanas {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}
.ficha-pestanas .nav-link {
    white-space: nowrap;
}

/* --- Estado del guardado de un campo editable (lo ponen ficha-directa.js y notas.js) ---- */
input.guardando, textarea.guardando { background-color: var(--bs-warning-bg-subtle); }
input.guardado,  textarea.guardado  { background-color: var(--bs-success-bg-subtle); transition: background-color .6s; }
input.con-error, textarea.con-error { border-color: var(--bs-danger); }

/* --- Listas de notas (diario, grupo, máster) ------------------------------------------- */
.nota .boton-plegar {
    transition: transform .15s;
}
.nota .boton-plegar:not(.collapsed) {
    transform: rotate(90deg);
}

/* --- Retratos: círculo con la imagen recortada, o la inicial si no hay imagen ---------- */
.retrato {
    border-radius: 50%;
    object-fit: cover;          /* recorta al círculo sin deformar; la imagen entera se ve al pulsarla */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-weight: 600;
    background: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
    overflow: hidden;
}
.retrato-sm { width: 2rem;   height: 2rem;   font-size: .9rem; }
.retrato-md { width: 3rem;   height: 3rem;   font-size: 1.4rem; }
.retrato-lg { width: 4rem;   height: 4rem;   font-size: 1.8rem; }
button.retrato { border: 0; padding: 0; }
button.retrato:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.retrato-completo {
    max-width: 100%;
    max-height: 70vh;
    border-radius: .5rem;
}

.texto-largo {
    white-space: pre-line;   /* respeta los saltos de línea que escribe el usuario */
}

/* --- Aviso flotante abajo: guardado, conflicto o error (ver comun.js) -------------------- */
.aviso-flotante {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    z-index: 1080;
    max-width: calc(100% - 2rem);
    padding: .5rem .875rem;
    border-radius: .5rem;
    background: var(--bs-dark);
    color: var(--bs-light);
    font-size: .875rem;
    box-shadow: 0 .25rem 1rem rgba(0, 0, 0, .25);
}
.aviso-flotante.aviso-error { background: var(--bs-danger); }
.aviso-flotante.aviso-conflicto { background: #8a5a00; }
