/* Common variables */

/* -------------------------------------------------------------------------- */
/*   CONVENCION DE BREAKPOINTS (Fase 1 - fundamentos responsive)              */
/*   Documentado, no aplicado via variables (CSS no permite var() dentro de   */
/*   @media). Usar estos valores LITERALES en todo @media nuevo:              */
/*                                                                            */
/*     Mobile        < 768px                                                 */
/*     Tablet         768px - 1023px   (@media (min-width: 768px))           */
/*     Desktop       >= 1024px         (@media (min-width: 1024px))          */
/*     Wide desktop  >= 1200px         (coincide con --layout-max-width)     */
/*                                                                            */
/*   768 y 1024 ya existen en el codigo (personaLogeada_header.css,          */
/*   personaLogeada.css) y coinciden con el set oficial de validacion        */
/*   (docs/responsive/03-entorno-validacion.md, seccion G). 1200 es el       */
/*   ancho maximo del contenedor global, no un breakpoint de reflow por si   */
/*   mismo. La regla legacy @media(min-width:992px) de personaLogeada.css    */
/*   se mantiene sin tocar en esta fase (pertenece a RE-024, Fase 2) para    */
/*   no introducir una segunda fuente de verdad a mitad de fase.             */
/* -------------------------------------------------------------------------- */

:root {
    --vt-blue: #35498F;
    --vt-orange: #EC9535;
    --vt-green: #9BC73E;
    --vt-lightblue: #61BDE4;
    --vt-smoke: #505050;

    /* Fundamentos responsive (Fase 1 / RE-016): fuente unica del ancho maximo
       de contenido y del gutter lateral. NO usar estas variables dentro de
       @media (max-width/min-width) - los breakpoints se mantienen como
       valores literales, ver docs/responsive/02-matriz-cobertura.md */
    --layout-max-width: 1200px;
    --layout-gutter: clamp(12px, 4vw, 32px);
}

/* Fase 1 (fundamentos responsive) - box-sizing global: NO IMPLEMENTADO.
   theme.css declara box-sizing:content-box explicitamente en 5 reglas
   (lineas ~1473,1845,3383,3704,8934) y border-box solo en 1 (linea ~75),
   evidencia de que el skin de PrimeFaces depende de un modelo de caja mixto
   e intencional a lo largo de sus ~12.000 lineas. Sin poder validar
   visualmente en esta fase (ver docs/responsive/03-entorno-validacion.md),
   forzar box-sizing:border-box de forma global es un riesgo de regresion no
   cuantificable en dialogs/inputs/tablas. Queda para revisar en Fase 2 con
   entorno navegable disponible. */

/* Common styles */
html,
body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Asegura que el cuerpo ocupe al menos la altura completa de la ventana */
}

/* RE-028: proteccion base para imagenes sin regla especifica. Baja
   especificidad - cualquier clase mas especifica (logos, iconos con ancho
   fijo, componentes PrimeFaces) sigue ganando por cascada. */
img {
    max-width: 100%;
    height: auto;
}

.root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-height: 100vh;
}

.main-layout {
    flex: 1;
    height: 100%;
    width: 100%;
    display: inline-grid;
    grid-template-columns: 1fr;
    grid-template-rows: min-content 1fr minmax(0, min-content);
    box-sizing: border-box;
}

.main-layout .layout-body {
    grid-column: 1;
    grid-row: 2;
    overflow-y: auto
}

.main-layout .layout-header {
    grid-column: 1;
    grid-row: 1;
}

.main-layout .layout-footer {
    grid-column: 1;
    grid-row: 3;
}


/* Annadir margen inferior al contenido para asegurarse de que el footer no cubra el contenido */
/*.main-content::after {*/
/*    content: "";*/
/*    display: block;*/
/*    height: 60px;  Altura del footer */
/*}*/

body .ui-breadcrumb {
    border: 0px !important;
}

