/* shipping/style.css : the GlobalShipping density globe in the site's colours (navy, gold, ivory).
   No web fonts are fetched: "DM Sans" is used only if the visitor already has it, otherwise the system face. */
:root {
  color-scheme: dark;
  --sea: #0b1220;
  --paper: rgba(11, 18, 32, .9);
  --line: rgba(247, 245, 240, .14);
  --ink: #f7f5f0;
  --muted: rgba(247, 245, 240, .66);
  --gold: #c9a227;
  --gold-2: #e0c35a;
  --warn: #ffb347;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--sea); color: var(--ink);
  font: 13px/1.45 var(--body); -webkit-font-smoothing: antialiased; }
#cesium { position: absolute; inset: 0; }
.cesium-viewer, .cesium-widget, .cesium-widget canvas { width: 100%; height: 100%; }
.cesium-widget canvas { outline: none; }
button, select, input { font: inherit; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }

/* ---------------------------------------------------------------- panel */
#panel {
  position: absolute; z-index: 20; top: calc(12px + env(safe-area-inset-top, 0px)); left: max(12px, env(safe-area-inset-left, 0px));
  width: 348px; max-height: calc(100% - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; min-height: 0;
  background: var(--paper); border: 1px solid rgba(201, 162, 39, .35); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.phead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line); }
.eyebrow { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); }
#panel h1 { margin: 4px 0 0; font: 600 25px/1.05 var(--display); letter-spacing: -.01em; }
#panel h1 span { color: var(--gold-2); font-style: italic; }
.pbody { overflow-y: auto; min-height: 0; padding: 0 16px; overscroll-behavior: contain; }
.pfoot { padding: 10px 16px 12px; border-top: 1px solid var(--line); display: grid; gap: 7px; }
#panel section { border-top: 1px solid var(--line); padding: 11px 0 3px; }
#panel section:first-child { border-top: none; }
label.row { display: block; margin: 0 0 9px; color: var(--muted); font-size: 11.5px; }
label.row > span.lbl { display: block; margin-bottom: 4px; letter-spacing: .02em; }
.tlabel { float: right; color: var(--ink); font-variant-numeric: tabular-nums; }
select { width: 100%; min-height: 34px; padding: 6px 8px; border-radius: 9px; color: var(--ink);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); font-size: 12.5px; }
select option, select optgroup { background: #111b2e; color: var(--ink); }
select:disabled { opacity: .45; }
input[type=range] { width: 100%; accent-color: var(--gold); margin: 2px 0; }
input[type=range]:disabled { opacity: .45; }
.chk { display: flex; align-items: center; gap: 8px; margin: 0 0 9px; font-size: 12.5px; color: var(--ink); }
.chk input { accent-color: var(--gold); width: 16px; height: 16px; flex: none; }
.dim { color: var(--muted); }
.hint { color: var(--muted); font-size: 11.5px; margin: 2px 0 9px; }
.btnrow { display: flex; gap: 6px; margin: 2px 0 9px; }
button { cursor: pointer; }
button.secondary, button.ghost { flex: 1; padding: 8px 12px; border-radius: 9999px; font-size: 12.5px; font-weight: 600;
  color: var(--ink); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .2); }
button.secondary:hover, button.ghost:hover { border-color: var(--gold-2); color: var(--gold-2); }
button.ghost { flex: none; padding: 5px 12px; font-size: 11.5px; display: none; }
details { border-top: 1px solid var(--line); padding: 10px 0 8px; }
details summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--gold-2); }
details ul { margin: 8px 0 0 16px; padding: 0; color: var(--muted); font-size: 11.5px; display: grid; gap: 5px; }
details b { color: var(--ink); font-weight: 600; }

#gridInfo { margin: 0 0 8px; display: grid; gap: 2px; }
#gridInfo .girow { color: var(--muted); font-size: 11px; }
#gridInfo .girow b { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------- legend, status, credits */
#legend .ltitle { color: var(--ink); font-size: 11.5px; font-weight: 600; margin-bottom: 4px; }
#legend .lgrad { height: 10px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, .2); }
#legend .lscale { display: flex; justify-content: space-between; color: var(--muted); font-size: 10.5px; margin-top: 3px; }
#coverage { padding: 6px 10px; border-radius: 10px; font-size: 11.5px; color: #ffd7a1;
  background: rgba(255, 158, 44, .12); border: 1px solid rgba(255, 158, 44, .45); }
#status { color: var(--muted); font-size: 10.5px; }
#status.err { color: var(--warn); }
#credits { color: rgba(247, 245, 240, .55); font-size: 10px; line-height: 1.4; }
#credits a, details a { color: var(--gold-2); }
.seg { display: flex; gap: 0; margin: 4px 0 6px; border: 1px solid rgba(201, 162, 39, .45); border-radius: 9999px; overflow: hidden; }
.seg button { flex: 1; padding: 7px 10px; border: 0; background: transparent; color: var(--ink); font-size: 12.5px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--gold); color: #0b1220; }
.seg button:not([aria-pressed="true"]):hover { color: var(--gold-2); }
#panel section > .lbl { color: var(--muted); font-size: 11.5px; }
#legend .lblock + .lblock, #legendTiers .lblock { margin-top: 8px; }
#legend .lsources { color: var(--muted); font-size: 10.5px; margin-top: 6px; }
#legend [hidden] { display: none !important; }

