﻿/* Altura estimada del header fijo del layout (ajústala si tu navbar es más alta/baja) */
:root { --header-h: 72px; }

/* Contenedor principal */
.ficha-container {
    max-width: 1200px; 
    margin: 0 auto;
    padding: 1rem;
}

.ficha-table {
    max-width: 1100px;
    border-collapse: collapse;
}

.ficha-table th,
.ficha-table td {
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    vertical-align: middle;
}

.ficha-table tr {
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    vertical-align: middle;
}

.table-title th {
    background-color: #08349c;
    color: #ffffff;
    text-transform: uppercase;
    border-left: 1px solid #0d3990 !important;
}

.is-invalid { border: 2px solid red !important; }

.ficha-section-title {
    background-color: #08349c;
    font-weight: bold;
    text-transform: uppercase;
    color: #ffffff;
}

.no-border { border: none !important; }

.checkbox-label {
    display: inline-block;
    margin-top: 5px;
}

.footer-text {
    font-size: 12px;
    text-align: center;
    color: #ffffff !important;
    background-color: #08349c !important;
}

/* ===========================
   Área scrolleable de la ficha
   (ya NO cubre el header)
   =========================== */
#fichaScroll {
    position: relative;            /* en lugar de fixed */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    z-index: 1;                    /* por debajo de un header fixed-top (Bootstrap ~1030) */
    margin-top: var(--header-h);   /* empuja bajo el header */
    max-height: calc(100dvh - var(--header-h)); /* solo la ficha scrollea */
}

/* Ajustes internos */
#fichaScroll .ficha-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

#fichaScroll .table-responsive { overflow-x: auto; }

#fichaScroll .ficha-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    word-break: break-word;
}

#fichaScroll img,
#fichaScroll .img-fluid {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Evita que Bootstrap agregue padding al body con modales */
body.modal-open { padding-right: 0 !important; }

/* Utilidad opcional si tienes inputs de solo lectura "no clickeables" */
.no-pointer { pointer-events: none; }

/* Si tu header NO es fijo, puedes desactivar el margen y la altura:
#fichaScroll { margin-top: 0; max-height: none; }
*/
