/* Enix 3.0 Global Layout — Stage 2
   --------------------------------------------------------------
   Source of truth: Enix3Proto (1).html (top-bar, navbar, module-bar).
   Depends on: enix-tokens.css (loaded immediately before this file).
   Only var(--*) tokens may be used in this file.

   Three stacked bars (HTML order top → bottom):
     1. .enix-top-bar       — thin navy strip (langs + support link)
     2. .enix-navbar        — sticky 60px white bar (logo, user, logout)
     3. .enix-module-bar    — sticky 44px tab bar (one per module)

   The Telerik <TelerikRootComponent> wraps everything; these bars
   sit as siblings of the route-rendered page content.
   -------------------------------------------------------------- */


/* ── Global Scrollbar ────────────────────────────────────────────
   Thin, modern scrollbar using design tokens. Elements that need
   hidden scrollbars (module-bar, product-tabs, etc.) override with
   their own more-specific selectors and are not affected.
   ────────────────────────────────────────────────────────────── */

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--gray400) transparent;
}

/* Chrome / Safari / Edge */
::-webkit-scrollbar          { width: 6px; height: 6px; }
::-webkit-scrollbar-track    { background: transparent; }
::-webkit-scrollbar-thumb    { background: var(--gray400); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--gray600); }
::-webkit-scrollbar-corner   { background: transparent; }


/* ══════════════════════════════════════════════════════════════
   1. TOP BAR
   ══════════════════════════════════════════════════════════════ */
