body {
    height: 100dvh !important;
    width: 100dvw !important;
    overflow-x: hidden !important;
    /* Base typography scaling */
    font-size: 14px;
    line-height: 1.5;
}

header {
    width: 100% !important;
}

.navbar > .container {
    display: contents !important;
}

#logoCliente {
    float: left !important;
}
/* Personalización de Modal */
.modal-content,
.modal-view-content {
    background-color: #f8f9fa; /* Fondo claro */
}

.modal-generic-content {
    background-color: lemonchiffon; /* Fondo claro */
}

.modal-generic-content,
.modal-content {
    border: 1px solid #107A00; /* Borde verde */
}

.modal-header {
    color: #107A00; /* Texto verde */
}

.modal-footer .btn {
    background-color: #107A00; /* Botón verde */
    color: white; /* Texto blanco */
    border: none;
}

    .modal-footer .btn:hover {
        background-color: #005e00; /* Botón verde oscuro en hover */
    }

/* Personalización de Acordeón */
.accordion-button {
    background-color: #f7f3f4; /* Fondo gris */
    color: #107A00; /* Texto verde */
    font-weight: bold;
    border: 1px solid #107A00; /* Borde verde */
}

    .accordion-button:not(.collapsed) {
        background-color: #f7f3f4; /* Fondo verde oscuro cuando está expandido */
        color: #107A00; /* Texto blanco */
    }

    .accordion-button i {
        color: white; /* Color de la flecha */
    }

.accordion-body {
    background-color: #f8f9fa; /* Fondo claro para el contenido */
    color: #333; /* Texto oscuro */
}

.accordion-button:hover {
    background-color: #005e00; /* Fondo verde oscuro en hover */
    color: white; /* Texto blanco en hover */
}

.accionesVista,
.botonAccionesVistaEmpleado,
.iconoBotonAccionesVistaEmpleado,
.accionesVistaGeneral, .loggedUser {
    float: right;
}

.managerButtons {
    padding: 0.35% 0 0 0.5%;
}

.botonAccionesVista {
    vertical-align: top;
    height: 6.9dvh !important;
}

.iconoBotonAccionesVista,
.botonAccionesVistaEmpleado,
.iconoBotonAccionesVistaEmpleado {
    color: #107A00;
    padding: 3px 3px 3px 3px;
}

.iconoBotonAccionesVistaGestor {
    color: #ffc107;
    padding: 3px 3px 3px 3px;
}

.centeredElement {
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex !important;
}

.centeredModalViewElement {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
}

#GridTablaDetalle {
    width: 100%;
    height: 75dvh !important;
    background-color: beige;
}

.centeredContent {
    margin-left: auto;
    margin-right: auto;
    display: flow-root;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.centeredDiv {
    margin: auto auto auto auto !important;
    justify-content: center;
    display: table !important;
}

.loginDiv {
    padding-top: 12dvh !important;
    padding-bottom: 12dvh !important;
}

.centeredSesion {
    justify-content: center;
    height: 100% !important;
    width: 100% !important;
}

.captiaFooter {
    border-top: 5px solid #107A00 !important;
    background-color: white;
    width: 100% !important;
}

.captiaFooterContainer,
.captiaFooter {
    float: right !important;
}

.captiaFooterContainer {
    text-align: right !important;
    font-size: small;
    padding-top: 0.5rem;
}

.captiaHeaderContainer {
    border-bottom: 5px solid #107A00 !important;
}

div .form-control[name*="content"]:not(.is-invalid) {
    background-color: transparent;
    border: 0px solid;
}

.DataViewConfig,
.DataView {
    margin-left: auto;
    margin-right: auto;
    z-index: 0 !important;
}

.DataViewConfig {
    max-height: 95% !important;
}

.DataView {
    width: 100% !important;
}

.mandatoryField {
    color: red !important;
}

.configurationPanelItemMargin {
    margin-left: 3% !important;
    width: 90%;
}

.configurationPanelOptionItem {
    margin-left: 1% !important;
}

.configurationPanelItemTitle {
    border: 2px solid !important;
    border-color: white !important;
    background-color: #107A00 !important;
    color: #FFDD00 !important;
}

.configurationPanelItemButton {
    margin-top: auto !important;
    margin-bottom: auto !important;
    width: 10% !important;
    color: #107A00;
    display: contents;
}

.btn-successJD {
    color: #fff;
    background-color: #107A00;
    border-color: #107A00;
}

    .btn-successJD:hover {
        background-color: #f5e200 !important;
        color: #107A00 !important;
    }

.formItemContent {
    border: 0.5px solid grey !important;
    margin-bottom: 1% !important;
}

input[type="file"]:focus {
    background-color: #ffc107 !important;
    color: white !important;
}

.botonCaptia,
.iconoBotonAccionesVistaEmpleado{
    color: #107A00;
}

    .botonCaptia:hover,
    .iconoBotonAccionesVistaEmpleado:hover {
        color: #FFDD00;
        background-color: #107A00;
    }

.iconoBotonAccionesVistaGestor:hover {
    color: #107A00;
    background-color: #FFDD00;
}

.iconoBotonAccionesVista:hover {
    color: #FFDD00;
    background-color: #107A00;
}

.iconoCaptia {
    padding: 2px 2px 2px 2px
}

#configurationPanel {
    width: 100%;
    height: 78dvh;
    display: inline-block;
    overflow-y: auto !important;
}

