/* /photography/transits: ISS, Tiangong and Hubble transits of the Sun and Moon near
   the visitor's place (ADR 0035). Light theme; the dark theme overrides
   colours in transits-dark.css. The disk drawings (Presentation/TransitDisk.cs)
   take every colour from here, so they follow the theme too. */

.ix { display: flex; flex-direction: column; gap: 26px; }

/* ---- The top: what this is, the radius, the filters ---------------------- */
.ix-hero { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
/* The photography tabs (photography.css) sit in the hero's own gap. */
.ix-hero .ph-tabs { margin-bottom: 0; }
.ix-hero h1 { font-size: clamp(1.55rem, 4.2vw, 2.25rem); line-height: 1.12; letter-spacing: -0.015em; }
.ix-lede { max-width: 66ch; color: var(--muted); font-size: 1.02rem; }

.ix-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 4px; }
.ix-form label { font-weight: 600; }
.ix-form select {
  font: inherit;
  padding: 7px 30px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.ix-form span { color: var(--muted); }
.ix-go {
  font: inherit;
  font-weight: 600;
  padding: 7px 14px;
  border: 1px solid var(--accent-moon);
  border-radius: 10px;
  background: var(--accent-moon);
  color: #fff;
  cursor: pointer;
}
/* With script the radius applies as soon as it changes. */
.js .ix-go { display: none; }

.ix-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ix-filters[hidden] { display: none; }
.ix-chip {
  font: inherit;
  font-size: 0.88rem;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.ix-chip[aria-pressed="true"] { background: var(--accent-moon-soft); border-color: var(--accent-moon); color: var(--text); font-weight: 600; }
.ix-chip.is-sun[aria-pressed="true"] { background: var(--accent-sun-soft); border-color: var(--accent-sun); }
.ix-chip:focus-visible { outline: 2px solid var(--accent-moon); outline-offset: 2px; }
.ix-chip-gap { width: 8px; }

.ix-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--muted); font-size: 0.92rem; }
.ix-summary strong { color: var(--text); }
.ix-summary-sep { color: var(--line); }

/* ---- One transit -------------------------------------------------------- */
.ix-list { display: flex; flex-direction: column; gap: 18px; }
.ix-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.ix-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent-moon); }
.ix-card.is-sun::before { background: var(--accent-sun); }
.ix-card[hidden] { display: none; }
.ix-card:target { outline: 2px solid var(--accent-moon); outline-offset: 3px; }

