/* =====================================================================
   Навигация по разделам страницы — handoff «Подарочные сертификаты», §2.
   Разметка: template-parts/components/section-nav.php
   Поведение: assets/js/section-nav.js
   ≥760px — «островок» под шапкой; <760px — док снизу + шторка.
   Прячется, пока открыто другое меню (классы на <html> из site-header.js).
   ===================================================================== */

/* ---------- Островок (≥760px) ---------- */
.vb-island {
  position: fixed; left: 50%; top: 84px; z-index: 55;
  width: max-content; max-width: calc(100vw - 20px);
  border-radius: var(--r-pill); overflow: hidden;
  background: var(--vb-glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 16px 40px rgba(20,16,10,.28), inset 0 1px 0 rgba(255,255,255,.08);
  transform: translate(-50%, 0) scale(1); opacity: 1;
  transition: transform .45s var(--ease-soft), opacity .3s ease, top .35s ease;
}
.vb-island__track { display: flex; gap: 2px; padding: 5px; overflow-x: auto; scrollbar-width: none; }
.vb-island__track::-webkit-scrollbar { display: none; }
.vb-island__item {
  flex: none; min-height: 40px; padding: 0 16px; border-radius: var(--r-pill);
  display: flex; align-items: center; white-space: nowrap; text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(245,244,239,.86);
  transition: background .35s ease, color .35s ease;
}
.vb-island__item:hover { color: var(--vb-gold-soft); }
.vb-island__item.is-active { background: var(--vb-gold); color: var(--vb-ink); }

@media (min-width: 1100px) {
  .vb-island { top: 142px; }
  .vb-hdr-compact .vb-island { top: 72px; }
}
.admin-bar .vb-island { margin-top: 32px; }

/* Не показываем два меню одновременно; vb-ctor-open — шаги конструктора сертификатов */
.vb-hdr-hover .vb-island, .vb-mega-open .vb-island,
.vb-menu-open .vb-island, .vb-lightbox-open .vb-island,
.vb-ctor-open .vb-island {
  opacity: 0; transform: translate(-50%, -14px) scale(.96); pointer-events: none;
}

/* ---------- Док (<760px) ---------- */
.vb-dock {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 55;
  min-height: 52px; max-width: calc(100vw - 32px); padding: 0 8px 0 18px;
  border-radius: var(--r-pill); border: 1px solid rgba(255,255,255,.12);
  background: rgba(38,36,33,.88);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 16px 36px rgba(20,16,10,.35);
  display: none; align-items: center; gap: 12px; cursor: pointer; color: var(--vb-cream-ink);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  transition: transform .35s var(--ease-soft), opacity .25s ease;
}
.vb-dock.is-visible { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.vb-dock__dots { display: flex; gap: 4px; }
.vb-dock__dots span { width: 6px; height: 6px; border-radius: var(--r-pill); background: rgba(245,244,239,.25); transition: width .35s ease, background .35s ease; }
.vb-dock__dots span.is-past { background: rgba(231,217,138,.55); }
.vb-dock__dots span.is-active { width: 16px; background: var(--vb-gold); }
.vb-dock__name { font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vb-dock__up { width: 36px; height: 36px; flex: none; border-radius: var(--r-pill); background: var(--vb-gold); color: var(--vb-ink); display: flex; align-items: center; justify-content: center; }
.vb-dock__up svg { width: 16px; height: 16px; stroke-width: 2.4; }

/* ---------- Шторка ---------- */
.vb-sheet { position: fixed; inset: 0; z-index: 95; background: rgba(15,12,8,.5); display: flex; align-items: flex-end; }
.vb-sheet[hidden] { display: none; }
.vb-sheet__panel {
  width: 100%; background: var(--vb-graphite); color: var(--vb-cream-ink);
  border-radius: 26px 26px 0 0; padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 50px rgba(0,0,0,.35);
  animation: vb-sheet-in .3s var(--ease-soft);
}
@keyframes vb-sheet-in { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.vb-sheet__handle { display: block; width: 40px; height: 4px; border-radius: var(--r-pill); background: rgba(255,255,255,.25); margin: 0 auto 14px; }
.vb-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 10px; }
.vb-sheet__title { font-family: var(--font-display); font-weight: 600; font-size: 11px; letter-spacing: var(--tr-label); text-transform: uppercase; color: var(--vb-gold); }
.vb-sheet__close {
  width: 40px; height: 40px; border-radius: var(--r-pill); border: 1px solid rgba(255,255,255,.18);
  background: transparent; color: var(--vb-cream-ink); cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.vb-sheet__close svg { width: 20px; height: 20px; }
.vb-sheet__list { display: flex; flex-direction: column; gap: 4px; }
.vb-sheet__item {
  min-height: 54px; padding: 0 16px; border-radius: 16px; display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,.05); color: var(--vb-cream-ink); text-decoration: none;
}
.vb-sheet__item:hover { color: var(--vb-cream-ink); }
.vb-sheet__dot { width: 8px; height: 8px; flex: none; border-radius: var(--r-pill); background: var(--vb-gold); }
.vb-sheet__label { flex: 1; font-weight: 700; font-size: 17px; }
.vb-sheet__arrow { font-size: 16px; opacity: .6; }
.vb-sheet__item.is-active { background: var(--vb-gold); color: var(--vb-ink); }
.vb-sheet__item.is-active .vb-sheet__dot { background: var(--vb-ink); }

@media (max-width: 759.98px) {
  .vb-island { display: none; }
  .vb-dock { display: flex; }
  .vb-menu-open .vb-dock, .vb-lightbox-open .vb-dock, .vb-sheet-open .vb-dock,
  .vb-ctor-open .vb-dock { opacity: 0; pointer-events: none; }
}
@media (min-width: 760px) { .vb-sheet { display: none !important; } }

/* hide_idle: островок скрыт, пока ни один раздел не активен (страница педагога). */
@media (min-width: 760px) {
  .vb-secnav--hide-idle.is-idle .vb-island {
    opacity: 0;
    transform: translate(-50%, -14px) scale(.96);
    pointer-events: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vb-island, .vb-dock { transition: opacity .2s ease; }
  .vb-sheet__panel { animation: none; }
}
