/* Open Sans Regular */
@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/OpenSans-Regular.woff2') format('woff2'),
        url('../fonts/OpenSans-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Steamflix Montserrat Regular */
@font-face {
    font-family: 'SteamflixMontserrat';
    src: url('../fonts/SteamflixMontserrat.woff2') format('woff2'),
        url('../fonts/SteamflixMontserrat.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* Aplicación institucional */
body {
    font-family: 'Open Sans', Arial, sans-serif;
    font-weight: normal;
    color: #333;
}

h1,
h2,
h3,
.titulo {
    font-family: 'Steamflix Montserrat', sans-serif;
    font-weight: normal;
    color: #004080;
    /* azul institucional */
}

.background-image {
    position: fixed;
    top: 80%;
    right: 30px;
    width: 300px;
    transform: translateY(-40%);
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
}

#grandTotalBox {
    position: static;
    /* ya no flota */
    display: inline-block;
    background-color: rgba(25, 135, 84, 0.95);
    color: #fff;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(25, 135, 84, 0.7);
    font-weight: bold;
}

#toastBody {
    white-space: normal;/* permite saltos de línea */
    word-wrap: break-word;/* corta palabras largas si exceden el ancho */
}

[data-bs-theme="dark"] footer {
    color: rgba(255, 255, 255, 0.5) !important;
    margin-top: 50px;
    text-align: center;
    font-size: 0.95rem;
}

[data-bs-theme="light"] footer {
    color: rgba(33, 37, 41, 0.7) !important;
    margin-top: 50px;
    text-align: center;
    font-size: 0.95rem;
}

footer a {
    color: #25d366;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Tema oscuro */
[data-bs-theme="dark"] .totalInput[readonly] {
    background-color: #212529 !important;
    color: #f8f9fa !important;
}

/* Tema claro */
[data-bs-theme="light"] .totalInput[readonly] {
    background-color: #ffffff !important;
    color: #212529 !important;
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .background-image {
        width: 150px;
        /* más pequeño en pantallas pequeñas */
        right: 10px;
        /* margen reducido */
        bottom: 10px;
        /* lo colocas abajo para que no tape contenido */
        top: auto;
        /* anulas el top */
        transform: none;
        /* evitas el desplazamiento */
    }
}
/* Ajustes para selects e inputs dentro de la tabla */
table select.form-select,
table input.form-control {
    min-width: 90px;
    /* asegura que no se colapsen demasiado */
    width: 100%;
    /* ocupan todo el ancho de la celda */
    font-size: 0.9rem;
    /* fuente un poco más pequeña para móviles */
    padding: 0.25rem 0.5rem;
}

/* Tabla más compacta en móviles */
@media (max-width: 768px) {
    .table {
        font-size: 0.85rem;
        /* reduce fuente general de la tabla */
    }

    .table th,
    .table td {
        padding: 0.25rem;
        /* reduce padding para que quepa más contenido */
    }

    /* Ocultar columnas menos críticas en pantallas pequeñas */
    .table th.ojales-col,
    .table td.ojales-col,
    .table th.total-col,
    .table td.total-col {
        display: none;
    }
}

/* Tamaños estándar para columnas */
th.small-col,
td.small-col {
    max-width: 100px;
    width: 100px;
}

th.large-col,
td.large-col {
    max-width: 350px;
    width: 350px;
}

th.medium-col,
td.medium-col {
    max-width: 150px;
    width: 150px;
}

/* Inputs en cabecera */
th.medium-col input[type="number"] {
    max-width: 80px;
    font-size: 0.85rem;
    padding: 2px 4px;
    margin-bottom: 2px;
}

th.medium-col small {
    display: block;
    font-size: 0.7rem;
    line-height: 1.1;
}

/* Ajustes para pantallas pequeñas */
@media (max-width: 768px) {

    th.large-col,
    td.large-col {
        max-width: 200px;
    }

    th.medium-col input[type="number"] {
        max-width: 60px;
    }

    th.medium-col small {
        font-size: 0.65rem;
    }
}

/* Solo afecta tablas dentro de ampliaciones */
.ampliaciones-table th {
    vertical-align: middle !important;
    text-align: center;
}

.ampliaciones-table th.medium-col input[type="number"] {
    max-width: 80px;
    font-size: 0.85rem;
    padding: 2px 4px;
    margin-bottom: 2px;
    text-align: center;
}

.ampliaciones-table th.medium-col small {
    display: block;
    font-size: 0.7rem;
    line-height: 1.1;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {

    .ampliaciones-table th.large-col,
    .ampliaciones-table td.large-col {
        max-width: 200px;
    }

    .ampliaciones-table th.medium-col input[type="number"] {
        max-width: 60px;
    }

    .ampliaciones-table th.medium-col small {
        font-size: 0.65rem;
    }
}

