/* Rediseño (redesign-riel-nocturno.mdc) · 1 · Barra del cotizador.
   Una sola barra azul marino: logo, secciones con desplegable y herramientas. Debajo, las pestañas de la sección
   (rn-nav.js). Mismo marcado de navbar.tpl: no cambian clases de JS (navbar-toggler, navbarSupportedContent,
   nav-backdrop, data-toggle, language-option, header-bell). Corte del celular en 991.98px, como nav_mobile.js. */

.site-chrome {
  --lv-header: var(--rn-bar);
  background: var(--rn-bar);
  box-shadow: none;
}

.site-chrome .logoimg {
  height: 22px;
}

.site-chrome .logotext {
  font-size: 11.5px;
  letter-spacing: 0.24em;
  margin-left: 14px;
}

/* Desplegables: hoja blanca de 12 px, ítems de 38 px con ícono. */
.site-chrome .dropdown-menu {
  min-width: 250px;
  padding: 6px;
  border: 0;
  border-radius: 12px;
  box-shadow: var(--rn-shadow-menu);
}

.site-chrome .dropdown-item,
.site-chrome .dropdown-menu button.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: var(--rn-radius-button);
  color: var(--rn-ink-2);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}

.site-chrome .dropdown-item:hover,
.site-chrome .dropdown-item:focus,
.site-chrome .dropdown-menu button.dropdown-item:hover,
.site-chrome .dropdown-menu button.dropdown-item:focus,
.site-chrome .dropdown-menu button.dropdown-item:active {
  background: var(--rn-surface-tint);
  color: var(--rn-ink);
}

.site-chrome .dropdown-item.rn-cur {
  background: var(--rn-surface-selected);
  color: var(--rn-ink);
}

.site-chrome .rn-ico {
  flex: none;
  width: 16px;
  font-size: 15px;
  text-align: center;
  color: var(--rn-ink-muted);
}

.site-chrome .rn-count {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--rn-danger);
  color: #ffffff;
  font: 700 11px/20px var(--rn-font-sans);
  text-align: center;
}

.site-chrome .dropdown-divider {
  margin: 6px 4px;
  border-top-color: var(--rn-line);
}

.site-chrome .header-bell-count {
  background: var(--rn-danger);
}

/* ---------- Escritorio: una sola barra ---------- */
@media screen and (min-width: 992px) {
  .site-chrome {
    display: flex;
    align-items: center;
    height: var(--rn-size-bar);
    padding: 0 18px 0 24px;
  }

  /* El logo y las herramientas quedan a los costados de las secciones. */
  /* !important: el div trae .d-flex de Bootstrap, que también lo es. */
  .site-chrome .logo {
    display: contents !important;
  }

  .site-chrome .logo > a {
    order: 0;
    flex: none;
    margin-right: 18px;
  }

  .site-chrome .header-actions {
    order: 2;
    margin-left: auto;
    gap: 8px;
  }

  .site-chrome .navbar {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    height: var(--rn-size-bar);
    padding: 0 !important;
    border: 0;
    background: transparent !important;
  }

  .site-chrome .navbar .container-fluid,
  .site-chrome .navbar-collapse {
    width: auto;
    max-width: none;
    height: 100%;
    margin: 0;
    padding: 0;
  }

  .site-chrome .navbar-nav {
    height: 100%;
    gap: 2px;
    margin-left: 0;
  }

  .site-chrome .navbar-nav > .nav-item {
    position: relative;
    display: flex;
    align-items: center;
  }

  .site-chrome .navbar-nav > .nav-item:hover,
  .site-chrome .navbar-nav > .nav-item.show {
    background: transparent;
  }

  .site-chrome .navbar-light .navbar-nav .nav-link,
  .site-chrome .navbar-dark .navbar-nav .nav-link,
  .site-chrome .navbar-nav .nav-link {
    height: 36px;
    padding: 0 11px !important;
    border-radius: var(--rn-radius-button);
    color: var(--rn-on-bar-muted) !important;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
  }

  .site-chrome .navbar-nav .nav-link:hover,
  .site-chrome .navbar-nav .nav-link:focus-visible,
  .site-chrome .navbar-nav .show > .nav-link,
  .site-chrome .navbar-nav > .nav-item:hover > .nav-link,
  .site-chrome .navbar-nav > .rn-on > .nav-link {
    background: var(--rn-on-bar-hover);
    color: var(--rn-on-bar) !important;
  }

  .site-chrome .navbar-nav > .rn-on > .nav-link {
    background: transparent;
  }

  /* La sección actual: línea blanca de 2 px abajo. */
  .site-chrome .navbar-nav > .rn-on::after {
    content: "";
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: 0;
    height: 2px;
    background: var(--rn-on-bar);
  }

  /* Los desplegables se abren solo con clic (Bootstrap), como en producción: con hover y :focus-within
     quedaban dos abiertos a la vez (Phil, 05/11/2026: «se superponen los dropdowns»). */
  .site-chrome .navbar-nav > .nav-item > .dropdown-menu {
    top: calc(100% - 6px);
  }

  .site-chrome .navbar-nav > .mi-cuenta > .dropdown-menu {
    left: auto;
    right: 0;
  }

  .site-chrome .activeuser {
    max-width: 220px;
    white-space: normal !important; /* el <p> trae .text-nowrap de Bootstrap */
    line-height: 1.25;
    text-align: right;
    padding-right: 6px;
    color: var(--rn-on-bar-muted);
    font-size: 12.5px;
    letter-spacing: 0;
  }

  .site-chrome .header-actions .header-bell {
    width: 38px;
    height: 38px;
    margin: 0;
    border-radius: var(--rn-radius-button);
  }

  .site-chrome .header-bell:hover {
    background: var(--rn-on-bar-hover);
  }

  .site-chrome .lang-drop-header summary {
    height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--rn-radius-button);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
  }

  .site-chrome .lang-drop-header summary:hover,
  .site-chrome .lang-drop-header summary:focus,
  .site-chrome .lang-drop-header[open] summary {
    background: var(--rn-on-bar-hover);
  }
}

