/*
 * Visit / Tourist Visa finder (/services/visit-tourist-visa/).
 * Loaded only by that page, after rgab.css, and uses its brand tokens (--navy, --gold, --gold-text, --charcoal,
 * --porcelain, --soft-white, --sand). No inline styles anywhere: the deployed policy has no 'unsafe-inline'.
 *
 * Motion is small and fast (transform and opacity only). Every animation and transition is switched off in the
 * reduced-motion block at the end of this file.
 */

/* Flags. Windows browsers draw a flag emoji as two letters; this font holds only the flag glyphs, and the
   unicode-range means nothing is downloaded unless a flag is on the page. Same file the country selector uses. */
@font-face {
  font-family: "RGAB Flags";
  src: url("../fonts/TwemojiCountryFlags.woff2") format("woff2");
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  font-display: swap;
}

.vf-root { overflow-x: clip; }

/* ---------- Hero ---------- */
.vf-hero {
  background:
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2288%22%20height%3D%2288%22%3E%3Cpath%20d%3D%22M0%2022%20H32%20V54%20H64%20V88%22%20stroke%3D%22%23D7B85E%22%20stroke-width%3D%222%22%20fill%3D%22none%22%20opacity%3D%220.14%22/%3E%3Cpath%20d%3D%22M22%200%20V32%20H54%20V64%20H88%22%20stroke%3D%22%23D7B85E%22%20stroke-width%3D%222%22%20fill%3D%22none%22%20opacity%3D%220.14%22/%3E%3C/svg%3E") repeat,
    var(--navy);
  color: var(--soft-white);
  padding: 56px 0 48px;
}
.vf-hero .eyebrow { color: var(--gold); }
.vf-hero h1 { color: var(--soft-white); margin-bottom: 0.4em; }
.vf-hero-grid { display: grid; gap: 8px; align-items: center; }
.vf-lede { max-width: 560px; font-size: 1.05rem; opacity: 0.92; margin-bottom: 8px; }

.vf-route { max-width: 420px; width: 100%; margin: 0 auto; }
.vf-route svg { display: block; width: 100%; height: auto; overflow: visible; }
.vf-route-base { fill: none; stroke: rgba(215, 184, 94, 0.28); stroke-width: 2; }
.vf-route-line { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 3 10; }
.vf-dot circle { fill: var(--gold); }
.vf-dot .vf-ring { fill: none; stroke: var(--gold); stroke-width: 1.5; opacity: 0.55; transform-box: fill-box; transform-origin: center; }
.vf-plane path { fill: var(--soft-white); }
.vf-plane-fly { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .vf-plane-still { display: none; }
  .vf-plane-fly { display: block; }
  .vf-route-line { animation: vf-dash 1.6s linear infinite; }
  .vf-ring { animation: vf-pulse 2.8s ease-out infinite; }
  .vf-dot-2 .vf-ring { animation-delay: 0.7s; }
  .vf-dot-3 .vf-ring { animation-delay: 1.4s; }
  .vf-dot-4 .vf-ring { animation-delay: 2.1s; }
}
@keyframes vf-dash { to { stroke-dashoffset: -26; } }
@keyframes vf-pulse {
  0% { transform: scale(0.7); opacity: 0.7; }
  70%, 100% { transform: scale(1.7); opacity: 0; }
}

@media (min-width: 860px) {
  .vf-hero { padding: 72px 0 56px; }
  .vf-hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 32px; }
  .vf-route { margin: 0; }
}

/* ---------- Finder panel ---------- */
.vf-finder {
  margin-top: 28px;
  background: var(--soft-white);
  color: var(--navy);
  border-radius: 12px;
  padding: 22px 20px 18px;
  box-shadow: 0 18px 40px rgba(11, 17, 30, 0.35);
}
.vf-ask {
  display: block;
  font-family: var(--font-headline);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 600;
  margin-bottom: 12px;
}
.vf-searchrow { position: relative; }
.vf-search-ico {
  position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px;
  fill: none; stroke: var(--charcoal); stroke-width: 2; stroke-linecap: round; pointer-events: none;
}
.vf-input {
  width: 100%;
  min-height: 52px;
  padding: 12px 48px 12px 44px;
  font: inherit;
  font-size: 1rem;
  color: var(--navy);
  background: #fff;
  border: 1.5px solid rgba(27, 42, 75, 0.35);
  border-radius: 10px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.vf-input::placeholder { color: var(--charcoal); opacity: 0.85; }
.vf-input:hover { border-color: var(--navy); }
.vf-input::-webkit-search-cancel-button { display: none; }
.vf-clearq {
  position: absolute; right: 6px; top: 50%; width: 40px; height: 40px; margin-top: -20px;
  border: 0; border-radius: 50%; background: transparent; color: var(--navy);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.vf-clearq:hover { background: rgba(27, 42, 75, 0.08); }

.vf-filter-row { margin-top: 16px; display: grid; gap: 12px; }
.vf-chips, .vf-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.vf-quick { padding-top: 12px; border-top: 1px solid rgba(27, 42, 75, 0.1); }
@media (min-width: 860px) {
  .vf-filter-row { grid-template-columns: 1fr auto; align-items: start; gap: 20px; }
  .vf-quick { padding-top: 0; border-top: 0; padding-left: 20px; border-left: 1px solid rgba(27, 42, 75, 0.12); }
}

.vf-chip {
  position: relative;
  min-height: 44px;
  padding: 8px 16px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--porcelain);
  border: 1.5px solid rgba(27, 42, 75, 0.25);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.vf-chip:hover { border-color: var(--navy); transform: translateY(-1px); }
.vf-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--soft-white); }
.vf-chip[aria-pressed="true"]::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--gold); vertical-align: 1px;
}
.vf-chip.is-suggested { border-color: var(--gold-text); box-shadow: 0 0 0 3px rgba(215, 184, 94, 0.55); }
.vf-chip.is-suggested::after {
  content: ""; position: absolute; top: -4px; right: -2px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--soft-white);
}
.vf-chip-count { opacity: 0.8; font-weight: 600; margin-left: 4px; }

