/* ============================================================
   LA STRADA — TOPBAR NAV CHIPS (központi stíluslap)
   Színkódolt vizuális menedzsment minden oldal fejlécében.
   Tokenek a HTML-szintű :root-ból öröklődnek (--green, --red,
   --yellow, --paper, --dark). Két új tokent itt adunk:
   --la-orange (Túratervek) és --la-red-deep (Saját terveim).
   ============================================================ */

:root {
  --la-orange:   #D9651F;  /* terrakotta-narancs — Túratervek */
  --la-red-deep: #B61C2E;  /* mély piros — Saját terveim */
}

/* Specificity-patch: a meglévő .topbar a szabály ne hasson a chipekre.
   Új oldalakon vegyítve a HTML-szintű .topbar a:hover szabállyal. */
.topbar .nav-chip,
.topbar a.nav-chip,
.topbar a.nav-chip:hover {
  text-decoration: none !important;
}

/* — Base chip — */
.nav-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  border: none;
  border-radius: 5px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  transition:
    transform 0.2s cubic-bezier(.2,.7,.2,1),
    box-shadow 0.25s ease,
    filter 0.2s ease,
    letter-spacing 0.25s ease;
  box-shadow: 0 2px 0 rgba(0,0,0,0.28), 0 1px 3px rgba(0,0,0,0.18);
  white-space: nowrap;
  line-height: 1;
  filter: saturate(0.9) brightness(0.96);
  user-select: none;
}
.nav-chip:hover {
  filter: saturate(1.08) brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(0,0,0,0.28), 0 2px 0 rgba(0,0,0,0.3);
}
.nav-chip:active { transform: translateY(0) scale(0.97); }
.nav-chip .chip-ico {
  font-size: 0.98rem;
  display: inline-block;
  line-height: 1;
  flex-shrink: 0;
}
.nav-chip .label { padding-top: 2px; }

/* — Variánsok: oldal-szintű .topbar a (specificity 0,1,1) override —
     Erősített szelektor: .topbar .nav-chip--X (0,2,1) > .topbar a (0,1,1) */
.topbar .nav-chip--home  { background: var(--green);      color: var(--paper, #f7f3ec); }
.topbar .nav-chip--poi   { background: var(--yellow);     color: var(--dark, #1a1208);  }
.topbar .nav-chip--route { background: var(--la-orange);  color: var(--paper, #f7f3ec); }
.topbar .nav-chip--my    { background: var(--la-red-deep); color: var(--paper, #f7f3ec); }
.topbar .nav-chip--map   {
  background: var(--paper, #f7f3ec);
  color: var(--dark, #1a1208);
  padding-left: 0;
  padding-right: 12px;
  overflow: hidden;
}

/* — Térkép-chip belső elemek — */
.nav-chip--map .stripes {
  display: flex;
  align-self: stretch;
  flex: 0 0 11px;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.nav-chip--map .stripes i { display: block; height: 100%; }
.nav-chip--map .stripes .s1 { width: 4px; background: var(--green); }
.nav-chip--map .stripes .s2 { width: 3px; background: #fff; }
.nav-chip--map .stripes .s3 { width: 4px; background: var(--red); }
.nav-chip--map .pin-ico {
  width: 13px;
  height: 15px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.15));
}
.nav-chip--map .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  margin-left: 6px;
  box-shadow: 0 0 0 0 rgba(255,214,0,0.6);
  animation: navChipPulse 1.6s ease-out infinite;
  flex-shrink: 0;
}
.nav-chip--map:hover .stripes { transform: translateX(-5px); }
.nav-chip--map:hover .pulse { animation-duration: 0.8s; }

@keyframes navChipPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,214,0,0.55); opacity: 1; }
  70%  { box-shadow: 0 0 0 6px rgba(255,214,0,0);   opacity: 0.55; }
  100% { box-shadow: 0 0 0 0 rgba(255,214,0,0);     opacity: 1; }
}

/* — Aktív állapot: arany ring + alsó "tűzés-csík" — */
.nav-chip.is-active {
  filter: saturate(1.12) brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 2px rgba(26,18,8,0.6),
    0 3px 0 rgba(0,0,0,0.3),
    0 0 16px rgba(255,214,0,0.35);
  cursor: default;
}
.nav-chip.is-active::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: -5px;
  height: 3px;
  background: var(--yellow);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255,214,0,0.75);
}
/* sötét hátterű variánsoknál fehér ring jobban olvasható */
.nav-chip--home.is-active,
.nav-chip--route.is-active,
.nav-chip--my.is-active,
.nav-chip--map.is-active {
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.65),
    0 3px 0 rgba(0,0,0,0.3),
    0 0 16px rgba(255,214,0,0.35);
}

/* — Mobil: csak színes ikon-csempék — */
@media (max-width: 640px) {
  .nav-chip {
    padding: 0;
    width: 36px;
    height: 32px;
    justify-content: center;
    gap: 0;
    font-size: 1rem;
  }
  .nav-chip .label { display: none; }
  .nav-chip .chip-ico { font-size: 1.1rem; }
  .nav-chip--map {
    padding: 0;
    width: 44px;
    position: relative;
  }
  .nav-chip--map .stripes { margin-right: 4px; }
  .nav-chip--map .pulse {
    position: absolute;
    top: -3px;
    right: -3px;
    margin: 0;
    width: 8px;
    height: 8px;
  }
  .nav-chip.is-active::after {
    left: 18%;
    right: 18%;
    bottom: -4px;
  }
}
@media (max-width: 380px) {
  .nav-chip { width: 32px; height: 30px; }
  .nav-chip--map { width: 40px; }
}