.iconText {
    font-size: small;
    display: flex;
}

/* Responsive additions: global helpers and breakpoint-specific overrides
   These rules assume Bootstrap is loaded (wwwroot/lib/bootstrap) and provide
   extra overrides to make the app behave well on mobile, tablet and desktop.

   Breakpoints follow Bootstrap 4/5 conventions:
     - xs: <576px
     - sm: >=576px
     - md: >=768px
     - lg: >=992px
     - xl: >=1200px
*/
/* Make images and media fluid by default */
img, .img-fluid {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility: hide on small, show on large, etc. */
.d-none-mobile {
    display: none !important;
}

.d-block-mobile {
    display: block !important;
}

/* Header tweaks to keep logo and user area responsive */
.captiaHeaderContainer #logoCliente img {
    max-height: 60px;
    width: auto;
}

/* Ensure main content uses full width under small devices */
#webMain, #content {
    width: 100%;
    box-sizing: border-box;
}

/* Tables responsiveness fallback: allow horizontal scrolling on small screens */
.table-responsive-fix {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.configurationPanelItem {
    display: inline;
    float: left;
    width: 28%;
    height: 100%;
}

.DataViewConfig.configurationPanelItem {
    display: inline;
    float: left;
    width: 44%;
    height: 100%;
}
/* ===== Mobile first styles (applies to xs/sm by default) ===== */
/* Adjustments applied to phones (portrait) */
@media (max-width: 1021px) {

    .configurationPanelItem {
        float: none !important;
        width: 100% !important;
        height: 100% !important;
    }
}

@media (max-width: 575.98px) {
    body {
        font-size: 15px; /* slightly larger for readability on small devices */
    }

    /* Collapse header layout for mobile */
    .captiaHeaderContainer .navbar-collapse {
        display: none !important; /* default hidden, Bootstrap toggle will show */
    }

    .d-none-mobile {
        display: none !important;
    }

    .d-block-mobile {
        display: block !important;
    }

    /* Make control areas stack vertically */
    .centeredSesion header nav .container {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* ===== Tablet: small landscape and tablets ===== */
@media (min-width: 576px) and (max-width: 767.98px) {
    body {
        font-size: 14px;
    }

    .captiaHeaderContainer .navbar-collapse {
        display: block !important;
    }

    .captiaHeaderContainer #logoCliente img {
        max-height: 64px;
    }
}

/* ===== Desktop: medium and up ===== */
@media (min-width: 768px) {
    body {
        font-size: 14px;
    }

    .captiaHeaderContainer .navbar-collapse {
        display: block !important;
    }

    .d-none-mobile {
        display: block !important;
    }

    .d-block-mobile {
        display: none !important;
    }

    /* Wider container adjustments */
    .centeredContent {
        margin: 0 auto;
    }
}

/* ===== Larger desktops ===== */
@media (min-width: 1200px) {
    body {
        font-size: 15px;
    }

    .captiaHeaderContainer #logoCliente img {
        max-height: 70px;
    }
}

/* Accessibility helpers: increase tap targets on mobile */
@media (max-width: 767.98px) {
    .btn, button, .nav-link {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }

    #GridTablaDetalle {
        height: 65dvh;
    }
}

/* Utility to force tables to behave on small screens (apply wrapper .table-responsive-fix) */
.table.table-striped, .table.table-bordered {
    width: 100%;
    table-layout: auto;
}