h2 {
    color: var(--vt-blue);
    font-weight: 600;
    font-size: 20px;
    line-height: 24.2px;
}

h4 {
    color: var(--vt-blue);
    font-weight: 600;
    font-size: 14px;
    line-height: 24.2px;
}

/* Messages */

.errorMessage {
    font-weight: bold;
    color: red;
}

.infoMessage {
    font-weight: bold;
    color: green;
}

.datalabel {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 0.5em;

    label:nth-of-type(2) {
        padding-left: 0.25em;
        color: #00000050;
    }
}

.field {
    width: 100%;
}

.ui-float-label {
    font-style: italic;
}

.no-border {
    box-shadow: none !important;
    border: none !important;
}

.ancho-max {
    max-width: var(--layout-max-width);
    width: 100%;
    margin: 0 auto;
    align-items: center;
    padding-block: 10px;
    padding-inline: var(--layout-gutter);
}

*::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 10px;
    background-color: #d3d3d3;
    background-clip: content-box;
    -webkit-background-clip: content-box;
}


*::-webkit-scrollbar-thumb:hover {
    background-color: #d3d3d3;
    background-clip: border-box;
    -webkit-background-clip: border-box;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
    background-color: transparent;
}

.fondoAzulClaro {
    background-color: #EDF8FF !important;
}

.fuenteAzulOscuro {
    color: #35498F !important;
}

.fondoGrisClaro {
    background: #F2F2F2 !important;
}

.fuenteGrisOscuro {
    color: #505050 !important;
}

/* Para el spinner de carga*/
.centered-dialog {
    display: flex;
    justify-content: center;
}

/* para selects largos: grupo, subGrupo, categoria, ... */
.maxSelect {
    min-width: 100% !important;
    max-width: 100% !important;
}

/* RE-037: familia ".maxSelect-*" (main.css, cargado globalmente en todas las
   pantallas logueadas de los 4 modulos) fijaba min-width Y max-width al
   mismo valor con "!important", sin ningun "@media" - un select no puede
   reducirse nunca, ni siquiera en 320px. Verificado en theme.css que
   "body .ui-selectonemenu" no declara width/min-width/max-width, asi que no
   hay ningun selector competidor que justifique el "!important" original -
   se retira, y se agrega override mobile (sin "!important", no hace falta)
   para las variantes usadas realmente (356/180/418/770px; "-250" confirmada
   sin ningun consumidor en el repo, se deja igual por consistencia del
   bloque). Consumidores reales: nuevaOfertaLaboral_layout.xhtml,
   homeAgenda_layout.xhtml, modalAgenda.xhtml, seccionIdentificacion.xhtml,
   modalAgregarCapacitacion.xhtml, seccionDerivacionCapacitacion.xhtml,
   seccionDerivacionOrientacion.xhtml, seccionDerivacionInformacion.xhtml,
   busquedaPostulantes_layout.xhtml, modalAgregarArea.xhtml,
   modalAgregarTrayectoriaLaboral.xhtml (11 archivos: 2 Empresas, 8
   Institucional, 1 Personas - recontado y verificado). */
.maxSelect-356 {
    min-width: 356px;
    max-width: 356px;
}

.maxSelect-250 {
    min-width: 250px;
    max-width: 250px;
}

/*4 columnas*/
.maxSelect-180 {
    min-width: 180px;
    max-width: 180px;
}

.maxSelect-418 {
    min-width: 418px;
    max-width: 418px;
}

.maxSelect-770 {
    min-width: 770px;
    max-width: 770px;
}

@media (max-width: 767.98px) {
    .maxSelect-356,
    .maxSelect-250,
    .maxSelect-180,
    .maxSelect-418,
    .maxSelect-770 {
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }
}

.maxSelect .ui-inputfield,
.maxSelect-356 .ui-inputfield,
.maxSelect-250 .ui-inputfield,
.maxSelect-418 .ui-inputfield ,
.maxSelect-770 .ui-inputfield {
    text-overflow: ellipsis;
}

