/* Both navigation rows remain one sticky unit, including when tabs wrap. */
html { scroll-padding-top: var(--altoNavegacion, 145px); }
[data-staff-only][hidden] { display:none!important; }
input:disabled,button:disabled { opacity:.55; cursor:not-allowed; }
#ticketDocumento { white-space:pre-line; overflow-wrap:anywhere; }
#ticketNum { overflow-wrap:anywhere; text-align:right; }
/* PTS taken from the institutional site's logo-ceca.png; crop its wordmark
   with layout only, preserving the original image and monogram proportions. */
#navegacionFija > header > div:first-child > a > div:first-child:has(.pts-logo-institucional) {
  position:relative!important;
  flex:0 0 48px!important;
  width:48px!important;
  height:50px!important;
  padding:0!important;
  overflow:hidden!important;
  background:transparent!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.pts-logo-institucional {
  position:absolute!important;
  display:block!important;
  left:50%!important;
  top:0!important;
  transform:translateX(-50%)!important;
  width:80px!important;
  max-width:none!important;
  height:auto!important;
}
@media print {
  @page { size:A4; margin:15mm; }
  body.imprimiendo-boleta { min-height:0!important; display:block!important; }
  body.imprimiendo-boleta *:not(#printArea):not(#printArea *):not(:has(#printArea)) { display:none!important; }
  body.imprimiendo-boleta :has(#printArea) { display:block!important; padding:0!important; margin:0!important; min-height:0!important; max-width:none!important; width:100%!important; }
  body.imprimiendo-boleta #printArea { position:static!important; width:100%!important; border:2px solid #043832!important; padding:20px!important; margin:0!important; }
  #printArea,#printArea * { visibility:visible!important; }
}
#navegacionFija {
  position: sticky;
  top: 0;
  z-index: 45;
  flex: 0 0 auto;
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 7px rgb(4 56 50 / 10%);
}
#navegacionFija > header {
  position: static !important;
  width: 100%;
  overflow: visible;
}
#navegacionFija > header > div:first-child {
  height: auto;
  min-height: 64px;
  gap: 22px;
  padding-top: 8px;
  padding-bottom: 8px;
}
#navegacionFija > header > div:first-child > a {
  flex: 0 0 auto;
  gap: 12px;
  margin: 0;
  padding: 0;
  min-width: 0;
  text-decoration: none;
}
#navegacionFija > header > div:first-child > a > div:first-child {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
#navegacionFija > header > div:first-child > a > div:first-child svg {
  display: block;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
}
#navegacionFija > header > div:first-child > a > div:nth-child(2) {
  margin: 0;
  min-width: 0;
}
#navegacionFija > header > div:first-child > a span {
  white-space: nowrap;
  line-height: 1.4;
}
#navegacionFija > header nav {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
  column-gap: 22px;
}
#navegacionFija > header nav > a {
  flex: 0 0 auto;
  margin: 0 !important;
  white-space: nowrap;
}
#navegacionFija > header > div:first-child > div:last-child {
  flex: 0 0 auto;
}
#navegacionFija > section > div > div {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  overflow: visible !important;
  padding-top: 10px;
  padding-bottom: 10px;
}
#navegacionFija .tab-btn {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 42px;
  gap: 8px;
  padding: 9px 12px;
  white-space: normal !important;
  text-align: left;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
#navegacionFija .tab-btn > svg,
#navegacionFija .tab-btn > i {
  flex: 0 0 auto;
}
#navegacionFija .tab-btn > span:first-of-type {
  min-width: 0;
  white-space: normal;
}
#navegacionFija .tab-btn > span:not(:first-of-type) {
  flex: 0 0 auto;
}
#atomEstadoConexion,
#atomEstadoCatalogo:not(:empty) {
  padding: 12px 15px;
  border: 1px solid #cbded7;
  border-radius: 8px;
  background: #f0f7f4;
  color: #255b4c;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
#atomEstadoConexion { margin-bottom: 18px; }
#atomEstadoCatalogo:not(:empty) { margin-top: 12px; }
#atomEstadoConexion[hidden], #atomEstadoCatalogo[hidden] { display: none !important; }
#atomEstadoConexion[data-state="error"],
#atomEstadoCatalogo[data-state="error"] {
  color: #785423;
  background: #fff9ed;
  border-color: #e6d5ae;
}

