/* Icon Map Solar Eclipse Tracker
   Page-scoped styles. Everything lives under .eclipse-tool so nothing here can
   leak into the rest of the site. */

/* call to action under the hero strapline */
.hero-cta-line {
  margin-top: 14px;
  font: 400 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  color: rgba(255,255,255,.86);
}
.hero-cta-line strong { color: #fff; font-weight: 600; }
.hero-cta-line a {
  color: #fff; font-weight: 600; white-space: nowrap;
  border-bottom: 1px solid rgba(255,255,255,.55); text-decoration: none;
}
.hero-cta-line a:hover, .hero-cta-line a:focus { border-bottom-color: #fff; }

.eclipse-tool {
  --ec-accent: #0c62a6;          /* Icon Map brand blue */
  --ec-accent-hi: #0d74c2;
  --ec-accent-soft: rgba(12,98,166,.13);
  --ec-accent-line: rgba(12,98,166,.42);
  --ec-bright: #2E9BD6;          /* the shadow itself, the brightest blue */
  --ec-violet: #33587D;          /* penumbra contours */
  --ec-ice: #0a3a5c;             /* the chosen place */
  --ec-panel: #ffffff;
  --ec-panel-2: #f6f8fb;
  --ec-line: #dfe6ed;
  --ec-line-soft: #edf1f6;
  --ec-txt: #143850;
  --ec-txt-dim: #567089;
  --ec-txt-faint: #8798a8;
  /* the site's own stacks: it sets type per component rather than on body, so a
     full-bleed block outside .content must state them or fall back to serif */
  --ec-sans: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  --ec-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Helvetica Neue", monospace;
  --ec-r: 10px;
  --ec-shadow: 0 2px 4px -2px rgba(0,0,0,.10), 0 8px 24px -10px rgba(0,0,0,.18);

  color: var(--ec-txt);
  font-family: var(--ec-sans);
  font-size: 14px;
  line-height: 1.5;

  /* full bleed, map left, settings right so both are visible at once */
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  height: clamp(620px, calc(100vh - 130px), 1000px);
  border-top: 1px solid var(--ec-line);
  border-bottom: 1px solid var(--ec-line);
  background: var(--ec-panel);
}

.eclipse-shell {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
}

/* ---------- map stage ---------- */
.eclipse-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #e9edf2;
}
.eclipse-map { position: absolute; inset: 0; }
.eclipse-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  width: 100%; height: 100%;
}

/* floating panels over the map */
.ec-float {
  position: absolute;
  background: rgba(255,255,255,.93);
  border: 1px solid var(--ec-line);
  border-radius: var(--ec-r);
  box-shadow: var(--ec-shadow);
  backdrop-filter: blur(6px);
}

/* the view-from-a-place card, docked top right over the map */
.ec-sky {
  top: 12px; right: 12px;
  width: 268px;
  overflow: hidden;
  z-index: 3;
}
.ec-sky__canvas { display: block; width: 100%; height: 152px; background: #b9c8da; }
.ec-sky__head {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-bottom: 1px solid var(--ec-line-soft);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ec-txt-faint);
}
.ec-sky__head b { margin-left: auto; text-transform: none; letter-spacing: 0; font-family: var(--ec-mono); font-size: 11.5px; color: var(--ec-txt-dim); }
.ec-sky__foot {
  display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap;
  padding: 8px 10px; border-top: 1px solid var(--ec-line-soft); background: var(--ec-panel-2);
  font-size: 11.5px; color: var(--ec-txt-dim);
}
.ec-sky__pct { font-family: var(--ec-mono); font-size: 19px; color: var(--ec-txt); line-height: 1; font-variant-numeric: tabular-nums; }
.ec-sky__phase { color: var(--ec-accent); font-weight: 700; }
.ec-sky__empty { padding: 14px 12px; font-size: 12.5px; color: var(--ec-txt-dim); line-height: 1.5; }
.ec-sky__actions { display: flex; gap: 6px; margin-top: 10px; }