.enix-top-bar {
  background: var(--nav-topbar-bg);
  color: var(--nav-topbar-text);
  font-size: var(--text-sm);
  padding: 5px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.enix-top-bar a { color: var(--nav-topbar-text); }
.enix-top-bar a:hover { color: var(--white); }
.enix-top-bar__support { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.enix-top-bar__rate    { display: flex; align-items: center; gap: 6px; color: var(--nav-topbar-text); }
.enix-top-bar__langs   { display: flex; gap: 10px; }
.enix-top-bar__langs span {
  cursor: pointer;
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.enix-top-bar__langs span.active,
.enix-top-bar__langs span:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, .4);
}


/* Iconos de línea del sprite (wwwroot/img/nav-icons.svg). Heredan color
   vía currentColor; se alinean verticalmente como texto. */
.nav-icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════
   1.5. HEADER STACK — IQWindow/QuoteModeBar (.enix-iq-bar) + navbar,
   pegados como UNA sola unidad (ver Header_Completo.razor).
   Antes .enix-iq-bar (top:0, z-index:9000) y .enix-navbar (top:0,
   z-index:200) tenían cada uno su propio position:sticky — al
   scrollear más de 52px ambos quedaban "stuck" en la misma franja,
   pisándose entre sí en vez de apilarse. Ahora sólo el wrapper es
   sticky y los hijos quedan en flujo normal dentro de él.
   ══════════════════════════════════════════════════════════════ */
.enix-header-stack {
  position: sticky;
  top: 0;
  z-index: 200;
}
.enix-header-stack .enix-iq-bar {
  position: static;
  top: auto;
  z-index: auto;
}
.enix-header-stack .enix-navbar {
  position: static;
  top: auto;
  z-index: auto;
}

/* ══════════════════════════════════════════════════════════════
   2. NAVBAR — 52 px sticky white bar
   ══════════════════════════════════════════════════════════════ */
.enix-navbar {
  background: var(--nav-navbar-bg);
  font-family: var(--font-nav);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 0 var(--nav-navbar-border);
  padding: 0 24px;
  height: var(--nav-navbar-height);
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Logo block ---------------------------------------------------- */
.enix-navbar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}
.enix-navbar__logo-icon { font-size: 26px; line-height: 1; }
.enix-navbar__logo-img  { max-height: 52px; max-width: 180px; display: block; }
/* El chip (fondo navy para los logos en arte blanco) usa box-sizing:border-box, asi que su padding
   sale del max-height: con el padding original (8px 12px) el arte quedaba en 24px dentro de un
   navbar de 52 y el logo de la agencia se veia bastante mas chico que el de la instancia. Padding
   mas ajustado, y max-width con el padding sumado para que al arte le queden los mismos 180px de
   ancho util. Hoy: navbar 60 -> chip 54 con 3px de padding -> arte de 48px, casi igual que los
   52px del logo sin chip.

   El limite es la ALTURA, no el ancho: los logos son altos (Stage Pass 1080x431, agencia 3432
   859x506), asi que a 52px de alto ni llegan a los 180 de ancho. Para agrandarlo mas hay que subir
   --nav-navbar-height (y con el --nav-modulebar-top, que lo duplica). */
.enix-navbar__logo-img.enix-agency-logo-chip {
  max-height: 54px;
  max-width: 196px;
  padding: 3px 8px;
  border-radius: 8px;
}

.enix-navbar__logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.enix-navbar__logo-text strong {
  display: block;
  font-size: var(--text-xl);
  font-weight: var(--fw-black);
  color: var(--navy);
  letter-spacing: -.3px;
}
.enix-navbar__logo-text strong span { color: var(--blue); }
.enix-navbar__logo-text small {
  font-size: 9px;
  font-weight: var(--fw-semibold);
  color: var(--gray400);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.enix-navbar__spacer { flex: 1; }

/* User cluster (pill + logout) --------------------------------- */
.enix-navbar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.enix-user-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 4px 5px;
  background: var(--gray100);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background .18s;
  border: none;
  font-family: inherit;
  /* El pill no se comprime: los nombres largos se truncan en __info.
     El tope acota cuánto puede crecer el cluster con agencias de nombre
     largo, que es lo que empuja al navbar a desbordar. */
  flex-shrink: 0;
  max-width: 160px;
}
.enix-user-pill:hover { background: var(--gray200); }
.enix-user-pill__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: var(--fw-black);
  flex-shrink: 0;
  text-transform: uppercase;
  /* Blinda el circulo: si algo llegara a pisar el ancho, la relacion 1:1
     se mantiene y border-radius:50% sigue dando un circulo, no un ovalo. */
  aspect-ratio: 1;
  min-width: 28px;
}
.enix-user-pill__info {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
}
.enix-user-pill__agency {
  font-size: 10px;
  color: var(--gray500);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.enix-user-pill__name {
  font-size: 12.5px;
  font-weight: var(--fw-semibold);
  color: var(--gray800);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enix-btn-logout {
  border: 1.5px solid var(--gray200);
  border-radius: var(--r-sm);
  padding: 5px 10px;
  font-size: var(--text-sm);
  color: var(--gray500);
  background: none;
  cursor: pointer;
  transition: border-color .18s, color .18s;
  white-space: nowrap;
  font-family: inherit;
}
.enix-btn-logout:hover {
  border-color: var(--gray400);
  color: var(--navy);
}

/* Session dropdown — opens from the avatar pill, contains logout.
   (Phase 9 correction: avatar → session menu; burger → nav menu.) */
.enix-navbar__user { position: relative; }
.enix-session-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--r);
  box-shadow: var(--sh-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 210;
}
.enix-session-menu__head { display: flex; flex-direction: column; line-height: 1.3; }
.enix-session-menu__agency { font-size: 10px; color: var(--gray500); }
.enix-session-menu__name { font-size: var(--text-md); font-weight: var(--fw-bold); color: var(--navy); }
.enix-session-menu .enix-btn-logout { width: 100%; text-align: center; }
/* Tap-outside-to-close backdrop. z-index 195 sits below the navbar's
   stacking context (z-200, which contains the dropdown) but above the
   module bar / page, so the dropdown stays clickable and a click
   anywhere else closes it. */
.enix-session-backdrop { position: fixed; inset: 0; z-index: 195; background: transparent; }

/* IQ contextual bar — shown when a reservation file is open. Keeps the
   per-tenant orange background (var(--color-Button-2)) and the Cartzilla
   cart-dropdown structure/JS untouched; this only refines the chrome +
   the two buttons to the Enix look (CSS-only, scoped to .enix-iq-bar). */
.enix-iq-bar {
  box-shadow: var(--sh-sm);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.enix-iq-bar .btn {
  border-radius: var(--r-sm);
  font-weight: var(--fw-bold);
  border: none;
  transition: opacity .18s, background .18s;
}
.enix-iq-bar .btn:hover { opacity: .92; }
.enix-iq-bar .btn-accent {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}
.enix-iq-bar .btn-accent:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.enix-iq-bar .cart-header .btn-primary {
  background: #fff;
  color: var(--navy);
}

.enix-navbar__burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4.5px;
  width: 36px;
  height: 36px;
  background: var(--gray100);
  border: none;
  cursor: pointer;
  border-radius: 9px;
  color: var(--gray700);
  margin-left: auto;
  line-height: 1;
}
.enix-navbar__burger--open { background: var(--blue); color: #fff; }
.enix-navbar__burger { position: relative; }
.burger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .2s ease, background-color .2s ease;
  transform-origin: center;
}
.enix-navbar__burger--open .burger-line { background: #fff; }
.enix-navbar__burger--open .burger-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.enix-navbar__burger--open .burger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.enix-navbar__burger--open .burger-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }


/* ══════════════════════════════════════════════════════════════
   2b. SYSTEM LINKS (pills) + "+ MÁS" DROPDOWN
   ══════════════════════════════════════════════════════════════ */
.enix-syslinks { display: flex; align-items: center; gap: 8px; }

.enix-syslink {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  background: transparent;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--blue);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.enix-syslink:hover { background: var(--blue-md); }
.enix-syslink.active { background: var(--blue-lt); color: var(--blue); }
.enix-syslink .nav-icon { color: var(--blue); }

/* "+ Más" — diferenciado del resto */
.enix-more { position: relative; }
.enix-more__btn {
  background: var(--blue-lt);
  border: 1px solid var(--blue-md);
  color: var(--blue);
}
.enix-more__btn:hover { background: var(--blue-md); }
.enix-more__plus { font-size: 15px; font-weight: 800; line-height: 1; }

.enix-more__backdrop { display: none; position: fixed; inset: 0; z-index: 205; background: transparent; }
.enix-more.is-open .enix-more__backdrop { display: block; }
.enix-more__panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 268px;
  background: var(--white);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  box-shadow: var(--sh-lg);
  padding: 6px;
  z-index: 210;
}
.enix-more.is-open .enix-more__panel { display: block; }
.enix-more__header {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--gray400);
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 8px 10px 6px;
}
.enix-more__item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 8px;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background .12s;
}
.enix-more__item:hover { background: var(--gray100); }
.enix-more__item--soon { cursor: default; opacity: .8; }
.enix-more__item--soon:hover { background: none; }
.enix-more__ico {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-lt);
  color: var(--blue);
  border-radius: 7px;
}
.enix-more__label { font-size: 12.5px; font-weight: 700; color: var(--navy); flex: 1; }
.enix-more__item.active .enix-more__label { color: var(--blue); }
.enix-more__badge {
  font-size: 7.5px;
  font-weight: 800;
  color: #fff;
  background: var(--rose);
  padding: 2px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Cluster derecho: tasa · teléfono · idioma (la user-pill se estiliza aparte) */
.enix-navbar__cluster { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

/* Cart icon in navbar */
.enix-cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gray600);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.enix-cart-btn:hover { color: var(--navy); background: var(--gray200); }
.enix-cart-badge {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--primary, #e63946);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

/* ══════════════════════════════════════════════════════════════
   CART PANEL — right-side sliding overlay
   ══════════════════════════════════════════════════════════════ */
.enix-cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: 1079;
  animation: enix-fade-in .2s ease;
}
@keyframes enix-fade-in { from { opacity: 0 } to { opacity: 1 } }

.enix-cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 100vw;
  height: 100vh;
  background: var(--white);
  box-shadow: -4px 0 24px rgba(0, 0, 0, .14);
  z-index: 1080;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}