.vf-status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.vf-status { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--charcoal); }
.vf-reset {
  min-height: 40px; padding: 6px 4px; font: inherit; font-size: 0.85rem; font-weight: 700; color: var(--navy);
  background: none; border: 0; border-bottom: 1px solid var(--gold); cursor: pointer;
}
.vf-reset:hover { color: var(--gold-text); }
.vf-note { margin: 8px 0 0; font-size: 0.8rem; color: var(--charcoal); }

/* ---------- Results ---------- */
.vf-results { padding: 48px 0 56px; }
.vf-group { margin-bottom: 40px; }
.vf-group[hidden] { display: none; }
.vf-group-h {
  display: flex; align-items: baseline; gap: 10px;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
}
.vf-group-n { font-family: var(--font-body); font-size: 0.85rem; font-weight: 700; color: var(--charcoal); }
.vf-grid {
  display: grid;
  gap: 20px;
  align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
}

.vf-card {
  position: relative;
  background: var(--soft-white);
  border: 1px solid rgba(27, 42, 75, 0.1);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, opacity 200ms ease;
}
.vf-card[hidden] { display: none; }
.vf-card:hover, .vf-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(27, 42, 75, 0.12);
  border-color: rgba(215, 184, 94, 0.6);
}
.vf-card.is-leaving { opacity: 0; transform: scale(0.95); pointer-events: none; }
.vf-card.is-entering { opacity: 0; transform: translateY(10px) scale(0.97); }

.vf-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding-right: 74px; min-height: 40px; }
.vf-flag {
  font-family: "RGAB Flags", "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: 2rem; line-height: 1; flex: none;
}
.vf-card h4 { margin: 0; font-size: 1.2rem; line-height: 1.2; overflow-wrap: anywhere; }
.vf-badge {
  position: absolute; top: 14px; right: 14px;
  padding: 3px 10px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--navy); background: var(--sand); border: 1px solid var(--gold-text); border-radius: 999px;
}
.vf-sum { margin: 0 0 16px; font-size: 0.95rem; color: var(--charcoal); }
.vf-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.vf-btn { padding: 12px 14px; font-size: 0.75rem; letter-spacing: 0.05em; cursor: pointer; font-family: var(--font-body); text-align: center; }
.vf-toggle { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
.vf-toggle::after {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; margin-bottom: 2px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
  transition: transform 220ms ease;
}
.vf-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); margin-bottom: -2px; }

/* Expanding panel: animate the grid row from 0fr to 1fr. */
.vf-panel {
  display: grid; grid-template-rows: 0fr; visibility: hidden;
  transition: grid-template-rows 260ms ease, visibility 0s linear 260ms;
}
.vf-card.is-open .vf-panel { grid-template-rows: 1fr; visibility: visible; transition-delay: 0s; }
.vf-panel-in { min-height: 0; overflow: hidden; }
.vf-panel-body { margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(27, 42, 75, 0.25); font-size: 0.85rem; line-height: 1.5; }
.vf-p-title { font-family: var(--font-headline); font-size: 1.05rem; font-weight: 600; margin: 0 0 6px; }
.vf-p-h { margin: 12px 0 4px; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold-text); }
.vf-panel ul { margin: 0; padding-left: 1.1em; }
.vf-panel li { margin-bottom: 4px; }
.vf-p-note { margin: 12px 0 0; padding: 10px 12px; background: var(--sand); border-radius: 6px; font-size: 0.85rem; }
.vf-panel p { margin-bottom: 6px; }

/* Empty state */
.vf-empty {
  max-width: 560px; margin: 8px auto 0; padding: 36px 24px; text-align: center;
  background: var(--soft-white); border: 1px dashed rgba(27, 42, 75, 0.35); border-radius: 12px;
}
.vf-empty[hidden] { display: none; }
.vf-empty-ico { width: 64px; height: 64px; fill: none; stroke: var(--navy); stroke-width: 2.5; stroke-linecap: round; margin: 0 auto 8px; display: block; }
.vf-empty-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 16px; }
.vf-empty-actions .btn { cursor: pointer; font-family: var(--font-body); }