/* bottom centre keeps clear of the zoom control, the sky card and the legend;
   lifted clear of MapLibre's attribution strip */
.ec-status {
  bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px 7px 11px; border-radius: 999px;
  font-size: 12.5px; max-width: min(56%, 480px); text-align: center;
}
.ec-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ec-txt-faint); flex: none; }
.ec-status.is-live { border-color: var(--ec-accent-line); }
.ec-status.is-live .dot { background: var(--ec-accent); box-shadow: 0 0 0 3px rgba(12,98,166,.20); }

.ec-legend { left: 12px; bottom: 12px; padding: 10px 12px; width: 214px; z-index: 3; }
.ec-legend__t { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ec-txt-faint); margin-bottom: 7px; }
.ec-ramp { height: 9px; border-radius: 3px; border: 1px solid var(--ec-line-soft); }
.ec-ramp__labels { display: flex; justify-content: space-between; font-family: var(--ec-mono); font-size: 10px; color: var(--ec-txt-dim); margin-top: 3px; }
.ec-legend__row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ec-txt-dim); margin-top: 7px; }
.ec-legend__sw { width: 16px; height: 10px; border-radius: 2px; flex: none; }

.ec-readout {
  right: 12px; bottom: 12px; z-index: 3;
  padding: 6px 10px; font-family: var(--ec-mono); font-size: 11.5px;
  font-variant-numeric: tabular-nums; color: var(--ec-txt-dim); white-space: pre;
}

.ec-basemap { left: 12px; top: 92px; z-index: 3; padding: 6px; }
.ec-globe {
  left: 12px; top: 134px; z-index: 3;
  padding: 6px 11px; color: var(--ec-txt); cursor: pointer;
  font-family: var(--ec-sans); font-weight: 600; font-size: 12px; line-height: 1.2;
}
.ec-globe[aria-pressed="true"] { background: var(--ec-accent); border-color: var(--ec-accent); color: #fff; }
.ec-globe:focus-visible { outline: 2px solid var(--ec-accent); outline-offset: 2px; }

.ec-next { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--ec-line-soft); }
.ec-next .ec-facts__v { color: var(--ec-accent); font-weight: 700; }
.ec-basemap select {
  border: 0; background: transparent; color: var(--ec-txt);
  font-family: var(--ec-sans); font-size: 12px;
  padding: 2px 4px; max-width: 168px;
}

/* ---------- transport + scrub, one thin row under the map ---------- */
.ec-timebar {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 16px;
  border-top: 1px solid var(--ec-line);
  background: var(--ec-panel);
}
.ec-timebar .ec-btn { padding: 6px 12px; flex: none; }
.ec-timebar .ec-select { padding: 6px 6px; flex: none; }
.ec-timebar__end {
  font-family: var(--ec-mono); font-size: 11px; font-variant-numeric: tabular-nums;
  color: var(--ec-txt-faint); flex: none; min-width: 40px;
}
.ec-timebar__end:first-of-type { margin-left: 6px; }
.ec-timebar__end:last-child { text-align: right; }
.ec-timebar .ec-tl { flex: 1; min-width: 90px; }

/* ---------- settings rail ---------- */
.eclipse-rail {
  border-left: 1px solid var(--ec-line);
  background: var(--ec-panel);
  overflow-y: auto;
  overscroll-behavior: contain;
  min-width: 0;
}

.ec-card {
  background: var(--ec-panel);
  border-bottom: 1px solid var(--ec-line);
  padding: 15px 16px 17px;
}
.ec-card--last { border-bottom: 0; }
.ec-card__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.ec-card__t { font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--ec-txt-faint); font-weight: 700; }
.ec-card__note { margin-left: auto; }