/* Foco con teclado: anillo blanco sobre la barra, navy sobre blanco. */
.site-chrome .nav-link:focus-visible,
.site-chrome .header-bell:focus-visible,
.site-chrome .lang-drop-header summary:focus-visible,
.site-chrome .logo > a:focus-visible,
.site-chrome .navbar-toggler:focus-visible {
  outline: 2px solid var(--rn-on-bar);
  outline-offset: 2px;
  box-shadow: none;
}

.site-chrome .dropdown-menu .dropdown-item:focus-visible,
.rn-subtabs a:focus-visible {
  outline: 2px solid var(--rn-navy);
  outline-offset: -2px;
}

@media screen and (max-width: 991.98px) {
  .site-chrome .dropdown-menu .dropdown-item:focus-visible {
    outline-color: var(--rn-on-bar);
  }
}

/* Con poco ancho, el nombre del usuario va solo en «Mi cuenta» y el logotipo deja lugar a las secciones. */
@media screen and (min-width: 992px) and (max-width: 1439.98px) {
  .site-chrome .activeuser {
    display: none;
  }
}

@media screen and (min-width: 992px) and (max-width: 1279.98px) {
  .site-chrome .logotext {
    display: none;
  }

  .site-chrome .navbar-light .navbar-nav .nav-link,
  .site-chrome .navbar-dark .navbar-nav .nav-link,
  .site-chrome .navbar-nav .nav-link {
    padding: 0 8px !important;
    font-size: 13px;
  }

  .site-chrome .navbar-nav > .rn-on::after {
    left: 8px;
    right: 8px;
  }
}

/* ---------- Pestañas de la sección ---------- */
.rn-subtabs {
  border-bottom: 1px solid var(--rn-line-strong);
}

.rn-subtabs-in {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  width: 90%;
  max-width: 1500px;
  margin: 0 auto;
}