.enix-cart-panel--open { transform: translateX(0); }

/* Header */
.enix-cart-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray200);
  flex-shrink: 0;
}
.enix-cart-panel__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  color: var(--navy);
}
.enix-cart-panel__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--primary, #e63946);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.enix-cart-panel__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--gray500);
  padding: 4px;
  border-radius: 4px;
  transition: color .15s, background .15s;
}
.enix-cart-panel__close:hover { color: var(--navy); background: var(--gray200); }

/* Body — scrollable item list */
.enix-cart-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}
.enix-cart-panel__spinner {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}
.enix-cart-panel__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 48px 24px;
  text-align: center;
  color: var(--gray500);
}
.enix-cart-panel__empty-icon { opacity: .4; margin-bottom: 8px; }
.enix-cart-panel__empty p { margin: 0; font-weight: var(--fw-semibold); color: var(--navy); }
.enix-cart-panel__empty small { font-size: var(--text-sm); }

/* Individual cart items */
.enix-cart-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--gray100);
}
.enix-cart-item:last-child { border-bottom: none; }
.enix-cart-item__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--gray100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
}
.enix-cart-item__body { flex: 1; min-width: 0; }
.enix-cart-item__name {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.enix-cart-item__sub {
  font-size: 11px;
  color: var(--gray500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.enix-cart-item__checking {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  margin-top: 4px;
}

/* Legible "Add to Cart" button (outline style), and the row that pairs it left of Book. */
.enix-cart-book-pair {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
/* Book/on-request buttons default to width:100% on grid cards (houses, etc.), which would
   force the cart button to wrap above them. Inside the pair, keep them auto-width so the
   cart button sits to their left. */
.enix-cart-book-pair .enix-btn-book,
.enix-cart-book-pair .enix-btn-onrequest {
  width: auto;
}
.enix-btn-addcart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--blue-lt, #eff6ff);
  color: var(--blue, #1e5fa8);
  border: 1.5px solid var(--blue, #1e5fa8);
  border-radius: var(--r-sm, 8px);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
}
.enix-btn-addcart:hover { background: var(--blue, #1e5fa8); color: #fff; }
.enix-btn-addcart:disabled { opacity: .6; cursor: default; }
/* Misma altura para los tres: el de carrito tiene borde, ícono y tipografía más
   grande, así que por padding quedaba ~5px más alto que Reservar / On Request.
   Fijamos la caja (border-box) en vez de depender del padding — la especificidad
   alcanza para ganarle al override de .enix-room-row .col-4. */
.enix-cart-book-pair .enix-btn-addcart,
.enix-cart-book-pair .enix-btn-book,
.enix-cart-book-pair .enix-btn-onrequest,
.enix-room-row .col-4 .enix-cart-book-pair .enix-btn-book,
.enix-room-row .col-4 .enix-cart-book-pair .enix-btn-onrequest {
  height: 32px;
  padding-top: 0;
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.enix-cart-item__dates {
  font-size: 11px;
  color: var(--gray500);
  margin-top: 4px;
}
.enix-cart-item__price {
  flex-shrink: 0;
  text-align: right;
  max-width: 46%;
}
.enix-cart-item__price-main {
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  color: var(--navy);
}
.enix-cart-item__price-main small {
  font-size: .6em;
  font-weight: var(--fw-semibold);
  vertical-align: super;
}
.enix-cart-item__remove {
  flex-shrink: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--gray400);
  padding: 4px;
  border-radius: 4px;
  transition: color .15s;
  margin-top: 2px;
}
.enix-cart-item__remove:hover { color: var(--red, #e63946); }
.enix-cart-item__remove:disabled { opacity: .4; cursor: not-allowed; }

/* Footer */
.enix-cart-panel__footer {
  flex-shrink: 0;
  border-top: 1px solid var(--gray200);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.enix-cart-panel__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--text-sm);
  color: var(--gray600);
}
.enix-cart-panel__total strong {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--navy);
}
.enix-cart-panel__total strong small {
  font-size: .55em;
  font-weight: var(--fw-semibold);
  vertical-align: super;
}
.enix-cart-panel__total-val { text-align: right; }
.enix-cart-panel__total-amount {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--navy);
}
.enix-cart-panel__total-amount small {
  font-size: .55em;
  font-weight: var(--fw-semibold);
  vertical-align: super;
}
.enix-cart-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.enix-cart-panel__actions .enix-btn-sm { flex: 1; justify-content: center; }
.enix-cart-panel__actions .enix-btn-sm--blue { flex-basis: 100%; padding-top: 8px; padding-bottom: 8px; }
body:has(.enix-cart-panel--open) .go-top { display: none !important; }
.enix-nav-rate {
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--gray600);
  white-space: nowrap;
}
.enix-nav-phone {
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray600);
  text-decoration: none;
  white-space: nowrap;
}
.enix-nav-phone .nav-icon { color: var(--blue); }
.enix-nav-phone:hover { color: var(--navy); }
.enix-nav-langs { display: flex; gap: 8px; }
.enix-nav-langs span {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray400);
  padding-bottom: 1px;
  border-bottom: 1.5px solid transparent;
  transition: color .15s, border-color .15s;
}
.enix-nav-langs span.active { color: var(--navy); font-weight: 700; border-bottom-color: var(--blue); }
.enix-nav-langs span:hover { color: var(--navy); }

/* Backdrop del drawer mobile (debajo del navbar) */
.enix-mobile-backdrop {
  position: fixed;
  inset: var(--nav-navbar-height) 0 0 0;
  background: rgba(13, 34, 64, .35);
  z-index: 198;
}


/* ══════════════════════════════════════════════════════════════
   3. MODULE BAR — 44 px sticky tab strip
   ══════════════════════════════════════════════════════════════ */
.enix-module-bar {
  background: var(--nav-modulebar-bg);
  font-family: var(--font-nav);
  border-bottom: 1px solid var(--surface-border);
  position: sticky;
  top: var(--nav-modulebar-top);
  z-index: 190;
  padding: 0 24px;
  display: flex;
  align-items: stretch;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.enix-module-bar::-webkit-scrollbar { display: none; }

.enix-module-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  height: var(--nav-modulebar-height);
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--gray500);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .18s, border-color .18s, background .18s;
  position: relative;
  font-family: inherit;
}
.enix-module-btn:hover { background: var(--gray50); color: var(--gray800); }
.enix-module-btn.active {
  color: var(--nav-active-color);
  border-bottom-color: var(--nav-active-color);
}
.enix-module-btn .mod-icon  { font-size: 16px; line-height: 1; }
.enix-module-btn .mod-label { line-height: 1; }
.enix-module-btn .mod-badge {
  background: var(--red);
  color: var(--white);
  font-size: 9px;
  font-weight: var(--fw-black);
  padding: 1px 5px;
  border-radius: var(--r-full);
  min-width: 18px;
  text-align: center;
}

/* Per-module active-color overrides ---------------------------- */
.enix-module-btn[data-mod="booking"].active,
.enix-module-btn[data-mod="reservas"].active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.enix-module-btn[data-mod="crm"].active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}
.enix-module-btn[data-mod="comisiones"].active {
  color: var(--green);
  border-bottom-color: var(--green);
}
.enix-module-btn[data-mod="presupuestos"].active {
  color: var(--amber);
  border-bottom-color: var(--amber);
}
.enix-module-btn[data-mod="links"].active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}
.enix-module-btn[data-mod="trainings"].active {
  color: var(--indigo);
  border-bottom-color: var(--indigo);
}
.enix-module-btn[data-mod="pagos"].active {
  color: var(--emerald);
  border-bottom-color: var(--emerald);
}
.enix-module-btn[data-mod="config"].active {
  color: var(--gray600);
  border-bottom-color: var(--gray600);
}