.ec-clock { font-family: var(--ec-mono); font-variant-numeric: tabular-nums; }
.ec-clock__utc { font-size: 26px; line-height: 1.1; letter-spacing: -.01em; }
.ec-clock__utc .z { color: var(--ec-txt-faint); font-size: .58em; margin-left: 5px; letter-spacing: .06em; }
.ec-clock__date { font-size: 12.5px; color: var(--ec-txt-dim); margin-top: 3px; }
.ec-clock__local { font-size: 12px; color: var(--ec-txt-faint); margin-top: 4px; }
.ec-chip {
  display: inline-block; margin-top: 9px; padding: 3px 9px; border-radius: 999px;
  font-family: var(--ec-mono); font-size: 11px; font-variant-numeric: tabular-nums;
  background: var(--ec-accent-soft); color: #0a4d84; border: 1px solid var(--ec-accent-line);
}
.ec-chip.is-now { background: var(--ec-panel-2); color: var(--ec-txt-dim); border-color: var(--ec-line); }

.ec-row { display: flex; gap: 6px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.ec-btn {
  appearance: none; border: 1px solid #cdd8e2; background: #fff; color: var(--ec-txt);
  border-radius: 8px; padding: 7px 11px; cursor: pointer;
  font-family: var(--ec-sans); font-weight: 600; font-size: 13px; line-height: 1.2;
  transition: background .15s ease, border-color .15s ease;
}
.ec-btn:hover { background: #f6f9fb; border-color: #bcd0e1; }
.ec-btn:focus-visible { outline: 2px solid var(--ec-accent); outline-offset: 2px; }
.ec-btn--primary { background: var(--ec-accent); border-color: var(--ec-accent); color: #fff; }
.ec-btn--primary:hover { background: #0d74c2; border-color: #0d74c2; }
.ec-btn--sm { padding: 4px 9px; font-size: 12px; }
.ec-btn--grow { flex: 1; text-align: center; padding-inline: 4px; }
.ec-btn[disabled] { opacity: .5; cursor: not-allowed; }
/* form controls take the UA font unless told otherwise */
.ec-select {
  border: 1px solid #cdd8e2; background: #fff; border-radius: 8px;
  padding: 7px 8px; cursor: pointer; color: var(--ec-txt);
  font-family: var(--ec-sans); font-size: 12.5px;
}

.ec-tl { position: relative; height: 24px; }
.ec-tl__band { position: absolute; top: 8px; height: 8px; border-radius: 2px; background: rgba(12,98,166,.20); border-inline: 1px solid rgba(12,98,166,.55); }
.ec-tl__mark { position: absolute; top: 3px; width: 1px; height: 18px; background: var(--ec-accent); }
.ec-scrub {
  -webkit-appearance: none; appearance: none; position: absolute; inset: 0;
  width: 100%; height: 24px; margin: 0; background: transparent; cursor: pointer;
}
.ec-scrub::-webkit-slider-runnable-track { height: 24px; background: transparent; }
.ec-scrub::-moz-range-track { height: 24px; background: transparent; }
.ec-scrub::-webkit-slider-thumb {
  -webkit-appearance: none; width: 3px; height: 24px; border-radius: 2px;
  background: var(--ec-accent); box-shadow: 0 0 0 1px #fff;
}
.ec-scrub::-moz-range-thumb { width: 3px; height: 24px; border: 0; border-radius: 2px; background: var(--ec-accent); box-shadow: 0 0 0 1px #fff; }

.ec-jump { display: flex; gap: 6px; margin-top: 12px; }
.ec-jump input {
  flex: 1; min-width: 0; border: 1px solid #cdd8e2; background: #fff;
  border-radius: 8px; padding: 7px 8px; font-family: var(--ec-mono); font-size: 12px; color: var(--ec-txt);
}

.ec-ecl__date { font-size: 19px; font-weight: 700; line-height: 1.2; }
.ec-kind {
  display: inline-block; margin-top: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; font-weight: 700;
  border: 1px solid var(--ec-line); color: var(--ec-txt-dim); background: var(--ec-panel-2);
}
.ec-kind.k-total { color: #0a4d84; border-color: var(--ec-accent-line); background: var(--ec-accent-soft); }
.ec-kind.k-annular { color: var(--ec-ice); border-color: rgba(45,120,160,.5); background: rgba(45,120,160,.12); }
.ec-kind.k-hybrid { color: var(--ec-violet); border-color: rgba(51,88,125,.5); background: rgba(51,88,125,.12); }

.ec-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 14px; }
.ec-facts__k { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ec-txt-faint); font-weight: 700; }
.ec-facts__v { font-family: var(--ec-mono); font-size: 13.5px; font-variant-numeric: tabular-nums; margin-top: 2px; }

.ec-list-label { margin-top: 15px; display: block; }
/* positioned so a row's offsetTop is measured against the list, which is what
   the scroll-to-selected maths assumes */
.ec-list {
  position: relative;
  margin-top: 7px; max-height: 230px; overflow-y: auto;
  border: 1px solid var(--ec-line-soft); border-radius: 8px;
}
.ec-list__i {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 6px 10px; background: none; border: 0; border-bottom: 1px solid var(--ec-line-soft);
  cursor: pointer; color: inherit; font: inherit;
}
.ec-list__i:last-child { border-bottom: 0; }
.ec-list__i:hover { background: var(--ec-panel-2); }
.ec-list__i.is-on { background: var(--ec-accent-soft); }
.ec-list__i .d { font-family: var(--ec-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.ec-list__i .t { font-size: 11px; color: var(--ec-txt-dim); margin-left: auto; text-transform: capitalize; }

.ec-place { font-family: var(--ec-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.ec-place--empty { font-family: inherit; font-size: 12.5px; color: var(--ec-txt-dim); line-height: 1.5; }
.ec-contacts { width: 100%; border-collapse: collapse; margin-top: 12px; font-family: var(--ec-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.ec-contacts th {
  text-align: left; font-family: inherit; font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ec-txt-faint); font-weight: 700; padding-bottom: 5px;
}
.ec-contacts td { padding: 3px 0; border-top: 1px solid var(--ec-line-soft); }
.ec-contacts td:first-child { font-family: inherit; font-size: 12px; color: var(--ec-txt-dim); }
.ec-contacts td.n { text-align: right; }
.ec-contacts tr.is-key td { color: #0a4d84; font-weight: 700; }

/* Full bleed, flush with the map above. Two columns rather than one long
   measure, so the block fills the width without 200-character lines. */
.eclipse-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 34px;
  padding: 20px 16px 28px;
  background: #fff;
}
@media (max-width: 860px) { .eclipse-notes { grid-template-columns: 1fr; gap: 12px; } }
.eclipse-note {
  font: 400 14px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  color: #4a5a6a; margin: 0;
}
.eclipse-note b { color: #0a1a2b; font-weight: 600; }

/* narrower desktops: keep both columns, just give the rail less room */
@media (max-width: 1180px) {
  .eclipse-tool { grid-template-columns: minmax(0, 1fr) 330px; }
  .ec-sky { width: 232px; }
  .ec-sky__canvas { height: 132px; }
  .ec-legend { display: none; }
}

/* below this the rail cannot sit beside the map, so it stacks under it */
@media (max-width: 860px) {
  .eclipse-tool {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }
  .eclipse-shell { height: 62vh; min-height: 380px; }
  .eclipse-rail { border-left: 0; border-top: 1px solid var(--ec-line); overflow: visible; }
  .ec-sky { width: 190px; top: 8px; right: 8px; }
  .ec-sky__canvas { height: 112px; }
  .ec-legend, .ec-readout { display: none; }
  .ec-status { max-width: calc(100% - 24px); font-size: 11.5px; bottom: 32px; }
  .ec-basemap { top: 86px; left: 8px; }
  .ec-globe { top: 126px; left: 8px; }
  .ec-steps .ec-btn { font-size: 12px; }
  .ec-timebar { flex-wrap: wrap; gap: 8px 9px; padding: 8px 12px; }
  .ec-timebar .ec-tl { flex-basis: 100%; order: 3; }
  .ec-timebar__end { order: 2; }
  .ec-timebar__end:last-child { margin-left: auto; }
}


