/* ═══════════════════════════════════════════════
   NAV.CSS — Barra de navegación unificada
   Todas las navs de la app usan estas clases.
   ═══════════════════════════════════════════════ */

/* ── Base compartida ─────────────────────────── */
.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
  height: 76px;
  min-height: 56px;
  background: var(--bg);
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* ── Nav fija (home) ─────────────────────────── */
.app-nav-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  transition: all 0.3s ease;
}

/* ── Nav sticky (pantallas internas) ─────────── */
@keyframes smoothSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.app-nav-sticky {
  position: sticky;
  top: 0;
  z-index: 100;
  margin: 0px -16px 16px -16px;
  width: calc(100% + 32px);
  animation: smoothSlideDown 0.4s var(--ease-sheet);
}

/* ── Botón atrás ─────────────────────────────── */
.app-nav-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: var(--brand-light);
  border: none;
  cursor: pointer;
  color: var(--brand);
  transition: background 0.2s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.app-nav-back:hover { background: var(--brand-20); }
.app-nav-back:active { transform: scale(0.95); }
.app-nav-back .material-symbols-outlined { font-size: 1.4rem; display: block; }

/* ── Título alineado a la izquierda ──────────── */
.app-nav-title {
  position: absolute;
  left: 0;
  right: 0;
  text-align: left;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 80px;
  padding-right: 64px;
}

/* ── Acciones derecha ────────────────────────── */
.app-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Botón icono (nav home) ──────────────────── */
.app-nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1.5px solid var(--border-light);
  cursor: pointer;
  color: var(--brand);
  transition: background 0.15s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.app-nav-icon-btn:hover { background: var(--brand-lightest); }
.app-nav-icon-btn .material-symbols-outlined { font-size: 18px; }

/* ── Botón CTA nav (Nueva reserva) ──────────── */
.app-nav-cta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 14px;
  background: var(--brand);
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 40%, transparent);
  transition: all 0.2s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.app-nav-cta:hover { background: var(--brand-dk, #ea6c00); transform: translateY(-1px); }
.app-nav-cta:active { transform: scale(0.97); }
.app-nav-cta .material-symbols-outlined { font-size: 1rem; }
.app-nav-cta-label { display: inline; }

/* ── Avatar nav ──────────────────────────────── */
.app-nav-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--white);
  overflow: hidden;
  border: 1.5px solid var(--border-light);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.app-nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Sección label (compacto al scrollear) ───── */
.app-nav-section {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  white-space: nowrap;
}

/* ── Compacto (home al scrollear) ───────────── */
.app-nav-fixed.compacto .app-nav-cta-label { display: none; }
.app-nav-fixed.compacto .app-nav-cta { padding: 14px 12px; }
.app-nav-fixed.compacto .app-nav-section { opacity: 1; max-width: 200px; }

@media (max-width: 360px) {
  .app-nav-cta-label { display: none; }
  .app-nav-cta { padding: 14px 12px; }
}

#home-nav .app-nav-section {
  opacity: 1 !important;
  max-width: none !important;
  overflow: visible !important;
  flex: 1;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: left;
  letter-spacing: 1.2px;
  color: var(--brand);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── CTA de "Nueva reserva" en #home-nav: ícono-solo salvo en el estado vacío ── */
#home-nav-cta-label { display: none; }
#home-nav.mostrar-cta-label:not(.compacto) #home-nav-cta-label { display: inline; }