/* Vertical separator inside the module bar -------------------- */
.enix-module-bar__sep {
  width: 1px;
  background: var(--surface-border);
  margin: 10px 6px;
  flex-shrink: 0;
}


/* ══════════════════════════════════════════════════════════════
   4. PAGE-BODY OFFSET (opt-in)
   The bars are siblings of @Body in document flow, so route
   content naturally appears below them. Apply this class only
   when a page renders its own sticky/fixed top element that
   would otherwise overlap the bars.
   ══════════════════════════════════════════════════════════════ */
.enix-page-body {
  padding-top: calc(var(--nav-navbar-height) + var(--nav-modulebar-height));
}


/* ══════════════════════════════════════════════════════════════
   5. BREAKPOINT NAV OFF-CANVAS (≤ 1199.98 px = xl de Bootstrap)
   Basado en Enix3Proto (1).html línea 548, que usaba 768px.

   Medido con el set de links más grande (usuario con Markups):
     logo 147 + syslinks 487 + cluster 348 + gaps/padding 132 = ~1114px
   Con el corte en 768px desbordaba toda la franja 769–1114px: el
   user-pill terminaba dibujado fuera del viewport, a la derecha.

   Se usa el xl (1199.98) y no un valor ajustado a esos 1114px porque
   el ancho de los syslinks NO es fijo: "Markups" solo aparece según
   permisos y las etiquetas cambian de largo por idioma (es/pt/en).
   El xl deja ~58px de margen sobre el peor caso calculado.
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1199.98px) {
  .enix-navbar__burger { display: flex; }
  .enix-navbar { padding: 0 14px; }

  /* Collapse the user pill to just the avatar; the name shows in the
     session dropdown opened from the avatar. */
  .enix-navbar__user .enix-user-pill__info { display: none; }

  .enix-syslinks {
    position: fixed;
    top: var(--nav-navbar-height);
    right: 0;
    left: auto;
    width: min(86vw, 340px);
    height: calc(100vh - var(--nav-navbar-height));
    height: calc(100dvh - var(--nav-navbar-height));
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--white);
    padding: 14px 14px 24px;
    box-shadow: -18px 0 40px rgba(13, 34, 64, .18);
    z-index: 199;
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.4, 0, .2, 1);
    pointer-events: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-left: 1px solid var(--surface-border);
  }
  .enix-syslinks--mobileopen { transform: translateX(0); pointer-events: auto; }

  .enix-syslink {
    width: 100%;
    padding: 12px 12px;
    font-size: 14px;
    border-radius: 10px;
  }
  .enix-syslink.active { background: var(--blue-lt); }

  .enix-more { width: 100%; position: static; }
  .enix-more__btn { display: none; }
  .enix-more__panel {
    display: block !important;
    position: static;
    width: 100%;
    box-shadow: none;
    border: none;
    border-top: 1px solid var(--surface-border);
    border-radius: 0;
    padding: 10px 0 0;
    margin-top: 6px;
  }
  .enix-more__backdrop { display: none !important; }
  .enix-more__header {
    padding: 4px 4px 8px;
    font-size: 10px;
  }
  .enix-more__item {
    padding: 12px 10px;
    border-radius: 10px;
  }
  .enix-more__label { font-size: 13.5px; }
}