/* --------------------------------------------------------------- toolbar */
.toolbar { position: absolute; z-index: 21; top: calc(12px + env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
  display: flex; gap: 6px; }
.tool { width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(201, 162, 39, .4); background: var(--paper);
  color: var(--ink); font-size: 19px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.tool:hover { color: var(--gold-2); border-color: var(--gold-2); }

/* --------------------------------------------------------------- read-out */
#readout { position: absolute; z-index: 22; right: max(12px, env(safe-area-inset-right, 0px)); top: calc(60px + env(safe-area-inset-top, 0px));
  width: 280px; padding: 12px 14px 11px; border-radius: 14px; background: var(--paper);
  border: 1px solid rgba(201, 162, 39, .4); box-shadow: 0 14px 40px rgba(0, 0, 0, .4); }
#readout .rv { font: 600 19px/1.2 var(--display); padding-right: 22px; }
#readout .rw { color: var(--muted); font-size: 11px; margin-top: 4px; font-variant-numeric: tabular-nums; }
#readout .re { color: var(--gold-2); font-size: 11px; margin-top: 6px; }
#readout .re:empty { display: none; }
#readout .rh { color: var(--muted); font-size: 10.5px; margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line); }
#readout.pending .rv { opacity: .6; }
#readout.error .rv { color: var(--warn); }
#readoutClose { position: absolute; top: 6px; right: 7px; width: 26px; height: 26px; padding: 0; border-radius: 8px;
  background: transparent; color: var(--muted); border: none; font-size: 18px; line-height: 1; }
#readoutClose:hover { background: rgba(255, 255, 255, .1); color: var(--ink); }

/* --------------------------------------------------------------- embedded hint, spinner, overlays */
.wheelhint { position: absolute; z-index: 25; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 10px 16px;
  border-radius: 9999px; background: rgba(11, 18, 32, .86); border: 1px solid rgba(201, 162, 39, .45); color: var(--ink);
  font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .25s; text-align: center; max-width: calc(100% - 32px); }
.wheelhint.on { opacity: 1; }
#spinner { position: absolute; z-index: 20; bottom: 34px; right: 16px; visibility: hidden; width: 22px; height: 22px;
  border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--gold-2); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.overlay { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; padding: 24px; text-align: center;
  background: radial-gradient(circle at 20% 10%, rgba(201, 162, 39, .14) 0, transparent 30%), linear-gradient(135deg, #08101d 0%, #111b2e 45%, #1a2744 100%); }
.overlay .fmsg { color: var(--muted); max-width: 560px; font-size: 14px; }
.overlay .fwarn { display: block; margin-bottom: 6px; font: 600 24px/1.15 var(--display); color: var(--ink); }
.boot-ring { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15);
  border-top-color: var(--gold); animation: spin .9s linear infinite; }
@media (prefers-reduced-motion: reduce) { .boot-ring, #spinner { animation-duration: 3s; } .wheelhint { transition: none; } }

/* --------------------------------------------------------------- phones: the panel becomes a bottom sheet */
@media (max-width: 700px) {
  #panel { top: auto; left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px));
    bottom: calc(8px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: 58%; border-radius: 14px; }
  .phead { padding: 10px 12px 8px; align-items: center; }
  #panel h1 { font-size: 20px; }
  .eyebrow { font-size: 9.5px; letter-spacing: .1em; }
  button.ghost { display: inline-flex; }
  .pbody { padding: 0 12px; }
  .pfoot { padding: 8px 12px 10px; gap: 5px; }
  #panel.folded .pbody { display: none; }
  #panel.folded #status { display: none; }
  .toolbar { top: calc(8px + env(safe-area-inset-top, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); }
  .tool { width: 36px; height: 36px; }
  #readout { left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); width: auto;
    top: calc(98px + env(safe-area-inset-top, 0px)); }
  #spinner { top: calc(14px + env(safe-area-inset-top, 0px)); left: 14px; right: auto; bottom: auto; }
}

/* --------------------------------------------------------------- panel toggle (desktop), as on the other globes */
#panel { transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
#panel.is-collapsed { transform: translateX(calc(-100% - 24px)); opacity: 0; pointer-events: none; }
.panel-toggle { position: absolute; z-index: 21; top: calc(22px + env(safe-area-inset-top, 0px)); left: calc(max(12px, env(safe-area-inset-left, 0px)) + 348px + 10px); width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 1px solid rgba(201, 162, 39, .4); background: var(--paper); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: pointer; display: grid; place-items: center; transition: left .45s cubic-bezier(.2, .8, .2, 1); }
.panel-toggle svg { width: 16px; height: 16px; stroke: var(--ink); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s; }
.panel-toggle:hover { border-color: var(--gold-2); }
.panel-toggle:hover svg { stroke: var(--gold-2); }
.panel-toggle:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
body.panel-collapsed .panel-toggle { left: max(12px, env(safe-area-inset-left, 0px)); }
body.panel-collapsed .panel-toggle svg { transform: rotate(180deg); }
@media (max-width: 700px) { .panel-toggle { display: none; } }
@media (prefers-reduced-motion: reduce) { #panel, .panel-toggle, .panel-toggle svg { transition: none; } }

/* --------------------------------------------------------------- data sources, folded by default */
details#credits { border-top: none; padding: 0; }
details#credits summary { font-size: 11px; color: var(--muted); }
details#credits summary:hover { color: var(--gold-2); }
details#credits[open] summary { margin-bottom: 4px; }