.rn-subtabs a {
  display: inline-flex;
  align-items: center;
  min-height: var(--rn-size-subtabs);
  color: var(--rn-ink-muted);
  font-family: var(--rn-font-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.rn-subtabs a:hover {
  color: var(--rn-ink);
  text-decoration: none;
}

.rn-subtabs a[aria-current="page"] {
  color: var(--rn-ink);
  box-shadow: inset 0 -2px 0 var(--rn-navy);
}

/* ---------- Celular: barra de 56 px y menú con las secciones como acordeones ---------- */
@media screen and (max-width: 991.98px) {
  .site-chrome .logo {
    min-height: 56px;
    padding: 0 6px 0 16px;
  }

  .site-chrome .logoimg {
    height: 20px;
  }

  .site-chrome .logotext {
    margin-left: 10px;
    font-size: 11px;
    letter-spacing: 0.16em;
  }

  .site-chrome .navbar-light .navbar-nav .nav-link,
  .site-chrome .navbar-dark .navbar-nav .nav-link,
  .site-chrome .navbar-nav .nav-link {
    min-height: 50px;
    padding: 0 16px !important;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
  }

  .site-chrome .dropdown-item,
  .site-chrome .dropdown-item:hover,
  .site-chrome .dropdown-item:focus,
  .site-chrome .dropdown-item:active,
  .site-chrome button.dropdown-item {
    min-height: 44px;
    padding: 0 12px !important;
    border-radius: var(--rn-radius-button);
    color: var(--rn-on-bar-muted) !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
  }

  .site-chrome .dropdown-item::before {
    content: none;
  }

  .site-chrome .dropdown-item.rn-cur {
    background: var(--rn-on-bar-hover) !important;
    color: var(--rn-on-bar) !important;
    font-weight: 600;
  }

  .site-chrome .rn-ico {
    color: inherit;
    opacity: 0.75;
  }

  .site-chrome .navbar-nav .dropdown-menu,
  .site-chrome .navbar-nav .dropdown-menu.show {
    padding: 0 8px 8px !important;
    border-radius: 0;
  }

  .rn-subtabs {
    display: none;
  }
}

/* Con pestañas de sección, las migas repetían lo mismo justo abajo: se ocultan en escritorio.
   En celular no hay pestañas, así que las migas se quedan. Sin pestañas (secciones de un solo link), también. */
@media screen and (min-width: 992px) {
  html.rn-has-subtabs .breadbar {
    display: none !important;
  }
}

/* ---------- Cuenta en el nombre (Phil 10/11/2026) ---------- */
/* «Mi cuenta» salía como una sección más entre el logo y la campana, y el nombre iba suelto como «Usuario: …». En computadora
   el nombre es el botón de la cuenta, al final de la barra (campana · cuenta · idioma desde el 10/11/2026; antes campana · idioma · cuenta: «es raro un drop, una campana, un drop»).
   Mismos ítems (navbar.tpl, {capture} rn_account_menu). Hasta 1439 px queda el círculo con las iniciales, como antes se
   escondía el nombre. En el celular no hay botón: «Mi cuenta» sigue en el menú. */
.site-chrome .rn-account {
  display: none;
}

@media screen and (min-width: 992px) {
  .site-chrome .navbar-nav > .mi-cuenta {
    display: none !important;
  }

  .site-chrome .rn-account {
    position: relative;
    display: flex;
    align-items: center;
  }

  .site-chrome .rn-account-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 38px;
    padding: 0 10px 0 6px;
    border: 0;
    border-radius: var(--rn-radius-button);
    background: none;
    color: var(--rn-on-bar);
    font: 500 13.5px/1 var(--rn-font-sans);
    white-space: nowrap;
    cursor: pointer;
  }

  .site-chrome .rn-account-btn:hover,
  .site-chrome .rn-account.show > .rn-account-btn {
    background: var(--rn-on-bar-hover);
  }

  .site-chrome .rn-account-btn:focus {
    outline: none;
  }

  .site-chrome .rn-account-btn:focus-visible {
    outline: 2px solid var(--rn-on-bar);
    outline-offset: 2px;
  }

  .site-chrome .rn-account-av {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--rn-on-bar);
    color: var(--rn-bar);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
  }

  .site-chrome .rn-account-caret {
    width: 6px;
    height: 6px;
    margin: -3px 2px 0;
    border-right: 1.5px solid var(--rn-on-bar-muted);
    border-bottom: 1.5px solid var(--rn-on-bar-muted);
    transform: rotate(45deg);
    transition: transform 150ms ease, margin 150ms ease;
  }

  .site-chrome .rn-account.show .rn-account-caret {
    margin-top: 3px;
    transform: rotate(225deg);
  }

  .site-chrome .rn-account > .dropdown-menu {
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    margin: 0;
  }

  /* El idioma se abre debajo de su botón (antes, pegado al borde derecho de la barra: con la cuenta al final quedaba
     corrido a la derecha, Phil 10/11/2026), con la misma hoja y las mismas opciones que los otros desplegables. */
  .site-chrome .lang-drop-header {
    position: relative;
  }

  .site-chrome .lang-drop-header .lang-drop-panel {
    top: calc(100% + 6px);
    right: 0;
    border: 0;
    border-radius: 12px;
    min-width: 250px;
    padding: 6px;
    box-shadow: var(--rn-shadow-menu);
  }

  /* Opciones como las de los otros desplegables (Phil: «tiene que ser igual, quedate solamente con las banderitas originales»). */
  .site-chrome .lang-drop-header .language-option {
    min-height: 38px;
    padding: 0 10px;
    border-radius: var(--rn-radius-button);
    color: var(--rn-ink-2);
    font-family: var(--rn-font-sans);
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .site-chrome .lang-drop-header .language-option:hover,
  .site-chrome .lang-drop-header .language-option:focus {
    background: var(--rn-surface-tint);
    color: var(--rn-ink);
  }

  .site-chrome .lang-drop-header .language-option.is-active {
    background: var(--rn-surface-selected);
    color: var(--rn-ink);
  }

  /* Las secciones, más separadas del «Cotizador de vuelos» (Phil 10/11/2026: «está muy pegado»). */
  .site-chrome .logo > a {
    margin-right: 40px;
  }
}

@media screen and (min-width: 992px) and (max-width: 1439.98px) {
  .site-chrome .rn-account-name {
    display: none;
  }
}

@media screen and (min-width: 992px) and (max-width: 1279.98px) {
  /* Sin el logotipo (solo el avión) alcanza con menos aire. */
  .site-chrome .logo > a {
    margin-right: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-chrome .rn-account-caret {
    transition: none;
  }
}