input::placeholder {
    color: lightgray;
    font-style: italic;
}

.info-label-title {
    padding-right: 10px;
}

.info-label-content {
    color: lightgray;
    font-style: italic;
}



/* -------------------------------------------------------------------------- */
/*                            ESTILOS - DATATABLES                            */
/* -------------------------------------------------------------------------- */

.default-table {
    margin-bottom:20px; 
    margin-top:20px;
}

.default-table th span {
    font-weight: bold !important;
    color: var(--vt-smoke);
}

.default-table table thead th {
    background-color: #C2E7FF;
    border-bottom: none;
}

.default-table table thead tr:first-child th:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.default-table table thead tr:first-child th:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}


/*para combos con opciones demasiado grandes*/
.selectPanelShort {
    max-width: 800px;   
}
.selectPanelShort li{
    white-space: normal !important;
}


/* ---------------------------------------------- */
/* --------------- LOADING DIALOG --------------- */
/* ---------------------------------------------- */
.loading-dialog > .ui-dialog-titlebar, .loading-dialog > .ui-dialog-content {
    color: #35498F !Important
}

.loading-dialog .ui-dialog-content {
    overflow: hidden;
}

/* -------------------------------------------------------------------------- */
/*                          ESTILOS - SUBIDA ARCHIVO                          */
/* -------------------------------------------------------------------------- */

.contenedorArchivo {
    border: 1px solid #D5D1D1; 
}

.bloqueInformacionArchivo {
    border-bottom: 1px solid #D5D1D1; 
    background-color: #D2EDFF;
}

.textoFinoAzul {
    font-family: Inter !important;
    font-size: 15px !important;
    font-weight: 400;
    line-height: 22.5px;
    text-align: left;
    color: #35498F;
}

.uploadGrid {
    border: 1px solid #D2EDFF;
    border-radius: 10px;
    background-color: #D2EDFF;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.uploadButton .ui-button {
    border: 1px solid #87C8FF;
    background-color: #fff;
    color: #35498F;
}

.btn-margin-horizontal {
    margin-left: 1px !important;
    margin-right: 1px !important;
}

.btns-panelgrid .ui-panelgrid-cell {
    padding-left: 8px;
    padding-right: 8px;
}

/* Cuando está activado */
.toggle-si-no.p-toggleswitch-checked .p-toggleswitch-slider::before {
    color: white;
}

.toggle-si-no.p-toggleswitch-checked .p-toggleswitch-slider::after {
    color: rgba(255,255,255,.5);
}

/* Cuando está desactivado */
.toggle-si-no:not(.p-toggleswitch-checked) .p-toggleswitch-slider::before {
    color: rgba(0,0,0,.4);
}

.toggle-si-no:not(.p-toggleswitch-checked) .p-toggleswitch-slider::after {
    color: white;
}

.bloque-discapacidad {
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
}

/* -------------------------------------------------------------------------- */
/*  RE-003 / RE-004 / RE-011 / RE-015 - MECANICA COMPARTIDA DEL MENU MOVIL     */
/*  Usada por header.css (publico) y por las 3 copias de loged_header.css     */
/*  (comun, empresas-war, institucional-war). Clases nuevas (.nav-toggle,     */
/*  .nav-open, .nav-drawer-open) sin colision con CSS existente, por eso se   */
/*  centralizan aqui una unica vez. El colapso/drawer de ".menu" en si vive   */
/*  en cada header.css/loged_header.css porque ahi es donde ya existe una     */
/*  regla ".menu" con la que hay que competir por orden de cascada.           */
/* -------------------------------------------------------------------------- */
.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin-left: auto;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.nav-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Bloquea el scroll de fondo mientras el drawer movil esta abierto */
body.nav-drawer-open {
    overflow: hidden;
}

@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }
}