/* El backdrop del drawer solo aplica en mobile (debe seguir al breakpoint de arriba) */
@media (min-width: 1200px) {
  .enix-mobile-backdrop { display: none; }
}

/* ── Mobile chico (≤ 480 px) ───────────────────────────────────
   A 320-400px el navbar seguía desbordando: logo (147) + cluster (161)
   + burger (32) + gaps (48) + padding (28) = 416px. El logo tiene
   flex-shrink:0, así que nunca cedía y el burger terminaba fuera del
   viewport. Acá el logo pasa a ser el elemento flexible: cede ancho
   primero para que idioma, carrito, usuario y burger sigan accesibles. */
@media (max-width: 480px) {
  .enix-navbar { padding: 0 10px; gap: 8px; }
  .enix-navbar__logo { flex-shrink: 1; min-width: 0; overflow: hidden; }
  .enix-navbar__logo-img,
  .enix-navbar__logo-img.enix-agency-logo-chip { max-width: 100%; }
  .enix-navbar__logo-text { min-width: 0; }
  .enix-navbar__logo-text strong {
    font-size: var(--text-md);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}


/* ══════════════════════════════════════════════════════════════
   6. GLOBAL COMPONENTS (Phase 8)  —  modal, toast, empty, spinner
   --------------------------------------------------------------
   The proto has no modal/toast/loader screens (only the
   .cms-announce whitelabel banner), so these are designed in the
   Enix style straight from the tokens. They are the shared chrome
   that per-page Bootstrap `.modal` / `.dialogV2` dialogs, system
   messages and empty states migrate onto. Lives in enix-layout.css
   (loaded globally on every tenant) so no new <link> is needed.

   Reference implementation: Client/Shared/Alerta.razor (modal).
   ══════════════════════════════════════════════════════════════ */

/* ── Modal ──────────────────────────────────────────────────── */
.enix-modal {
  position: fixed;
  inset: 0;
  background: rgba(13, 34, 64, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1080;
  padding: 20px;
  animation: enix-modal-fade .18s ease;
}
@keyframes enix-modal-fade { from { opacity: 0; } to { opacity: 1; } }

.enix-modal__dialog {
  background: var(--surface-card);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: enix-modal-pop .24s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes enix-modal-pop {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.enix-modal__dialog--sm { max-width: 360px; }
.enix-modal__dialog--lg { max-width: 720px; }

.enix-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--surface-border);
}
.enix-modal__title {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}
.enix-modal__close {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: var(--gray400);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--r-sm);
  transition: all .15s;
}
.enix-modal__close:hover { background: var(--gray100); color: var(--gray700); }
.enix-modal__body {
  padding: 20px;
  overflow-y: auto;
  font-size: var(--text-base);
  color: var(--gray700);
  line-height: 1.55;
}
.enix-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--surface-border);
  background: var(--gray50);
}
/* Secondary/cancel action in modal footers: the shared .enix-btn-sm--ghost
   renders as borderless text, which reads as a plain link next to the primary
   button. Inside modal footers give it a proper outlined-button look and match
   the primary button's size, so every confirm dialog gets a real secondary CTA. */
