/* SFR-Mesh public map (index.html). Dark bar and list in the colours of the
   dashboard; the map keeps the tile provider's colours. */
:root { /* A-Panel admin.css colours */
        --bg: #0e1622; --panel: #16202f; --panel-2: #1b273a; --line: #27374d; --field: #0a111b;
        --text: #dce5f0; --text-dim: #9fb0c4; --muted: #6d7f95; --accent: #4f9ed4; --cs: #ffc107; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); display: flex; flex-direction: column;
       font: 13px/1.4 system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif; }
.bar { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 6px 20px; min-height: 66px;
       background: var(--panel); border-bottom: 1px solid var(--line);
       /* Never shrink: on a phone the long station list would otherwise squeeze
          the bar and cover its lower rows, the map/list tabs among them. */
       flex: 0 0 auto; }
.bar .brand { display: inline-flex; align-items: center; }
.brand-logo { display: block; height: 40px; width: auto; }
/* What this page is, next to the logo (LGO 2026-11-04). */
.page-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--text); white-space: nowrap; }
.bar label { color: var(--text-dim); }
.bar select, .bar button { background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
                           padding: 2px 6px; font: inherit; }
.bar button { cursor: pointer; }
.status { color: var(--muted); font-size: 12px; margin-left: auto; }
/* Outward links as the A-Panel top bar chips (admin.css .topbar nav a.ext). */
.links { display: flex; gap: 8px; }
.links a.ext { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
               font-size: 0.86em; color: var(--text-dim); background: var(--field);
               line-height: 1.4; text-decoration: none; white-space: nowrap; }
.links a.ext::after { content: "\2197"; font-size: 0.85em; margin-left: 5px; opacity: .75; }
.links a.ext:hover { color: var(--text); border-color: var(--accent); background: var(--panel); }
/* Language switch as on A-Panel (admin.css .lang). */
.lang { display: flex; gap: 10px; }
.lang a { color: var(--muted); text-decoration: none; font-size: 12px; }
.lang a.on, .lang a:hover { color: var(--text); }
.wrap { flex: 1 1 auto; display: flex; min-height: 0; }
.map { flex: 1 1 auto; min-height: 300px; }
.list { flex: 0 0 260px; overflow-y: auto; border-left: 1px solid var(--line);
        background: var(--panel-2); padding: 6px 8px; font-size: 12px; }
.wrap { position: relative; }
/* First-visit notice (plan N1), over the bottom of the map. */
.notice { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 1001;
          display: flex; align-items: center; gap: 12px; max-width: min(640px, calc(100% - 24px));
          padding: 10px 14px; background: rgba(14,22,34,.94); color: var(--text);
          border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.45);
          font-size: 13px; line-height: 1.5; }
