/* SHARKJ web trial - look of the SHARKJ Android app (rounded Nunito, navy cards, glowing lights). */
@font-face { font-family: "SJ Nunito"; src: url("/static/fonts-ui/nunito_round_bold.ttf") format("truetype");
  font-weight: 400 700; font-display: swap; }
@font-face { font-family: "SJ Nunito"; src: url("/static/fonts-ui/nunito_round_black.ttf") format("truetype");
  font-weight: 800 900; font-display: swap; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --card: #1C2733; --card2: #243242; --line: rgba(255,255,255,.12); --blue: #33B5FF; --red: #FF3B3B; --end: #E53935;
  --purple: #5B2DB3; --purple-light: #9C6BFF; --banner: #134A73; --text: #fff; --sub: rgba(255,255,255,.72);
  --lbl: rgba(255,255,255,.58); --chip: rgba(255,255,255,.16); --sug: rgba(255,255,255,.08); --fab: rgba(28,39,51,.96);
  --shadow: 0 8px 28px rgba(0,0,0,.45); --font: "SJ Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --top: env(safe-area-inset-top, 0px); --bot: env(safe-area-inset-bottom, 0px);
}
body.day {
  --card: #FFFFFF; --card2: #F1F4F8; --line: rgba(0,0,0,.08); --text: #1B1F24; --sub: rgba(27,31,36,.66);
  --lbl: rgba(27,31,36,.55); --chip: rgba(27,31,36,.08); --sug: rgba(27,31,36,.05); --fab: rgba(255,255,255,.97);
  --shadow: 0 8px 26px rgba(0,0,0,.18); --banner: #1565C0;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; width: 100%; overflow: hidden; background: #1C222B; color: var(--text);
  font-family: var(--font); font-weight: 700; -webkit-font-smoothing: antialiased; }