.ix-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
.ix-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.ix-day { font-weight: 600; }
.ix-clock { font-size: clamp(1.35rem, 3.6vw, 1.7rem); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ix-until { color: var(--muted); font-size: 0.9rem; }
.ix-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ix-tag, .ix-conf {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.ix-tag-sun { background: var(--accent-sun-soft); border-color: transparent; color: #9a4f00; }
.ix-tag-moon { background: var(--accent-moon-soft); border-color: transparent; color: var(--accent-moon); }
.ix-conf { cursor: help; }
.ix-conf-firm { background: #e6f4ea; border-color: transparent; color: #1f6b35; }
.ix-conf-likely { background: #fff4d6; border-color: transparent; color: #8a5a00; }
.ix-conf-early { background: #eef0f3; border-color: transparent; color: #4f5662; }

.ix-card-body { display: grid; grid-template-columns: 1fr; gap: 16px 22px; align-items: start; }
@media (min-width: 720px) {
  .ix-card-body { grid-template-columns: 250px 1fr; }
}
.ix-fig { margin: 0; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.ix-fig svg { width: 100%; max-width: 250px; height: auto; display: block; }
.ix-fig figcaption { color: var(--muted); font-size: 0.78rem; line-height: 1.35; text-align: center; max-width: 250px; }

.ix-detail { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ix-where { font-size: 1.02rem; }
.ix-where strong { font-weight: 700; }
.ix-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px 18px; margin: 0; }
.ix-kv > div { min-width: 0; }
.ix-kv dt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.ix-kv dd { margin: 3px 0 0; font-variant-numeric: tabular-nums; }
.ix-sub { color: var(--muted); font-size: 0.86rem; }
.ix-coords { font-variant-numeric: tabular-nums; user-select: all; white-space: nowrap; }
/* The cloud forecast: a dot graded good, fair or poor, grey without one. */
.ix-sky-dot {
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  margin-right: 0.4em;
  border-radius: 50%;
  vertical-align: 0.06em;
  border: 1.5px solid transparent;
}
.ix-sky-dot[data-grade="good"] { background: #2e8b57; }
.ix-sky-dot[data-grade="fair"] { background: #d39b00; }
.ix-sky-dot[data-grade="poor"] { background: #c0392b; }
.ix-sky-dot[data-grade="none"] { border-color: #9aa1ab; }
.ix-sky[data-wx-state="loading"] .ix-sky-dot { border-color: #9aa1ab; border-top-color: transparent; animation: ix-spin 0.9s linear infinite; }
@keyframes ix-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ix-sky[data-wx-state="loading"] .ix-sky-dot { animation: none; }
}
/* The centre line's coordinates need the room of two columns. */
.ix-kv > div:first-child { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .ix-kv:not(.ix-kv-more) > div:first-child { grid-column: span 2; }
}
.ix-copy, .ix-btn {
  font: inherit;
  font-size: 0.78rem;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--accent-moon);
  cursor: pointer;
}
.ix-copy[hidden], .ix-btn[hidden] { display: none; }
.ix-btn { font-size: 0.9rem; padding: 6px 12px; font-weight: 600; text-decoration: none; display: inline-block; }
.ix-btn:hover, .ix-copy:hover { border-color: var(--accent-moon); }
.ix-btn[aria-expanded="true"] { background: var(--accent-moon-soft); border-color: var(--accent-moon); }
.ix-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.ix-link { color: var(--accent-moon); font-size: 0.92rem; }

.ix-map {
  height: clamp(280px, 52vw, 420px);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--accent-moon-soft);
  position: relative;
}
.ix-map[hidden] { display: none; }
.ix-map-note { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; color: var(--muted); font-size: 0.9rem; text-align: center; }
.ix-map-legend {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgb(255 255 255 / 0.9);
  color: #1d1f24;
  font-size: 0.76rem;
}
.ix-map-legend i { display: inline-block; width: 18px; height: 0; margin-right: 5px; vertical-align: middle; border-top: 3px solid #c2410c; }
.ix-map-legend i.k-strip { height: 10px; border: 0; background: rgb(232 137 28 / 0.35); }
.ix-map-legend i.k-here { width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: #4a5a8c; box-shadow: 0 0 0 1px #4a5a8c; }
.ix-map-legend i.k-radius { border-top: 2px dashed #4a5a8c; }
.ix-here-dot { width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: #4a5a8c; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.3); }
.ix-near-dot { width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; background: #c2410c; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.3); }

.ix-more summary { cursor: pointer; color: var(--accent-moon); font-size: 0.9rem; width: fit-content; }
.ix-more[open] summary { margin-bottom: 10px; }
.ix-kv-more { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.ix-empty {
  padding: 22px 22px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ix-empty h2 { font-size: 1.15rem; }
.ix-empty p { color: var(--muted); }
.ix-empty-more { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* ---- The disk (TransitDisk.cs) ----------------------------------------- */
.ixd-day .ixd-sky { fill: #a9cdf0; }
.ixd-twilight .ixd-sky { fill: #4b4f86; }
.ixd-night .ixd-sky { fill: #0b1130; }
.ixd-s0 { stop-color: #fff8e4; }
.ixd-s1 { stop-color: #ffd27a; }
.ixd-s2 { stop-color: #f29a2e; }
.ixd-moon { fill: #343a4c; }
/* By day the Moon's dark part is the sky. */
.ixd-day .ixd-moon { fill: rgb(255 255 255 / 0.18); }
.ixd-lit { fill: #eceef3; }
/* Paths: a light halo under a dark core, legible on the sky and on the disk. */
.ixd-path-halo, .ixd-here-halo { stroke: rgb(255 255 255 / 0.6); stroke-width: 3.6; fill: none; }
.ixd-here-halo { stroke-dasharray: 6 5; }
.ixd-path { stroke: #8a2c04; stroke-width: 1.5; fill: none; }
.ixd-here { stroke: #3730a3; stroke-width: 1.5; stroke-dasharray: 6 5; fill: none; }
.ixd-arrow { stroke: #8a2c04; stroke-width: 2; fill: none; }
.ixd-arrowhead { fill: #8a2c04; }
.ixd-night .ixd-arrow, .ixd-twilight .ixd-arrow { stroke: #ffb25e; }
.ixd-night .ixd-arrowhead, .ixd-twilight .ixd-arrowhead { fill: #ffb25e; }
.ixd-sat { fill: #10131c; }
.ixd-up { fill: rgb(18 26 52 / 0.55); }
.ixd-night .ixd-up, .ixd-twilight .ixd-up { fill: rgb(255 255 255 / 0.6); }

/* ---- How to catch one ------------------------------------------------- */
.ix-guide { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.ix-guide h2 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
.ix-guide h2.ix-h2 { margin-top: 12px; display: flex; align-items: center; gap: 8px; }
.ix-guide > p { max-width: 72ch; }
.ix-guide-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) {
  .ix-guide-grid { grid-template-columns: repeat(2, 1fr); }
}
.ix-guide-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ix-guide h3 { font-size: 1.02rem; display: flex; align-items: center; gap: 8px; }
.ix-guide-grid p { color: var(--muted); font-size: 0.94rem; }
.ix-safety {
  border-left: 4px solid var(--accent-sun);
  background: var(--accent-sun-soft);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ix-safety h3 { color: #8a3d00; }

/* ---- (i): what a statement rests on, in a popover ------------------- */
.ix-info {
  flex: none;
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: italic 600 0.78rem/1 Georgia, "Times New Roman", serif;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  padding: 0;
}
.ix-info:hover, .ix-info[aria-expanded="true"] { color: var(--text); border-color: var(--accent-moon); }
.ix-info:focus-visible { outline: 2px solid var(--accent-moon); outline-offset: 2px; }
.ix-pop {
  width: min(330px, calc(100vw - 24px));
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.18);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.45;
}
.ix-pop.is-anchored { position: fixed; inset: auto; margin: 0; }
.ix-pop::backdrop { background: transparent; }
.ix-pop-h { color: var(--accent-moon); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.ix-pop-note { margin-top: 6px !important; color: var(--muted); }
.ix-pop ol { margin: 8px 0 0; padding-left: 1.6em; }
.ix-pop li + li { margin-top: 6px; }
.ix-pop li::marker { color: var(--muted); }
.ix-pop a { color: var(--text); }
.ix-pop span { display: block; color: var(--muted); }
.ix-pop .ix-all { display: inline-block; margin-top: 10px; color: var(--muted); font-size: 0.8rem; }

/* ---- Sources ---------------------------------------------------------- */
.ix-method { color: var(--muted); font-size: 0.92rem; margin: 10px 0 0; max-width: 80ch; }
.ix-ref-list { margin: 12px 0 0; padding-left: 1.8em; font-size: 0.9rem; }
.ix-ref-list li + li { margin-top: 8px; }
.ix-ref-list li::marker { color: var(--muted); }
.ix-ref-list a { color: var(--text); font-weight: 600; }
.ix-ref-list span { display: block; color: var(--muted); }

@media print {
  .ix-info, .ix-filters, .ix-form, .ix-actions, .ix-map { display: none; }
  .ix-card { break-inside: avoid; box-shadow: none; }
}