/* Fonds open into individually selectable published records. */
.atom-tree-root { border:1px solid #dbe5e1; border-radius:8px; margin:10px 0; overflow:hidden; }
.atom-tree-root > .atom-tree-line { background:#f2f7f5; padding:12px; }
.atom-tree-line { display:flex; align-items:flex-start; gap:10px; font-size:12px; }
.atom-tree-record { border-bottom:1px solid #eee; padding:12px 0; }
.atom-tree-record:last-child { border-bottom:0; }
.atom-tree-line input { flex:0 0 auto; width:16px; height:16px; margin-top:2px; accent-color:#043832; }
.atom-tree-title { flex:1 1 auto; min-width:0; text-align:left; color:#043832; line-height:1.6; overflow-wrap:anywhere; }
.atom-tree-root > .atom-tree-line > .atom-tree-title { font-weight:700; }
.atom-tree-toggle { flex:0 0 24px; font-size:20px; line-height:20px; color:#043832; }
.atom-tree-level { flex:0 0 auto; color:#78716c; font-size:10px; max-width:135px; }
.atom-tree-ficha { flex:0 0 auto; color:#043832; text-decoration:underline; font-size:11px; }
.atom-tree-children { margin:0 14px 0 24px; padding:0 0 0 14px; border-left:2px solid #dbe5e1; }
.atom-tree-summary { padding:12px 0; color:#50675f; font-size:11px; }
.atom-tree-more { margin:14px 0; }
#catalogoResultados { scroll-margin-top:16px; }
#atomExplorador { min-width:0; }
#atomTarjetas { min-width:0; }
.atom-tree-open-records { flex:0 0 auto; color:#043832; text-decoration:underline; font-size:11px; }
.atom-fondo-con-tarjetas { display:grid; grid-template-columns:minmax(260px, .85fr) minmax(0, 2fr); gap:20px; align-items:start; }
.atom-fondo-con-tarjetas > #arbolFondos { max-height:540px; overflow:auto; overscroll-behavior:contain; }
.atom-fondo-con-tarjetas #gridCatalogo { grid-template-columns:repeat(2,minmax(0,1fr)); }
.atom-fondo-con-tarjetas .atom-tree-line { flex-wrap:wrap; gap:7px; }
.atom-fondo-con-tarjetas .atom-tree-title { flex-basis:calc(100% - 44px); }
.atom-fondo-con-tarjetas .atom-tree-level { margin-left:30px; }
.atom-fondo-con-tarjetas .atom-tree-children { margin-left:0; margin-right:0; padding-left:9px; }
#gridCatalogo .line-clamp-4 { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:4; overflow:hidden; }
@media (max-width:899px) {
  .atom-fondo-con-tarjetas { grid-template-columns:minmax(0,1fr); }
  .atom-fondo-con-tarjetas > #arbolFondos { max-height:300px; }
}
@media (max-width:639px) {
  .atom-fondo-con-tarjetas #gridCatalogo { grid-template-columns:minmax(0,1fr); }
}
.atom-draft-badge { display:inline-block; align-self:flex-start; padding:3px 7px; color:#805b16; background:#fff7df; border:1px solid #e8d4a4; border-radius:4px; font-size:10px; line-height:1.5; }
.atom-tree-title:focus-visible,.atom-tree-toggle:focus-visible,.atom-tree-ficha:focus-visible { outline:2px solid #043832; outline-offset:3px; }
@media (max-width:639px) {
  .atom-tree-line { flex-wrap:wrap; gap:8px; }
  .atom-tree-title { flex-basis:calc(100% - 44px); }
  .atom-tree-level { margin-left:32px; }
  .atom-tree-children { margin-left:8px; padding-left:8px; }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  html { scroll-padding-top: var(--altoNavegacion, 180px); }
  #navegacionFija > header > div:first-child {
    flex-wrap: wrap;
    gap: 8px 24px;
  }
  #navegacionFija > header > div:first-child > a {
    flex: 1 1 auto;
  }
  #navegacionFija > header nav {
    display: flex;
    flex: 1 0 100%;
    order: 3;
    justify-content: space-between;
    gap: 16px;
    padding: 2px 0;
  }
}

@media (max-width: 1023px) {
  #navegacionFija > header > div:first-child { gap: 14px; }
  #navegacionFija .tab-btn { font-size: 11px; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: var(--altoNavegacion, 205px); }
  #navegacionFija > section > div > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  #navegacionFija .tab-btn {
    min-height: 48px;
    padding: 8px 9px;
    gap: 7px;
    font-size: 11px;
  }
  #navegacionFija > header > div:first-child > a {
    gap: 9px;
  }
  #navegacionFija > header > div:first-child > a > div:first-child {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    padding: 3px;
  }
  #navegacionFija > header > div:first-child > a > div:first-child svg {
    flex-basis: 31px;
    width: 31px;
    height: 31px;
  }
}

@media (max-width: 639px) {
  #navegacionFija > header > div:first-child {
    min-height: 60px;
    gap: 10px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  #navegacionFija > header > div:first-child > a > div:nth-child(2) {
    display: block;
    max-width: 185px;
  }
  #navegacionFija > header > div:first-child > a span:first-child {
    font-size: 10px;
    letter-spacing: .035em;
    white-space: normal;
  }
  #navegacionFija > header > div:first-child > a span:last-child {
    font-size: 9px;
    letter-spacing: .1em;
  }
  #navegacionFija > header > div:first-child > div:last-child {
    gap: 7px;
  }
  #navegacionFija > header > div:first-child > div:last-child > button {
    margin: 0 !important;
  }
  #navegacionFija > section > div {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 390px) {
  #navegacionFija > header > div:first-child {
    padding-left: 12px;
    padding-right: 12px;
    gap: 8px;
  }
  #navegacionFija > header > div:first-child > a > div:nth-child(2) {
    max-width: 130px;
  }
  #navegacionFija > header > div:first-child > div:last-child { gap: 2px; }
  #navegacionFija > header > div:first-child > div:last-child > button { padding: 5px; }
}

@media print {
  #navegacionFija { display: none !important; }
  #atomEstadoConexion, #atomEstadoCatalogo { display: none !important; }
}