.enix-modal__footer .enix-btn-sm--ghost {
  padding: 9px 18px;
  font-size: 13px;
  border-radius: 9px;
  border: 1.5px solid var(--surface-border);
  background: var(--surface-card);
  color: var(--gray600);
}
.enix-modal__footer .enix-btn-sm--ghost:hover {
  border-color: var(--gray400);
  background: var(--gray100);
  color: var(--navy);
}

/* ── Toast (corner notification) ────────────────────────────── */
.enix-toast-stack {
  position: fixed;
  top: 76px;
  right: 20px;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}
.enix-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-left: 4px solid var(--blue);
  border-radius: var(--r-sm);
  box-shadow: var(--sh);
  padding: 12px 14px;
  animation: enix-toast-in .22s ease;
}
@keyframes enix-toast-in {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.enix-toast__icon { font-size: 18px; flex-shrink: 0; line-height: 1.3; }
.enix-toast__body { flex: 1; min-width: 0; }
.enix-toast__title { font-size: var(--text-md); font-weight: var(--fw-bold); color: var(--navy); }
.enix-toast__msg { font-size: var(--text-sm); color: var(--gray600); margin-top: 2px; }
.enix-toast__close {
  background: none;
  border: none;
  color: var(--gray400);
  cursor: pointer;
  font-size: 14px;
  padding: 2px;
}
.enix-toast--success { border-left-color: var(--green); }
.enix-toast--error   { border-left-color: var(--red); }
.enix-toast--warning { border-left-color: var(--amber); }
.enix-toast--info    { border-left-color: var(--blue); }

/* ── Empty / no-results state ───────────────────────────────── */
.enix-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  gap: 6px;
}
.enix-empty__icon { font-size: 44px; opacity: .55; margin-bottom: 4px; }
.enix-empty__title { font-size: var(--text-lg); font-weight: var(--fw-bold); color: var(--navy); }
.enix-empty__sub,
.enix-empty__body { font-size: var(--text-md); color: var(--gray500); max-width: 420px; }

/* ── Generic CSS spinner (non-branded inline loads) ─────────── */
.enix-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray200);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: enix-spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes enix-spin { to { transform: rotate(360deg); } }
.enix-spinner--lg { width: 48px; height: 48px; border-width: 4px; }

/* Enix-styled backdrop for the branded logo loaders (opt-in) */
.enix-loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(248, 250, 252, .78);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1070;
}

@media (max-width: 480px) {
  .enix-toast-stack { left: 12px; right: 12px; max-width: none; }
}