/* Small form inputs full width on mobile */
@media (max-width: 575.98px) {
    .form-control {
        width: 100%;
    }

    #GridTablaDetalle {
        height: 65dvh;
    }

    .managerButtons {
        width: 40% !important;
    }

    .accionesVistaGeneral {
        float: left !important;
    }

    .loginDiv {
        height: 81dvh !important;
        padding-top: 12dvh !important;
        padding-bottom: 12dvh !important;
    }
}

/* End of responsive additions */

/* =====================================================
   Force a 67% zoom when the screen/device is using ~150% scale
   This applies to the entire page so ag-grid, modals, bootstrap elements,
   and datepickers are all affected. We use transform + width compensation
   and include zoom fallback for browsers that support it.
   Note: this is aggressive and will change layout calculations; test pages
   and adjust if you need per-component exceptions.
   ===================================================== */
@media (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (min-resolution: 1.5dppx), (min-resolution: 144dpi) {

    .centeredSesion {
        zoom: 0.61 !important;
    }

    #GridTablaDetalle, #configurationPanel {
        height: 105dvh !important;
    }

    /* Fix fixed-position elements that may need to remain anchored visually
     (optionally you can exclude certain fixed elements by adding a class like .no-scale) */
    .no-scale {
        /* undo scaling for specific elements if needed */
        -webkit-transform: none !important;
        transform: none !important;
        zoom: 1 !important;
    }

    .loginDiv {
        padding-top: 21dvh !important;
        padding-bottom: 12dvh !important;
    }

    .centeredDiv {
        height: 138dvh !important;
    }

    #headerSolicitud {
        margin-top: 1% !important;
        margin-bottom: 0.7% !important;
    }

    @media (max-width: 600px) {
        .configurationPanelItem {
            float: none !important;
            width: 100% !important;
            height: 100% !important;
        }
    }

    /* @media (min-height:720px) and (max-height:1023px) {
        #GridTablaDetalle, #configurationPanel {
            height: 115dvh !important;
        }
    }

    @media (min-height:1024px) and (max-height:1368px) {
        #GridTablaDetalle, #configurationPanel {
            height: 90dvh !important;
        }
    }*/

    @media (min-width: 344px) and (max-width:375px) {
        #GridTablaDetalle, #configurationPanel {
            height: 123dvh !important;
        }
    }

    @media (min-width: 390px) and (max-width:411px) {
        #GridTablaDetalle, #configurationPanel {
            height: 128dvh !important;
        }
    }

    @media (min-width: 412px) and (max-width:430px) {
        #GridTablaDetalle, #configurationPanel {
            height: 124dvh !important;
        }
    }

    @media (min-width: 431px) and (max-width: 539px) {
        #GridTablaDetalle, #configurationPanel {
            height: 128dvh !important;
        }
    }

    @media (min-width: 540px) and (max-width: 767px) {
        #GridTablaDetalle, #configurationPanel {
            height: 125dvh !important;
        }
    }

    @media (min-width: 768px) and (max-width: 799px) {
        #GridTablaDetalle, #configurationPanel {
            height: 117dvh !important;
        }
    }

    @media (min-width:800px) and (max-width: 819px) {
        #GridTablaDetalle, #configurationPanel {
            height: 93dvh !important;
        }
    }

    @media (min-width:820px) and (max-width: 852px) {
        #GridTablaDetalle, #configurationPanel {
            height: 100dvh !important;
        }
    }

    @media (min-width:853px) and (max-width: 911px) {
        #GridTablaDetalle, #configurationPanel {
            height: 93dvh !important;
        }
    }

    @media (min-width:912px) and (max-width: 1279px) {
        #GridTablaDetalle, #configurationPanel {
            height: 87dvh !important;
        }
    }

    @media (min-width:1024px) and (max-height: 600px) {
        #GridTablaDetalle, #configurationPanel {
            height: 123dvh !important;
        }
    }

    @media (min-width:1280px) {
        #GridTablaDetalle, #configurationPanel {
            height: 124dvh !important;
        }
    }

    @media (min-width: 768px) and (max-width: 1023px) and (max-height: 586px){
        #GridTablaDetalle, #configurationPanel {
            height: 120dvh !important;
        }

        .DataView {
            height: 138dvh !important;
        }
    }
}

/* End of 67% zoom rules for 150% scaled screens */

.captia-ag-cell-center {
    text-align: center !important;
}