/* ---------- Quick helper ---------- */
.vf-helper {
  max-width: 720px; margin: 0 auto;
  background: var(--porcelain); border: 1px solid rgba(27, 42, 75, 0.12); border-radius: 12px; padding: 24px 20px;
}
.vf-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 0.85rem; font-weight: 700; color: var(--charcoal); }
.vf-bar { flex: 1; height: 6px; background: rgba(27, 42, 75, 0.12); border-radius: 3px; overflow: hidden; }
.vf-bar-fill { display: block; height: 100%; width: 100%; background: var(--gold); border-radius: 3px; transform-origin: left; transition: transform 300ms ease; }
.vf-q { border: 0; margin: 0; padding: 0; min-width: 0; }
.vf-q legend { font-family: var(--font-headline); font-size: clamp(1.2rem, 3vw, 1.5rem); font-weight: 600; margin-bottom: 14px; padding: 0; }
.vf-q legend:focus { outline: none; }
.vf-opts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.vf-opt { position: relative; display: block; }
.vf-opt input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.vf-opt span {
  display: flex; align-items: center; min-height: 54px; padding: 10px 14px; font-weight: 700; font-size: 0.95rem;
  background: var(--soft-white); border: 1.5px solid rgba(27, 42, 75, 0.25); border-radius: 10px;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.vf-opt:hover span { border-color: var(--navy); transform: translateY(-1px); }
.vf-opt input:checked + span { background: var(--navy); color: var(--soft-white); border-color: var(--navy); }
.vf-opt input:focus-visible + span { outline: 2px solid var(--midnight); outline-offset: 2px; box-shadow: 0 0 0 2px var(--soft-white); }
.vf-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.vf-nav .btn { cursor: pointer; font-family: var(--font-body); }
.vf-nav .btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.vf-result h3 { margin-bottom: 8px; }
.vf-result:focus { outline: none; }
.vf-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; padding: 0; list-style: none; }
.vf-pills li { padding: 6px 14px; background: var(--sand); border: 1px solid var(--gold-text); border-radius: 999px; font-weight: 700; font-size: 0.9rem; }
.vf-result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.vf-result-actions .btn { cursor: pointer; font-family: var(--font-body); }
.vf-step-in { animation: vf-fade 260ms ease backwards; }
@keyframes vf-fade { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* ---------- How RGAB helps ---------- */
.vf-how { padding: 72px 0; }
.vf-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; counter-reset: vf; position: relative; }
.vf-step { position: relative; padding-left: 76px; counter-increment: vf; min-height: 56px; }
.vf-step::before {
  content: ""; position: absolute; left: 27px; top: 56px; bottom: -28px; width: 2px; background: rgba(215, 184, 94, 0.9);
  transform-origin: top; transform: scaleY(0); transition: transform 500ms ease 250ms;
}
.vf-step:last-child::before { display: none; }
.vf-step.vf-in::before { transform: scaleY(1); }
.vf-step-ico {
  position: absolute; left: 0; top: 0; width: 56px; height: 56px; border-radius: 50%;
  background: var(--navy); display: grid; place-items: center;
}
.vf-step-ico svg { width: 30px; height: 30px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vf-step h3 { margin-bottom: 0.25em; font-size: 1.2rem; }
.vf-step h3::before { content: counter(vf) ". "; color: var(--gold-text); }
.vf-step p { margin: 0; font-size: 0.95rem; color: var(--charcoal); }
@media (min-width: 860px) {
  .vf-steps { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .vf-step { padding: 72px 0 0; }
  .vf-step::before { left: 56px; right: -24px; top: 27px; bottom: auto; width: auto; height: 2px; transform-origin: left; transform: scaleX(0); }
  .vf-step.vf-in::before { transform: scaleX(1); }
}

.vf-cta { padding: 72px 0; }
.vf-legal { padding: 48px 0 64px; }
.vf-legal-h { font-size: 1.25rem; font-family: var(--font-headline); margin-bottom: 0.5em; }
.vf-legal .compliance-box a { color: var(--navy); font-weight: 700; }

/* ---------- Scroll rise (only when script is running; fails open without it) ---------- */
.vf-js .vf-rise { opacity: 0; }
.vf-js .vf-rise.vf-in { opacity: 1; animation: vf-rise 520ms ease backwards; animation-delay: calc(var(--vf-i, 0) * 70ms); }
@keyframes vf-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Reduced motion: everything still, everything visible ---------- */
@media (prefers-reduced-motion: reduce) {
  .vf-route-line, .vf-ring { animation: none; }
  .vf-js .vf-rise, .vf-js .vf-rise.vf-in { opacity: 1; animation: none; }
  .vf-chip, .vf-card, .vf-input, .vf-toggle::after, .vf-panel, .vf-opt span, .vf-bar-fill, .vf-step::before { transition: none; }
  .vf-chip:hover, .vf-card:hover, .vf-card:focus-within, .vf-opt:hover span { transform: none; }
  .vf-card.is-leaving, .vf-card.is-entering { transform: none; }
  .vf-step-in { animation: none; }
  .vf-step::before { transform: none; }
}
