/* forgemap.css -- ForgeMap's colours over Munin Map's page (munin/css/app.css, MIT): its tokens set
 * again from site.css's palette, and the few things ForgeMap adds to the bar (the flame, the
 * pages, the language). Munin's own rules stay as they are; only what differs is here. */

:root {
  --bg: #141110;            /* site.css --bg */
  --bg-2: #1b1715;          /* --bg-2: bars and sidebars */
  --bg-3: #221d1a;          /* --card */
  --line: #3a2f28;
  --text: #f3ede4;          /* --ink */
  --muted: #a89c92;
  --accent: #f97316;        /* --gold: the ember */
  --accent-2: #f0cf7a;      /* --trader */
  --ok: #6faf68;
  --danger: #a85757;        /* --off */
  --panel: rgba(27,23,21,.96);
  --glass: rgba(27,23,21,.92);
  --bar-a: rgba(20,17,16,.94); --bar-b: rgba(20,17,16,.8);
  --rule: rgba(58,47,40,.55);
  --hover: rgba(249,115,22,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
/* the light menus keep Munin's, with the ember for an accent */
:root[data-theme=light] { --accent: #c2410c; }

@font-face { font-family: "JetBrains Mono"; src: url("../../fonts/JetBrainsMono.woff2") format("woff2"); font-display: swap; }

/* the brand: the flame and the name, as on the other pages */
.topbar .title #title { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.topbar .title .flame { width: 16px; height: 16px; fill: var(--accent); flex: none; }

/* the other pages */
.fm-pages { display: flex; gap: 2px; margin-left: 6px; }
.fm-pages a { padding: 6px 9px; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: 13px; white-space: nowrap; }
.fm-pages a:hover { color: var(--text); background: var(--hover); }
.fm-pages a.here { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 6px 6px 0 0; }

/* FR / EN */
.fm-lang { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.fm-lang button { background: var(--bg-2); color: var(--muted); border: 0; padding: 0 8px; height: 32px; font: 600 12px var(--font); cursor: pointer; }
.fm-lang button.on { background: var(--accent); color: #141110; }

@media (max-width: 1100px) { .fm-pages a { padding: 6px 6px; } }
/* on a narrow screen the pages leave the bar for the foot of the menu */
.fm-pages-side { display: none; }
@media (max-width: 900px) {
  .fm-pages { display: none; }
  .fm-pages-side { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 12px; border-top: 1px solid var(--line); }
  .fm-pages-side a { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); text-decoration: none; font-size: 14px; }
}

/* a place's card (munin/js/layers/names.js): the name and its pencil on one line */
.fm-place .fm-name { display: flex; align-items: center; gap: 8px; }
.fm-place .fm-name .btn { padding: 0 6px; line-height: 1.4; }

/* the player's card on the map (munin/js/fmcard.js): ForgeMap's pieces of a player (js/card.js), with
   the colours site.css gives them, in Munin's card */
.fm-card { --gold: var(--accent); --hair: rgba(255,255,255,.035); --nil: #5e534b; --ink: var(--text); --ink-2: var(--muted); --pill: 999px; --off: var(--danger); }
.fm-card .fm-card-x { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; }
.fm-card .fm-card-head { display: flex; align-items: center; gap: 8px; font-size: 15px; padding-right: 20px; }
.fm-card .fm-card-state { color: var(--muted); margin: 4px 0 8px; }
.fm-card .fm-card-body { display: grid; justify-items: center; gap: 6px; margin: 8px 0; }
.fm-card .dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: #8a8577; }
.fm-card .dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.fm-card .cls { display: inline-block; padding: .1rem .45rem; border-radius: var(--pill); border: 1px solid var(--line); background: var(--hair); font-size: .62rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.fm-card .cls.early { color: var(--muted); border-style: dashed; }
.fm-card .mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; width: 100%; text-align: center; }
.fm-card .mini .m { display: grid; min-width: 0; }
.fm-card .mini .v { font-size: .92rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.fm-card .mini .k { font-size: .55rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); white-space: nowrap; }
.fm-card .mini .nil .v { color: var(--nil); font-weight: 600; }
.fm-card .radar { width: 210px; height: 210px; overflow: visible; }
.fm-card .radar .fill { fill: var(--gold); fill-opacity: .2; stroke: var(--gold); stroke-width: 1.6; stroke-linejoin: round; }
.fm-card .radar .grid { fill: none; stroke: var(--line); stroke-width: 1; }
.fm-card .radar .spoke { stroke: var(--hair); stroke-width: 1; }
.fm-card .radar .pt { fill: var(--gold); }
.fm-card .radar .lb { font-size: 9.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; fill: var(--muted); }
.fm-card .radar .lv { font-size: 9px; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.fm-card .fm-ping { font-family: var(--mono); font-size: .72em; font-weight: 700; padding: .05em .4em; border-radius: var(--pill); border: 1px solid currentColor; white-space: nowrap; }
.fm-card .fm-ping.good { color: var(--ok); } .fm-card .fm-ping.fair { color: var(--gold); } .fm-card .fm-ping.bad { color: var(--off); }

/* Street View's figure (munin/js/pegman.js), under the zoom buttons */
.fm-pegman { width: 34px; height: 34px; margin-top: 4px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); cursor: grab; display: grid; place-items: center; padding: 0; }
.fm-pegman svg, .fm-pegman-ghost svg { width: 22px; height: 22px; fill: var(--accent); }
.fm-pegman.armed { background: var(--accent); }
.fm-pegman.armed svg { fill: #141110; }
.fm-pegman-ghost { position: fixed; z-index: 3000; pointer-events: none; transform: translate(-50%, -100%); filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.fm-pegman-ghost svg { width: 30px; height: 30px; }
.leaflet-container.fm-placing { cursor: crosshair; }

/* the ping beside a player's name in their tooltip on the map (js/card.js's badge) */
.leaflet-tooltip .fm-ping { margin-left: 6px; font-family: var(--mono); font-size: .72em; font-weight: 700; padding: .05em .4em; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.leaflet-tooltip .fm-ping.good { color: var(--ok); } .leaflet-tooltip .fm-ping.fair { color: var(--accent); } .leaflet-tooltip .fm-ping.bad { color: var(--danger); }

/* ForgeMap: the cinematic tour (js/tour.js, munin/js/tourstage.js): a caption over the map, a figure
   card between stops, a player's card at the side; the bars faded while it plays */
.fm-tour { --bright: var(--text); --ink: var(--text); --ink-2: var(--muted); --gold: var(--accent); --faint: #7d7168; --card: var(--bg-3); --well: rgba(255,255,255,.04);
  --hair: rgba(255,255,255,.035); --pill: 999px; --r: 10px; --shadow-lg: 0 10px 30px rgba(0,0,0,.45); font-family: var(--font); color: var(--text); }
.fm-tour .glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(4px); }
.fm-tour .eyebrow { font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.fm-tour .tourcap { position: absolute; left: 50%; bottom: 3.2rem; transform: translateX(-50%) translateY(8px); z-index: 1000; max-width: min(520px, calc(100% - 2rem));
  padding: .7rem 1.1rem .8rem; text-align: center; opacity: 0; transition: opacity .7s ease, transform .7s ease; pointer-events: none; }
.fm-tour .tourcap.show { opacity: 1; transform: translateX(-50%); }
.fm-tour .tourcap .tt { font-size: 1.3rem; font-weight: 700; color: var(--bright); margin-top: .15rem; line-height: 1.2; }
.fm-tour .tourcap .tl { font-size: .8rem; color: var(--ink-2); margin-top: .25rem; }
.fm-tour .tourcap .ts { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem .9rem; margin-top: .45rem; font-size: .7rem; color: var(--muted); }
.fm-tour .tourcap .ts:empty, .fm-tour .tourcap .tp:empty { display: none; }
.fm-tour .tourcap .ts b { color: var(--bright); font-weight: 600; font-variant-numeric: tabular-nums; }
.fm-tour .tourcap .tp { min-height: 0; padding: 0; cursor: default; display: block; }
.fm-tour .tourcap .tp svg { margin: .4rem auto 0; }
.fm-tour .tourfig { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) translateY(8px); z-index: 1000; width: min(19rem, calc(100% - 2rem)); min-height: 0;
  padding: .8rem 1rem .9rem; cursor: default; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .7s ease, transform .7s ease; pointer-events: none; }
.fm-tour .tourfig.show { opacity: 1; transform: translate(-50%, -50%); }
.fm-tour .spot { display: flex; flex-direction: column; }
.fm-tour .spot .eyebrow { display: flex; justify-content: space-between; gap: .5rem; }
.fm-tour .spot .eyebrow .n { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--faint); }
.fm-tour .spot .v { font-size: 1.9rem; font-weight: 700; color: var(--bright); margin-top: .3rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.fm-tour .spot .v small { font-size: .76rem; font-weight: 500; color: var(--muted); }
.fm-tour .spot .c { font-size: .74rem; color: var(--muted); margin-top: .2rem; line-height: 1.35; }
.fm-tour .spot svg { display: block; width: 200px; max-width: 100%; height: 34px; margin-top: .55rem; overflow: visible; }
.fm-tour .spot .ax { stroke: var(--line); stroke-width: 1; }
.fm-tour .spot .sd { fill: var(--faint); }
.fm-tour .spot .sm { fill: var(--gold); stroke: var(--card); stroke-width: 1.5; }
.fm-tour .spot .rg { fill: none; stroke: var(--line); stroke-width: 4; }
.fm-tour .spot .rf { fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round; }
.fm-tour .spot .bb { fill: var(--well); stroke: var(--line); stroke-width: 1; }
.fm-tour .spot .bf { fill: var(--gold); }
.fm-tour .spot .t { font-size: 9.5px; fill: var(--muted); }
.fm-tour .spot .t .tb { font-weight: 600; fill: var(--ink-2); }
.fm-tour .pcard { position: absolute; left: .7rem; top: .7rem; z-index: 1000; width: 22rem; max-width: calc(100% - 1.4rem); padding: .65rem .75rem .75rem;
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateX(-8px); transition: opacity .7s ease, transform .7s ease; }
.fm-tour .pcard.show { opacity: 1; transform: none; }
.fm-tour .pcard .ph { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.fm-tour .pcard .nm { font-weight: 700; font-size: 1.05rem; color: var(--bright); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-tour .pcard .pl { font-size: .74rem; color: var(--muted); margin-top: .1rem; }
.fm-tour .pcard.ok .pl { color: var(--ok); }
.fm-tour .pcard .pb { display: flex; align-items: center; gap: .75rem; margin-top: .6rem; }
.fm-tour .pcard .viking { flex: 0 0 136px; border-radius: var(--r); }
.fm-tour .pcard .viking canvas { height: 184px; }
.fm-tour .pcard .viking figcaption { display: none; }
.fm-tour .pcard .pr { flex: 1 1 0; min-width: 0; display: grid; justify-items: center; gap: .6rem; }
.fm-tour .pcard .radar { width: 112px; height: 112px; display: block; }
.fm-tour .pcard .mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px), (max-height: 480px) {
  .fm-tour .pcard .viking { display: none; }
  .fm-tour .pcard .radar { width: 64px; height: 64px; }
}
.fm-tour-btn { font-size: 13px; }
.fm-tour-btn.on { color: var(--accent); }
body.tour .leaflet-control-container, body.tour #wind, body.tour .coords { opacity: .3; transition: opacity .6s; }
body.tour #view3d .v3d-help { display: none; }

/* ForgeMap (controles-par-mode): a control for one view only shows in it (ui.js only(), app.js setMode) */
body.mode-3d [data-only="2d"], body:not(.mode-3d) [data-only="3d"] { display: none !important; }