.notice[hidden] { display: none; }
.notice p { margin: 0; }
.notice button { flex: 0 0 auto; background: var(--accent); color: #06121c; border: none;
                 border-radius: 6px; padding: 6px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.gps-info a { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px;
              font-weight: 700; font-family: Georgia, serif; font-size: 16px; color: #37474f;
              text-decoration: none; cursor: pointer; }
.gps-info a:hover { color: #1e88e5; }
/* Wide screen: the items of .more sit in the bar in this order. */
.bar { position: relative; }
.more { display: contents; }
#gps-clear-track { order: 1; }
.status { order: 2; }
.links { order: 3; }
.lang { order: 4; }
.br { display: none; }
.view-tabs { display: none; }
.links .short { display: none; }
/* Narrow screen (phone, tablet portrait): the map or the station list fills
   the space under the bar, chosen by the tabs in the bar (LGO 2026-11-04). */
@media (max-width: 900px) {
  .wrap { flex-direction: column; }
  .map { flex: 1 1 auto; min-height: 0; }
  .list { display: none; flex: 1 1 auto; border-left: none; padding: 8px 12px; font-size: 14px; }
  .list li { padding: 6px 2px; border-bottom: 1px solid var(--line); }
  body.show-list .map { display: none; }
  body.show-list .list { display: block; }
  .view-tabs { display: inline-flex; order: 7; margin-left: auto; border: 1px solid var(--line);
               border-radius: 6px; overflow: hidden; }
  .view-tabs button { background: var(--panel-2); color: var(--text-dim); border: none;
                      padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
  .view-tabs button + button { border-left: 1px solid var(--line); }
  .view-tabs button.on { background: var(--accent); color: #06121c; font-weight: 600; }
}
/* Phone (LGO 2026-11-04): two rows, nothing hidden.
   Row 1: logo, the two links, the language switch.
   Row 2: period, live, clear track. The status floats on the map. */
@media (max-width: 700px) {
  .bar { gap: 6px 8px; padding: 6px 8px; min-height: 0; }
  .brand-logo { height: 24px; }
  .page-title { font-size: 13px; }
  .links { order: 1; margin-left: auto; gap: 4px; }
  .links a.ext { padding: 2px 6px; font-size: 10px; }
  .links a.ext::after { margin-left: 3px; }
  .lang { order: 2; gap: 6px; }
  .lang a { font-size: 11px; }
  .br { display: block; order: 3; flex-basis: 100%; height: 0; }
  .bar label { order: 4; font-size: 12px; white-space: nowrap; }
  #t-period { display: none; }
  #gps-clear-track { order: 5; font-size: 12px; padding: 2px 8px; }
  .notice { left: 10px; right: 10px; transform: none; max-width: none; font-size: 12px; }
  body.show-list .list { padding-top: 40px; }
  /* The status floats on the top of the map, next to the zoom buttons, so the
     bar keeps two short rows and the counts are never cut. */
  .status { position: absolute; top: calc(100% + 10px); left: 58px; right: 64px; z-index: 1000;
            margin: 0; font-size: 11px; color: var(--text); background: rgba(14,22,34,.82);
            border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px;
            width: max-content; max-width: calc(100% - 122px); pointer-events: none; }
  .links .long { display: none; }
  .links .short { display: inline; }
}
/* Side list: what is inside the map's current view. */
.gps-list-head { color: var(--text-dim); font-weight: 600; margin-bottom: 4px; }
.list h4 { margin: 8px 0 2px; font-size: 12px; color: var(--text-dim); font-weight: 600;
           border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.list ul { list-style: none; margin: 0; padding: 0; }
.list li { padding: 2px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list li:hover { background: var(--panel); }
.list .cs { color: var(--cs); }
.list .sub { color: var(--muted); }
/* Name on a second line under the callsign (LGO 2026-11-04). */
.list .nm { display: block; color: var(--text-dim); padding-left: 14px; overflow: hidden; text-overflow: ellipsis; }
/* Mobile station mark (radioSvg in the js; LGO 2026-11-05 plan C). */
.gps-rd-wrap { background: none; border: 0; }
.gps-rd { display: block; filter: drop-shadow(0 0 2px rgba(0,0,0,.55)); }
.gps-dot { display: inline-block; width: 14px; height: 14px; margin-right: 3px; vertical-align: -3px; }
.gps-dot .gps-rd { filter: none; }
/* Same marks and cards as the A-Panel map (sfr-mesh-admin/static/gps_map.css). */
.gps-tip { background: #0e1622; color: var(--cs); border: 1px solid #ffffff;
           font-size: 12px; font-weight: 700; padding: 1px 5px; box-shadow: 0 0 3px rgba(0,0,0,.6); }
.gps-tip::before { display: none; }
.gps-pop { font-size: 12px; line-height: 1.5; color: #0e1622; }
.gps-pop b { color: #0e1622; }
.gps-pop table td { padding: 0 8px 0 0; white-space: nowrap; }
.gps-st-wrap { background: none; border: none; }
.gps-st-row { display: flex; justify-content: center; }
.gps-st { display: block; margin: 0 -2px; filter: drop-shadow(0 0 1px rgba(0,0,0,.7)); }
.gps-band { display: inline-block; width: 10px; height: 10px; border-radius: 2px;
            border: 1px solid #fff; margin-right: 4px; vertical-align: -1px; }
.gps-legend { background: rgba(255,255,255,.92); color: #0e1622; padding: 3px 8px;
              border-radius: 4px; font-size: 12px; box-shadow: 0 0 3px rgba(0,0,0,.4); }
.gps-legend .gps-band { border-color: #0e1622; }
.gps-st-n { position: absolute; right: -14px; top: -6px; min-width: 16px; height: 16px;
            padding: 0 3px; border-radius: 8px; background: #0d47a1; border: 2px solid #ffffff;
            color: #ffffff; font-size: 10px; font-weight: 700; line-height: 12px; text-align: center; }
.leaflet-control-layers-overlays label:has(.gps-sep-first) {
  border-top: 1px solid #b0bec5; margin-top: 5px; padding-top: 5px; }
/* "My location" button (Leaflet bar, under the zoom buttons). */
.gps-locate a { display: flex; align-items: center; justify-content: center; color: #37474f; cursor: pointer; }
.gps-locate a:hover { color: #1e88e5; }
.gps-locate a.busy { color: #1e88e5; opacity: .6; }
/* Layer box minimize button (top right of the box) and the minimized box
   (just the layers icon). */
.leaflet-control-layers { position: relative; }
.gps-lmin { position: absolute; top: 2px; right: 4px; width: 20px; height: 20px; line-height: 18px;
            text-align: center; font-size: 16px; font-weight: 700; color: #37474f; text-decoration: none; }
.gps-lmin::before { content: "\2212"; }
.gps-lmin:hover { color: #1e88e5; }
.leaflet-control-layers-expanded { padding-right: 26px; }
.leaflet-control-layers.gps-min { padding: 0; }
.leaflet-control-layers.gps-min .leaflet-control-layers-list { display: none; }
.leaflet-control-layers.gps-min .gps-lmin { position: static; display: block; width: 36px; height: 36px;
            background: url("vendor/leaflet-1.9.4/images/layers.png") center no-repeat; background-size: 26px 26px; }
.leaflet-control-layers.gps-min .gps-lmin::before { content: ""; }
/* Mesh transmission (plan D): a band of light runs from the talking side.
   The path has pathLength 300, so one wave spans the whole line; the gap
   (320) is longer than the line, so the band never shows at both ends. */
.gps-glow { stroke-dasharray: 60 320; opacity: 0;
            animation: gps-glow-run 1.6s linear infinite, gps-glow-fade 1.6s linear infinite; }
@keyframes gps-glow-run { from { stroke-dashoffset: 60; } to { stroke-dashoffset: -300; } }
@keyframes gps-glow-fade { 0% { opacity: 0; } 15% { opacity: .9; } 85% { opacity: .9; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .gps-glow { animation: none; opacity: .6; stroke-dasharray: none; } }
