/* ВФЦ — интерактивная карта. Все классы с префиксом vfc-, глобальных селекторов нет.
   Палитра перенесена из исходной версии без изменений. */

.vfc-map {
  --vfc-accent: #7FD8FF;
  --vfc-accent-soft: rgba(127, 216, 255, 0.16);
  --vfc-panel: #070D33;
  --vfc-text: #fff;
  --vfc-muted: rgba(255, 255, 255, 0.5);
  position: relative;
  color: var(--vfc-text);
  -webkit-font-smoothing: antialiased;
}
.vfc-map *,
.vfc-map *::before,
.vfc-map *::after { box-sizing: border-box; }

/* ---------- сцена ---------- */
.vfc-stage {
  position: relative;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(ellipse 900px 700px at 50% 48%, #0D1750 0%, #070D33 55%, #04081F 100%);
}

/* Десктоп: обрезки нет намеренно — тултип нижней плашки не помещается в сцену
   на узких экранах (при 1024 она всего 588 px высотой) и срезался бы по краю.
   Фоновые слои скругляются собственным border-radius. */
.vfc-map[data-mode="desktop"] .vfc-stage {
  aspect-ratio: 1328 / 800;
  overflow: visible;
}

/* Мобильный: обрезка обязательна. Тултипов у плашек здесь нет (описание уходит
   в карточку под сценой), зато глобус при выборе страны увеличивается почти
   втрое и без обрезки наезжает на карточку и чипы. */
.vfc-map[data-mode="mobile"] .vfc-stage {
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  background: radial-gradient(ellipse 420px 520px at 50% 22%, #0D1750 0%, #070D33 55%, #04081F 100%);
}

.vfc-stars {
  position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit; overflow: hidden;
  background-image:
    radial-gradient(circle at 8% 14%, rgba(255,255,255,0.4) 0.6px, transparent 1.6px),
    radial-gradient(circle at 90% 20%, rgba(255,255,255,0.35) 0.6px, transparent 1.6px),
    radial-gradient(circle at 14% 80%, rgba(255,255,255,0.3) 0.6px, transparent 1.6px),
    radial-gradient(circle at 86% 84%, rgba(255,255,255,0.35) 0.6px, transparent 1.6px),
    radial-gradient(circle at 50% 6%, rgba(255,255,255,0.3) 0.6px, transparent 1.6px);
}
.vfc-sphere {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 34% 28%, rgba(42,64,152,0.95) 0%, rgba(16,26,90,0.95) 50%, rgba(6,10,38,0.98) 82%);
  box-shadow: 0 0 120px rgba(94,139,255,0.35),
              inset -60px -80px 140px rgba(0,0,0,0.75),
              inset 20px 30px 90px rgba(127,216,255,0.16);
}
.vfc-ring { position: absolute; border-radius: 50%; border: 1px dashed rgba(127,216,255,0.18); pointer-events: none; }
.vfc-ring--outer { border-color: rgba(127,216,255,0.09); }

.vfc-dots { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; pointer-events: none; border-radius: inherit; }
.vfc-svg  { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* ---------- география ---------- */
.vfc-grat    { fill: none; stroke: rgba(127,216,255,0.05); stroke-width: 0.5; }
.vfc-borders { fill: none; stroke: rgba(127,216,255,0.16); stroke-width: 0.5; }
.vfc-coast   { fill: none; stroke: rgba(127,216,255,0.4);  stroke-width: 0.7; }
.vfc-land    { fill: rgba(127,216,255,0.07); }

.vfc-map[data-mode="mobile"] .vfc-borders { stroke: rgba(127,216,255,0.14); stroke-width: 0.4; }
.vfc-map[data-mode="mobile"] .vfc-coast   { stroke: rgba(127,216,255,0.42); stroke-width: 0.6; }
.vfc-map[data-mode="mobile"] .vfc-grat    { stroke-width: 0.4; }

/* ---------- дуги ---------- */
.vfc-arc-glow { fill: none; stroke: rgba(127,216,255,0.09); stroke-width: 3.5; stroke-linecap: round; transition: stroke 0.25s, stroke-width 0.25s; }
.vfc-arc-core { fill: none; stroke: rgba(159,217,245,0.75); stroke-width: 0.9; stroke-dasharray: 5 9; animation: vfc-dash 2.5s linear infinite; transition: stroke 0.25s, stroke-width 0.25s, opacity 0.25s; }
.vfc-arc.is-active .vfc-arc-glow { stroke: rgba(127,216,255,0.3); stroke-width: 6; }
.vfc-arc.is-active .vfc-arc-core { stroke: #fff; stroke-width: 1.6; }
.vfc-svg.is-dim .vfc-arc:not(.is-active) .vfc-arc-core { opacity: 0.3; }
.vfc-svg.is-dim .vfc-arc:not(.is-active) .vfc-arc-glow { stroke: rgba(127,216,255,0.04); }
@keyframes vfc-dash { to { stroke-dashoffset: -28; } }

.vfc-map[data-mode="mobile"] .vfc-arc-glow { stroke: rgba(127,216,255,0.08); stroke-width: 3; }
.vfc-map[data-mode="mobile"] .vfc-arc-core { stroke: rgba(159,217,245,0.5); stroke-width: 0.8; stroke-dasharray: 4 7; }
.vfc-map[data-mode="mobile"] .vfc-svg.is-dim .vfc-arc:not(.is-active) .vfc-arc-core { opacity: 0.2; }

/* ---------- города ---------- */
.vfc-city { cursor: pointer; }
.vfc-city .vfc-hit { fill: transparent; }
.vfc-city .vfc-dot { fill: #DFF3FF; transition: fill 0.2s, opacity 0.2s; }
.vfc-city .vfc-pulse {
  fill: none; stroke: var(--vfc-accent); stroke-width: 1.2;
  transform-box: fill-box; transform-origin: center;
  animation: vfc-pulse 2.6s ease-out infinite;
}
.vfc-city text {
  font-size: 11.5px; font-weight: 600; fill: rgba(255,255,255,0.78);
  letter-spacing: 0.01em; pointer-events: none;
  transition: opacity 0.25s, fill 0.25s;
}
.vfc-svg.is-dim .vfc-city:not(.is-active) text { opacity: 0.4; }
.vfc-city.is-active .vfc-dot  { fill: #fff; }
.vfc-city.is-active text      { fill: #fff; }
@keyframes vfc-pulse { from { transform: scale(1); opacity: 0.8; } to { transform: scale(3.5); opacity: 0; } }

.vfc-map[data-mode="mobile"] .vfc-city .vfc-dot   { fill: rgba(223,243,255,0.8); }
.vfc-map[data-mode="mobile"] .vfc-city .vfc-pulse { stroke-width: 1; opacity: 0; }
.vfc-map[data-mode="mobile"] .vfc-city.is-active .vfc-pulse { opacity: 1; }
.vfc-map[data-mode="mobile"] .vfc-city text { font-size: 10.5px; fill: #fff; opacity: 0; }
.vfc-map[data-mode="mobile"] .vfc-city.is-active text { opacity: 1; }
.vfc-map[data-mode="mobile"] .vfc-svg.is-dim .vfc-city:not(.is-active) .vfc-dot { opacity: 0.35; }

/* ---------- хаб ---------- */
.vfc-hub text     { font-weight: 700; fill: #fff; font-size: 13px; }
.vfc-hub .vfc-sub { font-size: 10.5px; font-weight: 500; fill: rgba(255,255,255,0.6); letter-spacing: 0.08em; }
.vfc-hub .vfc-halo {
  fill: rgba(127,216,255,0.35);
  transform-box: fill-box; transform-origin: center;
  animation: vfc-halo 2.2s ease-out infinite;
}
.vfc-hub .vfc-core { fill: #fff; filter: drop-shadow(0 0 10px rgba(127,216,255,0.9)); }
@keyframes vfc-halo { from { transform: scale(0.85); opacity: 0.8; } to { transform: scale(2.2); opacity: 0; } }
.vfc-map[data-mode="mobile"] .vfc-hub text     { font-size: 11px; }
.vfc-map[data-mode="mobile"] .vfc-hub .vfc-sub { font-size: 8.5px; }

/* ---------- плашки стран (десктоп) ---------- */
.vfc-callouts { position: absolute; inset: 0; pointer-events: none; }
.vfc-callout {
  position: absolute; display: flex; align-items: center; gap: 16px;
  --vfc-ring: 66px;
  transform: translate(calc(var(--vfc-ring) / -2), -50%); z-index: 5; pointer-events: auto;
  appearance: none; border: 0; background: none; padding: 0; margin: 0;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.vfc-callout.is-active { z-index: 20; }
.vfc-callout .vfc-ringc { width: var(--vfc-ring); height: var(--vfc-ring); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform 0.25s; }
.vfc-callout .vfc-inner { width: calc(var(--vfc-ring) - 12px); height: calc(var(--vfc-ring) - 12px); border-radius: 50%; background: var(--vfc-panel); display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 700; }
.vfc-callout .vfc-name  { display: block; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; transition: color 0.2s; }
.vfc-callout .vfc-sub   { display: block; margin-top: 3px; font-size: 12px; color: var(--vfc-muted); white-space: nowrap; }
.vfc-callout.is-active .vfc-ringc { transform: scale(1.08); }
.vfc-callout.is-active .vfc-name  { color: var(--vfc-accent); }

/* Плашки не масштабировались вместе со сценой: на планшете сцена ужимается
   с 1299 до 800, а кружки оставались 66px и налезали на глобус. */
@media (max-width: 1280px) {
  .vfc-callout { --vfc-ring: 56px; gap: 13px; }
  .vfc-callout .vfc-inner { font-size: 17px; }
  .vfc-callout .vfc-name  { font-size: 17px; }
  .vfc-callout .vfc-sub   { font-size: 11px; }
}
@media (max-width: 1100px) {
  .vfc-callout { --vfc-ring: 48px; gap: 11px; }
  .vfc-callout .vfc-inner { font-size: 15px; }
  .vfc-callout .vfc-name  { font-size: 15px; }
  .vfc-callout .vfc-sub   { font-size: 11px; }
}
@media (max-width: 950px) {
  .vfc-callout { --vfc-ring: 42px; gap: 9px; }
  .vfc-callout .vfc-inner { font-size: 14px; }
  .vfc-callout .vfc-name  { font-size: 14px; }
  .vfc-callout .vfc-sub   { font-size: 11px; }
}
.vfc-callout .vfc-tip {
  position: absolute; top: calc(100% + 12px); left: 0; width: min(250px, 46vw);
  background: rgba(8,14,40,0.97); border: 1px solid rgba(127,216,255,0.4);
  border-radius: 12px; padding: 13px 15px; opacity: 0; pointer-events: none;
  transition: opacity 0.2s; box-shadow: 0 12px 40px rgba(0,0,0,0.5); z-index: 6;
}
.vfc-callout.is-active .vfc-tip { opacity: 1; }
.vfc-callout--right .vfc-tip { left: auto; right: 0; }
.vfc-callout .vfc-tip b    { display: block; font-size: 11px; font-weight: 800; color: var(--vfc-accent); letter-spacing: 0.06em; text-transform: uppercase; }
.vfc-callout .vfc-tip span { display: block; margin-top: 7px; font-size: 12.5px; line-height: 1.5; color: rgba(255,255,255,0.85); }

/* ---------- чипы и карточка (мобильный) ---------- */
.vfc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.vfc-chip {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid rgba(255,255,255,0.16); border-radius: 999px;
  padding: 7px 14px 7px 7px; background: rgba(255,255,255,0.03);
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
  appearance: none; font: inherit; color: inherit;
}
.vfc-chip .vfc-ringc { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.vfc-chip .vfc-inner { width: 22px; height: 22px; border-radius: 50%; background: var(--vfc-panel); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.vfc-chip .vfc-name  { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.vfc-chip.is-active       { border-color: var(--vfc-accent); background: rgba(127,216,255,0.1); }
.vfc-chip.is-active .vfc-name { color: var(--vfc-accent); }

.vfc-card {
  margin-top: 18px; background: rgba(8,14,40,0.85);
  border: 1px solid rgba(127,216,255,0.28); border-radius: 18px; padding: 20px;
}
.vfc-card[hidden] { display: none; }
.vfc-card.is-shown { animation: vfc-rise 0.4s ease-out; }
@keyframes vfc-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.vfc-card .vfc-label  { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--vfc-accent); font-weight: 700; }
.vfc-card h3          { margin: 10px 0 0; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.vfc-card h3 span     { font-size: 12px; font-weight: 500; color: var(--vfc-muted); letter-spacing: 0; }
.vfc-card .vfc-cities { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.vfc-card .vfc-cities div { border: 1px solid rgba(127,216,255,0.35); border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 600; color: #BFE8FF; }
.vfc-card p           { margin: 14px 0 0; font-size: 13.5px; line-height: 1.55; color: rgba(255,255,255,0.75); }

.vfc-reset {
  position: absolute; right: 12px; top: 12px;
  border: 1px solid rgba(255,255,255,0.22); background: rgba(8,14,40,0.7);
  border-radius: 999px; padding: 7px 12px; font-size: 11.5px; font-weight: 600;
  color: #fff; cursor: pointer; transition: opacity 0.25s; font-family: inherit;
}
.vfc-reset[hidden] { display: none; }

/* ---------- фокус: обязателен для клавиатуры ---------- */
.vfc-map :focus-visible {
  outline: 2px solid var(--vfc-accent);
  outline-offset: 3px;
  border-radius: 6px;
}
.vfc-city:focus-visible { outline-offset: 0; }

/* ---------- текстовая версия для скринридеров ---------- */
.vfc-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- уважение к настройке «меньше движения» ---------- */
@media (prefers-reduced-motion: reduce) {
  .vfc-map .vfc-arc-core,
  .vfc-map .vfc-pulse,
  .vfc-map .vfc-halo,
  .vfc-map .vfc-card.is-shown { animation: none; }
  .vfc-map .vfc-pulse { opacity: 0; }
  .vfc-map * { transition-duration: 0.01ms !important; }
}

/* Выпадающий список направлений — только для песочницы.
   Живёт над картой: выбор сверху, результат под ним. */

.vfc-picker {
  position: relative;
  margin-bottom: 14px;
  font-family: var(--font-ui, system-ui, sans-serif);
}

.vfc-picker__trigger {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-on-dark, rgba(255,255,255,.3));
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
  color: #fff; font: inherit; text-align: left; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.vfc-picker__trigger:hover,
.vfc-picker.is-open .vfc-picker__trigger { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.45); }
.vfc-picker__trigger:focus-visible { outline: 2px solid #7FD8FF; outline-offset: 2px; }

.vfc-picker__value { flex: 1; font-size: 17px; font-weight: 500; }

/* Стрелка: единственный намёк, что элемент раскрывается, — поэтому заметная. */
.vfc-picker__arrow {
  width: 10px; height: 10px; flex-shrink: 0;
  border-right: 2px solid rgba(255,255,255,.7);
  border-bottom: 2px solid rgba(255,255,255,.7);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .22s;
}
.vfc-picker.is-open .vfc-picker__arrow { transform: rotate(-135deg) translate(-3px, -3px); }

.vfc-picker__list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px;
  background: #0d1830;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  max-height: 62vh; overflow-y: auto;
}

.vfc-picker__opt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px;
  border: 0; border-radius: 10px;
  background: transparent; color: #fff; font: inherit; text-align: left; cursor: pointer;
}
.vfc-picker__opt:hover { background: rgba(255,255,255,.08); }
.vfc-picker__opt.is-active { background: rgba(127,216,255,.14); }
.vfc-picker__opt.is-active .vfc-name,
.vfc-picker__opt.is-active .vfc-picker__all { color: #7FD8FF; }
/* Кружок со счётчиком: форму и центрирование задаём здесь целиком —
   в основном файле они висят на селекторе .vfc-callout, сюда не достают. */
.vfc-picker__opt .vfc-ringc {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.vfc-picker__opt .vfc-inner {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--vfc-panel, #0d1830);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
}
.vfc-picker__opt .vfc-name { font-size: 16px; font-weight: 500; white-space: nowrap; }

/* «Все направления» — без кружка, поэтому выравниваем по тексту остальных. */
.vfc-picker__all { font-size: 16px; font-weight: 500; padding-left: 46px; }

/* Чипы в этой версии не используются. */
.vfc-chips { display: none; }
