/* ─── Floating pill navigation (docs/home-redesign.md, design/nav.html) ──────
   Replaces the old sidebar+topbar on every page (views/_nav_pill.erb). Global —
   loaded on every page, unlike home-vn.css — so it uses its own small, fixed
   accent palette (--navp-*) rather than the page's per-section --sec, so the
   pill keeps the same neon look regardless of which page is behind it. */

:root {
  /* Pill height + its top offset + a little breathing room, used by admin.css to park .adm-panel below it. */
  --nav-pill-h:  80px;
  --navp-bg:     rgba(20, 16, 28, .72);
  --navp-border: rgba(255,255,255,.09);
  --navp-ink:    #F3F1F8;
  --navp-muted:  #A39FB5;
  --navp-pink:   #FF4FA3;
  --navp-orange: #FF9F45;
  --navp-cyan:   #2EE6D6;
  --navp-active-bg: rgba(255,255,255,.08);
}

.nav-pill-wrap { padding: 14px max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px)); }

.nav-pill {
  position: sticky;
  top: 14px;
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--navp-bg);
  border: 1px solid var(--navp-border);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
  color: var(--navp-ink);
}

.nav-pill__brand {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 10px;
  text-decoration: none;
  color: var(--navp-ink);
  flex: none;
}
.nav-pill__brand .brand-logo { flex: none; }
.nav-pill__brand-text { font-weight: 800; font-size: 14px; letter-spacing: .02em; }
.nav-pill__brand-text span { color: var(--navp-cyan); }

.nav-pill__top { display: flex; align-items: center; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav-pill__top::-webkit-scrollbar { display: none; }

.nav-pill__link {
  display: flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 12px;
  border-radius: 999px;
  border: none; background: none;
  color: var(--navp-muted);
  font: 600 14px var(--font, inherit);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-pill__link:hover { background: var(--navp-active-bg); color: var(--navp-ink); }
.nav-pill__link.nav-link--active { background: var(--navp-active-bg); color: var(--navp-ink); }
.nav-pill__link.nav-item--off { opacity: .5; }

.nav-pill__chev { flex: none; transition: transform .15s; }
.nav-pill__group-btn[aria-expanded="true"] .nav-pill__chev { transform: rotate(180deg); }
.nav-pill__group-panel { left: 0; right: auto; }

.nav-pill__live {
  flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--navp-cyan);
  box-shadow: 0 0 0 0 rgba(46,230,214,.6);
  animation: navp-pulse 2s cubic-bezier(.2,.8,.2,1) infinite;
}
.nav-pill__cnt {
  flex: none; padding: 1px 7px; border-radius: 999px;
  background: var(--navp-pink); color: #14061A;
  font: 700 12px var(--f-mono, monospace);
}
@keyframes navp-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(46,230,214,.6); }
  70%  { box-shadow: 0 0 0 7px rgba(46,230,214,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,230,214,0); }
}

.nav-pill__search {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px; margin-left: 4px;
  border: 1px solid var(--navp-border); border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--navp-muted);
  cursor: pointer;
  flex: 1 1 auto; min-width: 0; max-width: 260px;
}
.nav-pill__search:hover { border-color: var(--navp-cyan); }
.nav-pill__search svg { flex: none; }
.nav-pill__search-ph { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; font-size: 13px; }
.nav-pill__search-ph--short { display: none; }
.nav-pill__kbd {
  flex: none; padding: 2px 6px; border-radius: 6px;
  background: rgba(255,255,255,.08); color: var(--navp-muted);
  font: 600 11px var(--f-mono, monospace);
}

.nav-pill__right { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.nav-pill__bell { position: relative; }
.nav-pill__me {
  display: flex; align-items: center; gap: 4px;
  height: 38px; padding: 2px 8px 2px 2px;
  border: none; border-radius: 999px; background: none;
  cursor: pointer; color: var(--navp-ink);
}
.nav-pill__me:hover { background: var(--navp-active-bg); }
.nav-pill__auth { height: 38px; }

/* Icon buttons reused from the old topbar (icon-btn/topbar-badge/nav-ava/lang-btn stay as-is). */
.nav-pill .icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 999px;
  border: none; background: none; color: var(--navp-muted); cursor: pointer;
}
.nav-pill .icon-btn:hover { background: var(--navp-active-bg); color: var(--navp-ink); }

/* ── Phones: collapse to brand + search icon + bell/avatar; groups move into the "Ще" sheet ── */
@media (max-width: 767px) {
  .nav-pill-wrap { padding: 10px 10px 0; }
  .nav-pill { padding: 6px; gap: 2px; }
  .nav-pill__top { display: none; }
  .nav-pill__brand-text { display: none; }
  .nav-pill__search { flex: none; width: 38px; padding: 0; justify-content: center; max-width: none; }
  .nav-pill__search-ph, .nav-pill__kbd { display: none; }
  .tg-register-btn.nav-pill__auth { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-pill__live { animation: none; }
}

/* ─── Footer disclaimer ────────────────────────────────────────────────── */
.footer-disclaimer {
  max-width: var(--content-max, 1240px);
  margin: 8px auto 0;
  padding: 0 24px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}
