/* FPV India kit: the shared top bar (<fpv-nav>) and account picture (<fpv-account>), with the site's fonts and colours.
 * Loaded by every page of fpvindia.in, this React app included. The behaviour is /kit/nav.js (lib/kit/client.js). */

@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url(/kit/fonts/barlow-400.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url(/kit/fonts/barlow-600.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url(/kit/fonts/barlow-condensed-600.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url(/kit/fonts/barlow-condensed-700.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-style: italic; font-display: swap; src: url(/kit/fonts/barlow-condensed-800-italic.woff2) format('woff2'); }

fpv-nav, fpv-account {
  --fk-ink: #0d1626; --fk-panel: #152238; --fk-raised: #1d2e4a; --fk-line: #2b3d5c; --fk-chalk: #edf1f7; --fk-mute: #94a3ba; --fk-plate: #ffd60a;
  /* the React app's own font files when there (next/font), the kit's elsewhere */
  --fk-text: var(--font-barlow, 'Barlow'), 'Segoe UI', system-ui, sans-serif;
  --fk-display: var(--font-barlow-condensed, 'Barlow Condensed'), 'Arial Narrow', sans-serif;
  font-family: var(--fk-text);
}

/* The bar */
fpv-nav { display: block; background: var(--fk-ink); border-bottom: 1px solid var(--fk-line); }
fpv-nav .fk-bar { display: flex; align-items: center; gap: 1.5rem; max-width: 80rem; margin: 0 auto; padding: .5rem 1rem; }
fpv-nav .fk-logo { display: flex; flex: none; }
fpv-nav .fk-logo img { height: 2.75rem; width: auto; display: block; }
fpv-nav .fk-links { display: flex; gap: .25rem; flex: 1; }
fpv-nav .fk-links a { padding: .5rem .75rem; font: 600 1.1875rem var(--fk-display); color: var(--fk-mute); border-bottom: 3px solid transparent; white-space: nowrap; text-decoration: none; }
fpv-nav .fk-links a:hover { color: var(--fk-chalk); }
fpv-nav .fk-links a.fk-on { color: var(--fk-chalk); border-bottom-color: var(--fk-plate); }
/* ☰/←, the page's name, the Live chip and the menu are for phones; a laptop has the whole menu in the bar */
fpv-nav .fk-lead, fpv-nav .fk-title, fpv-nav fpv-ticker, fpv-nav .fk-scrim, fpv-nav .fk-drawer { display: none; }

/* Phones: a Material 3 top app bar (56 px: ☰ or ←, the page's name, Live during a race, the account picture) and a modal
   navigation drawer from the left, over the page, which never moves */
@media (max-width: 767px) {
  fpv-nav { position: sticky; top: 0; z-index: 40; border-bottom: 0; box-shadow: 0 1px 0 var(--fk-line); }
  fpv-nav .fk-bar { gap: .25rem; height: 3.5rem; padding: 0 .5rem 0 .25rem; }
  fpv-nav .fk-links { display: none; }
  fpv-nav .fk-lead { display: grid; place-items: center; flex: none; width: 3rem; height: 3rem; border: 0; border-radius: 50%; background: none; color: var(--fk-chalk); cursor: pointer; }
  fpv-nav .fk-lead:active { background: rgb(237 241 247 / .1); }
  fpv-nav .fk-lead svg { width: 1.5rem; height: 1.5rem; }
  fpv-nav .fk-logo img { height: 2rem; }
  fpv-nav .fk-logo-wide { display: none; } /* a page with a name shows the name, the home page shows the logo */
  fpv-nav .fk-title { display: block; flex: 1; min-width: 0; padding-left: .25rem; font: 700 1.375rem/1 var(--fk-display); color: var(--fk-chalk); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  fpv-nav fpv-ticker { display: block; flex: none; }
  fpv-nav fpv-account .fk-face { width: 2rem; height: 2rem; font-size: 1rem; }
  fpv-nav .fk-scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 60; background: rgb(0 0 0 / .4); }
  fpv-nav .fk-drawer { display: flex; flex-direction: column; gap: 2px; position: fixed; top: 0; left: 0; bottom: 0; z-index: 61; width: min(22.5rem, 85vw); padding: .75rem; background: var(--fk-panel); border-radius: 0 1rem 1rem 0; overflow-y: auto; transform: translateX(-100%); visibility: hidden; transition: transform .25s cubic-bezier(.2, 0, 0, 1), visibility 0s linear .25s; }
  fpv-nav .fk-drawer:not([hidden]) { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.05, .7, .1, 1); }
  fpv-nav .fk-dhead { display: flex; align-items: center; gap: .75rem; height: 3.5rem; padding: 0 1rem; margin-bottom: .5rem; font: 700 1.25rem var(--fk-display); color: var(--fk-chalk); text-decoration: none; }
  fpv-nav .fk-dhead img { height: 2rem; width: auto; }
  fpv-nav .fk-drawer a:not(.fk-dhead) { display: flex; align-items: center; height: 3.5rem; padding: 0 1.5rem; border-radius: 1.75rem; font: 600 1.125rem var(--fk-text); color: var(--fk-chalk); text-decoration: none; }
  fpv-nav .fk-drawer a:not(.fk-dhead):active { background: rgb(237 241 247 / .08); }
  fpv-nav .fk-drawer a.fk-on { background: rgb(255 214 10 / .16); color: var(--fk-plate); }
  html.fk-menu-open, html.fk-menu-open body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { fpv-nav .fk-drawer, fpv-nav .fk-drawer:not([hidden]) { transition: none; } }

/* Live: a red chip while a race is on */
fpv-ticker .fk-livechip { display: flex; align-items: center; gap: .375rem; height: 2rem; padding: 0 .75rem; margin-right: .25rem; border: 1px solid #ff5d52; border-radius: .5rem; color: #ff5d52; font: 700 .9375rem var(--fk-display); text-decoration: none; }
fpv-ticker .fk-dot { width: .5rem; height: .5rem; border-radius: 50%; background: #ff3b30; animation: fk-pulse 1.4s ease-in-out infinite; }
@keyframes fk-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { fpv-ticker .fk-dot { animation: none; } }

/* The account picture and its panel, laid out like Google's account menu */
fpv-account { position: relative; display: flex; align-items: center; }
fpv-account .fk-login { color: var(--fk-chalk); font: 700 1rem var(--fk-display); text-transform: uppercase; text-decoration: none; padding: .375rem 1rem; border: 1px solid var(--fk-line); border-radius: 4px; transform: skewX(-10deg); white-space: nowrap; }
fpv-account .fk-login:hover { border-color: var(--fk-plate); }
fpv-account .fk-button { display: flex; padding: 2px; border: 2px solid transparent; border-radius: 9999px; background: none; cursor: pointer; }
fpv-account .fk-button:hover, fpv-account .fk-button[aria-expanded='true'] { border-color: var(--fk-plate); }
fpv-account .fk-face { position: relative; width: 2.25rem; height: 2.25rem; border-radius: 9999px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--fk-raised); color: var(--fk-chalk); font: 700 1.125rem var(--fk-display); flex: none; }
fpv-account .fk-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
fpv-account .fk-face-big { width: 4rem; height: 4rem; font-size: 1.75rem; border: 3px solid var(--fk-plate); }
fpv-account .fk-panel { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 60; width: min(23rem, calc(100vw - 1rem)); max-height: calc(100vh - 6rem); overflow-y: auto; padding: 2.75rem .75rem .75rem; background: var(--fk-ink); border: 1px solid var(--fk-line); border-radius: 1.75rem; box-shadow: 0 12px 32px rgb(0 0 0 / .45); white-space: normal; text-align: left; }
fpv-account .fk-panel[hidden] { display: none; }
fpv-account .fk-close { position: absolute; top: .5rem; right: .75rem; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 9999px; background: none; color: var(--fk-mute); font-size: 1.5rem; line-height: 1; cursor: pointer; }
fpv-account .fk-close:hover { color: var(--fk-chalk); background: var(--fk-raised); }
fpv-account .fk-card { display: flex; align-items: center; gap: 1rem; padding: 1rem; border-radius: 1.25rem; background: var(--fk-panel); }
fpv-account .fk-who { min-width: 0; }
fpv-account .fk-name { margin: 0; font: 700 1.375rem var(--fk-display); color: var(--fk-chalk); overflow-wrap: anywhere; }
fpv-account .fk-sub { margin: 0; font-size: .9375rem; color: var(--fk-mute); overflow-wrap: anywhere; }
fpv-account .fk-pill { display: block; margin-top: .75rem; padding: .875rem 1.25rem; border-radius: 9999px; background: var(--fk-panel); color: var(--fk-chalk); font-weight: 600; text-decoration: none; }
fpv-account .fk-group { margin-top: .75rem; display: flex; flex-direction: column; gap: 2px; border-radius: 1.25rem; overflow: hidden; }
fpv-account .fk-group:empty { display: none; }
fpv-account .fk-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .875rem 1.25rem; background: var(--fk-panel); color: var(--fk-chalk); font-weight: 600; text-decoration: none; }
fpv-account .fk-pill:hover, fpv-account .fk-row:hover { background: var(--fk-raised); }
fpv-account .fk-hint { font-size: .8125rem; font-weight: 400; color: var(--fk-mute); }
fpv-account .fk-foot { margin: .75rem 0 0; text-align: center; font-size: .8125rem; color: var(--fk-mute); }
fpv-account .fk-foot a { color: inherit; }
fpv-account .fk-foot a:hover { color: var(--fk-chalk); }