body.day { background: #F4F2ED; }
#map { position: fixed; inset: 0; }
.hidden { display: none !important; }
button, input, textarea { font-family: var(--font); }
button { cursor: pointer; border: 0; touch-action: manipulation; }
svg { display: block; }

/* ------------------------------------------------------------------ cards */
.card { position: fixed; left: 8px; right: 8px; max-width: 520px; margin: 0 auto; background: var(--card); color: var(--text);
  border-radius: 24px; padding: 14px 16px; box-shadow: var(--shadow); z-index: 10; }
.card.top { top: calc(8px + var(--top)); animation: slideDown .22s ease-out; }
.card.bottom { bottom: calc(8px + var(--bot)); animation: slideUp .22s ease-out; }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideDown { from { transform: translateY(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row + .row { margin-top: 10px; }
.grow { flex: 1; min-width: 0; }
.t15 { font-weight: 700; font-size: 15px; color: var(--sub); }
.t17 { font-weight: 800; font-size: 17px; }
.t19 { font-weight: 900; font-size: 19px; white-space: nowrap; }
.t21 { font-weight: 900; font-size: 21px; }
.t30 { font-weight: 900; font-size: 30px; line-height: 1.05; }
.sub { font-size: 13px; font-weight: 700; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub.wrap { white-space: normal; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbl { font-size: 12px; color: var(--lbl); font-weight: 800; }

.field { flex: 1; min-width: 0; min-height: 40px; background: none; border: 0; outline: none; color: var(--text);
  font: 800 17px var(--font); padding: 4px 0; }
.field.big { width: 100%; font-size: 17px; }
.field::placeholder { color: var(--sub); opacity: 1; }

/* ------------------------------------------------------------------ glowing dots with a travelling light */
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; margin: 0 9px 0 6px; position: relative; }   /* smaller (user 2026-11-07) */
.dot.red { background: var(--red); color: var(--red); box-shadow: 0 0 5px var(--red); }
.dot.blue { background: var(--blue); color: var(--blue); box-shadow: 0 0 5px var(--blue); }
.dot::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid currentColor; opacity: .3; }
.dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: conic-gradient(from var(--a), transparent 0 55%, currentColor 78%, #fff 86%, currentColor 93%, transparent);
  -webkit-mask: radial-gradient(circle, transparent 6px, #000 7px); mask: radial-gradient(circle, transparent 6px, #000 7px);
  animation: around 2.8s linear infinite; }
@keyframes around { to { --a: 360deg; } }

/* dark-purple ✕ with the same light running through it */
.x { flex: none; width: 40px; height: 40px; border-radius: 50%; background: none; display: flex; align-items: center;
  justify-content: center; padding: 0; }
.x span { font: 900 22px var(--font); line-height: 1; color: var(--purple);
  background: conic-gradient(from var(--a), var(--purple) 0 55%, var(--purple-light) 78%, #fff 86%, var(--purple-light) 93%, var(--purple));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 3px rgba(156,107,255,.55)); animation: around 2.8s linear infinite; }

/* GO card frame: a bright light travelling round the border */
.glow::before { content: ""; position: absolute; inset: -2px; border-radius: 26px; padding: 3px; pointer-events: none;
  background: conic-gradient(from var(--a), transparent 0 60%, var(--blue) 80%, #fff 86%, var(--blue) 92%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: around 2.8s linear infinite; }
.glow::after { content: ""; position: absolute; inset: -1px; border-radius: 25px; border: 1px solid rgba(51,181,255,.22);
  pointer-events: none; }

/* ------------------------------------------------------------------ suggestions (2-3 visible, then scroll) */
.suggest { max-height: 168px; overflow-y: auto; overscroll-behavior: contain; margin-top: 8px;
  -webkit-mask: linear-gradient(#000 calc(100% - 18px), transparent); mask: linear-gradient(#000 calc(100% - 18px), transparent); }
.suggest:empty { display: none; }
.sug { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 9px 12px 9px 14px; margin-bottom: 6px;
  background: var(--sug); border-radius: 16px; cursor: pointer; transition: background .15s; animation: fadeIn .18s; }
.sug:active { background: rgba(51,181,255,.25); }
.sug .tiny { width: 4px; height: 4px; border-radius: 50%; background: var(--blue); flex: none; }
.sug .n { font-weight: 900; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug .k { font-size: 12px; color: var(--lbl); margin-top: 2px; }
.sug .d { color: var(--blue); font-weight: 900; font-size: 12px; margin-left: auto; white-space: nowrap; padding-left: 8px; }

/* ------------------------------------------------------------------ route info, chips, GO */
.cams { color: #4DD0E1; font-weight: 900; font-size: 12px; margin-top: 4px; }
body.day .cams { color: #00838F; }
.chips { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.chip { background: var(--chip); color: var(--text); font: 900 13px var(--font); min-height: 36px; padding: 6px 12px;
  border-radius: 99px; transition: background .15s, transform .1s; }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--blue); color: #fff; }
.chip.wide { min-height: 44px; padding: 8px 18px; }
.go { width: 100%; min-height: 44px; margin-top: 10px; background: var(--blue); color: #fff; font: 900 17px var(--font);
  letter-spacing: .5px; border-radius: 99px; box-shadow: 0 4px 14px rgba(51,181,255,.35); transition: transform .1s, filter .15s; }
.go:active { transform: scale(.98); filter: brightness(.95); }
.row .go { margin-top: 0; flex: 1; }

/* ------------------------------------------------------------------ driving */
.banner { display: flex; align-items: center; gap: 16px; background: var(--banner); color: #fff; border-radius: 28px;
  padding: 16px 20px; }
.turn { width: 64px; height: 64px; flex: none; display: flex; align-items: center; justify-content: center;
  font-size: 50px; font-weight: 900; color: #fff; }
.turn svg { width: 56px; height: 56px; }
.cam-alert { position: fixed; top: calc(132px + var(--top)); left: 50%; transform: translateX(-50%); z-index: 10;
  background: var(--end); color: #fff; padding: 10px 20px; border-radius: 99px; font-weight: 900; font-size: 17px;
  white-space: nowrap; box-shadow: 0 6px 18px rgba(229,57,53,.45); animation: pop .25s ease-out; }
@keyframes pop { from { transform: translateX(-50%) scale(.85); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.drive { display: flex; align-items: center; gap: 8px; padding: 14px 14px 14px 20px; }
.drive > div { flex: 1; min-width: 0; }
.end { flex: none; background: var(--end); color: #fff; font: 900 17px var(--font); width: 72px; height: 48px; border-radius: 99px;
  box-shadow: 0 4px 14px rgba(229,57,53,.35); }

/* white-ringed speedometer, colours cycling with a mixed glow; red when over the limit */
.speedo { position: fixed; left: 14px; bottom: calc(112px + var(--bot)); width: 50px; height: 50px; z-index: 10;
  border-radius: 50%; background: #0b0f14; border: 2px solid #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,.4); animation: fadeIn .2s; }
.speedo.over { background: var(--end); }
#speed { font-weight: 900; font-size: 17px; line-height: 1; }
.speedo .kmh { font-size: 7px; font-weight: 900; margin-top: 1px; }
#speed, .speedo .kmh { animation: hue 7.2s linear infinite; }
@keyframes hue {
  0%, 100% { color: #00E5FF; text-shadow: 0 0 6px #7C4DFF; }
  25% { color: #7C4DFF; text-shadow: 0 0 6px #FF4FD8; }
  50% { color: #FF4FD8; text-shadow: 0 0 6px #FFEA00; }
  75% { color: #FFEA00; text-shadow: 0 0 6px #00E5FF; } }

/* ------------------------------------------------------------------ map buttons */
.fab { position: fixed; z-index: 9; border-radius: 50%; background: var(--fab); color: var(--blue); display: flex;
  align-items: center; justify-content: center; border: 1px solid var(--line); box-shadow: 0 3px 10px rgba(0,0,0,.35);
  transition: transform .1s; animation: fadeIn .2s; }
.fab:active { transform: scale(.94); }
.fab svg { width: 24px; height: 24px; }
.fab.menu { left: 50%; bottom: calc(18px + var(--bot)); width: 56px; height: 56px; margin-left: -28px; font-size: 24px; color: var(--text); }
.fab.loc { right: 16px; bottom: calc(24px + var(--bot)); width: 40px; height: 40px; font-size: 18px; }
.fab.loc svg { width: 20px; height: 20px; }
.driving .fab.loc { bottom: calc(117px + var(--bot)); }

/* ------------------------------------------------------------------ menu sheet: round glass bubbles, 4 per row */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(16,19,24,.9); color: #fff;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-radius: 24px 24px 0 0;
  padding: 6px 16px calc(16px + var(--bot)); animation: slideUp .22s ease-out; }
body.day .sheet { background: rgba(209,209,214,.88); color: #1B1F24; }
.handle { width: 40px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.35); margin: 0 auto 12px; }
body.day .handle { background: rgba(0,0,0,.25); }
.bubbles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 480px; margin: 0 auto; }
.bubble { width: calc(25% - 6px); min-height: 80px; background: none; color: inherit; font: 900 11px var(--font);
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.bubble span { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 21px; background: linear-gradient(160deg, rgba(255,255,255,.22), rgba(255,255,255,.06));
  border: .75px solid rgba(255,255,255,.28); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); transition: transform .1s; }
body.day .bubble span { background: linear-gradient(160deg, rgba(255,255,255,.9), rgba(255,255,255,.55)); border-color: rgba(0,0,0,.1); }
.bubble:active span { transform: scale(.93); }
.bubble svg { width: 24px; height: 24px; }

/* ------------------------------------------------------------------ status hint, toast */
.hint { position: fixed; top: calc(8px + var(--top)); left: 50%; transform: translateX(-50%); z-index: 15;
  max-width: calc(100% - 96px); background: rgba(28,39,51,.92); color: #fff; padding: 7px 14px; border-radius: 99px;
  font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 3px 10px rgba(0,0,0,.35); animation: fadeIn .2s; }
.toast { position: fixed; left: 50%; bottom: calc(120px + var(--bot)); transform: translateX(-50%); z-index: 60;
  width: max-content; max-width: calc(100% - 48px); background: rgba(10,14,19,.9); color: #fff; padding: 11px 16px;
  border-radius: 14px; font-weight: 800; font-size: 14px; text-align: center; animation: fadeIn .2s; }

/* ------------------------------------------------------------------ sign in */
.screen { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 80% at 50% 0%, #22344a 0%, #1C222B 55%, #12171d 100%); padding: 24px;
  overflow-y: auto; animation: fadeIn .25s; }
.login-card { width: min(380px, 100%); text-align: center; color: #fff; }
.logo { width: 76px; height: 76px; border-radius: 20px; background: #fff; color: #0b0f14; font: 900 54px var(--font);
  margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.login-card h1 { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: 1px; }
.login-sub { margin: 4px 0 22px; color: rgba(255,255,255,.65); font-size: 14px; }
.login-label { display: block; text-align: left; font-size: 13px; color: rgba(255,255,255,.7); margin: 0 0 6px 4px; }
.login-input { width: 100%; min-height: 54px; padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.07); color: #fff; font: 900 20px var(--font); text-align: center; letter-spacing: 2px;
  outline: none; transition: border-color .15s, box-shadow .15s; }
.login-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(51,181,255,.25); }
.login-card .go { margin-top: 14px; min-height: 50px; }
.err { color: #FF8A8A; margin-top: 10px; min-height: 1.2em; font-size: 14px; }
.small { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.55); margin-top: 22px; line-height: 1.45; }
.small.credit { margin-top: 8px; }

/* ------------------------------------------------------------------ feedback, camera card */
textarea { width: 100%; height: 120px; margin: 10px 0; border-radius: 14px; border: 1px solid var(--line); padding: 12px;
  background: var(--sug); color: var(--text); font: 700 15px var(--font); resize: none; outline: none; }
textarea:focus { border-color: var(--blue); }
.photo { width: 100%; border-radius: 16px; margin-top: 10px; max-height: 40vh; object-fit: cover; }
#camCard .chip.wide { margin-top: 12px; width: 100%; }

/* ------------------------------------------------------------------ map credits (small "i") */
.maplibregl-ctrl-top-left { top: calc(4px + var(--top)); }
.maplibregl-ctrl-attrib { font-size: 9px; font-family: var(--font); }
.maplibregl-ctrl-attrib.maplibregl-compact { background: rgba(28,39,51,.85); color: #ccd; }
.maplibregl-ctrl-attrib a { color: #9cf; }

/* ------------------------------------------------------------------ small phones, reduced motion */
@media (max-width: 370px) {
  .t30 { font-size: 26px; } .t19 { font-size: 17px; } .banner { gap: 12px; padding: 14px 16px; }
  .turn { width: 54px; height: 54px; } .turn svg { width: 48px; height: 48px; }
  .bubble { font-size: 10px; } .end { width: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* "Where to?" typing animation (drawn over the empty field) */
#goCard { position: fixed; }
.where-anim { position: absolute; display: flex; align-items: center; pointer-events: none;
  font: 800 16px "SJ Nunito", ui-rounded, system-ui, sans-serif; color: rgba(255,255,255,.92); white-space: nowrap; }
body.day .where-anim { color: #1C2733; }
.where-anim .cur { color: #33B5FF; margin-left: 1px; animation: sjblink .9s steps(1) infinite; text-shadow: 0 0 6px #33B5FF; }
@keyframes sjblink { 50% { opacity: 0; } }
/* search: a thin moving light while the next answer loads, rows fade in */
.suggest { position: relative; }
.suggest.busy::before { content: ""; position: sticky; top: 0; display: block; height: 2px; margin-bottom: 4px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, #33B5FF, transparent); background-size: 50% 100%; background-repeat: no-repeat;
  animation: sjload 0.9s linear infinite; }
@keyframes sjload { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.sug.fade { animation: sjfade .22s ease-out both; }
@keyframes sjfade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sug.fade, .suggest.busy::before, .where-anim .cur { animation: none; } }

/* Destination and Where to: the same, smaller size (user 2026-11-07) */
#dest, #whereTo { font-size: 16px !important; }
#topCard .row { position: relative; }

/* long destination names end with "…" instead of running into the ✕ */
#dest { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; min-width: 0; }

/* while new results load, the old ones dim and cannot be tapped (no picking an outdated place) */
.suggest.busy .sug { opacity: .45; pointer-events: none; transition: opacity .15s; }

/* camera warning when just driving around (no route, no turn banner): at the top of the screen, like the app */
body:not(.driving) .cam-alert { top: calc(16px + var(--top)); }

/* CCTV update box */
#cctvCard .sub.wrap { white-space: normal; margin: 4px 0 8px; }
.cctv-types { flex-wrap: wrap; }
.cctv-photo { display: block; margin-top: 10px; padding: 12px; border: 1.5px dashed rgba(255,255,255,.3);
  border-radius: 14px; text-align: center; font-weight: 800; cursor: pointer; }
body.day .cctv-photo { border-color: rgba(0,0,0,.25); }
.cctv-photo input { display: none; }
#cctvNote { height: 64px; }

/* Waze-style reports */
.rep-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.rep-grid button { background: rgba(255,255,255,.08); color: inherit; border-radius: 16px; padding: 10px 4px;
  font: 800 13px "SJ Nunito", ui-rounded, system-ui, sans-serif; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rep-grid button span { font-size: 26px; line-height: 1; }
.rep-grid button:active { transform: scale(.96); background: rgba(51,181,255,.3); }
body.day .rep-grid button { background: rgba(0,0,0,.06); }
.rep-alert { background: #1565C0; top: calc(190px + var(--top)); box-shadow: 0 6px 18px rgba(21,101,192,.45); }
body:not(.driving) .rep-alert { top: calc(70px + var(--top)); }
