/* Shared globe for Live Sky and Charter & Empty Legs. */
.live-page { overflow: hidden; height: 100svh; }
.live-stage { position: fixed; inset: 0; }
#globe { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#globe:active { cursor: grabbing; }

.live-head {
  --live-head-top: calc(var(--atlas-bar-h) + clamp(28px, 8vh, 96px));
  position: absolute; left: var(--atlas-gutter); top: var(--live-head-top); width: min(380px, calc(100% - 2 * var(--atlas-gutter)));
  display: grid; gap: 12px; pointer-events: none;
}
.live-head .atlas-h1 { color: #fff; }
[data-live-mode="combined"] .live-head { width: min(420px, calc(100% - 2 * var(--atlas-gutter))); }
[data-live-mode="combined"] .live-head .atlas-h1 { font-size: clamp(2.125rem, 4.5vw, 3.5rem); text-wrap: balance; }
.live-count { margin: 6px 0 0; display: grid; gap: 4px; }
.live-count .atlas-figure { font-size: clamp(3rem, 5vw, 4.75rem); color: #fff; }
/* in preview the headline is the word "Preview", not a count of simulated aircraft */
.live-count .atlas-figure.is-preview { font-size: clamp(2.25rem, 3.4vw, 3.25rem); font-style: normal; }
.live-count span { font: 600 var(--atlas-t-label)/1.2 var(--atlas-text); letter-spacing: 0; color: var(--atlas-on-sky-2); }
.live-count .live-count-note { width: fit-content; max-width: 100%; padding: 4px 8px; border-radius: 2px; background: rgba(6, 22, 56, 0.82); color: #fff; font: 400 var(--atlas-t-caption)/1.35 var(--atlas-text); }
.live-links, .live-view-link { justify-self: start; max-width: 100%; background: rgba(6, 22, 56, 0.9); border: 1px solid rgba(255, 255, 255, 0.5); border-radius: var(--atlas-radius); }
.live-links { display: flex; flex-wrap: wrap; gap: 0 12px; padding-inline: 10px; }
.live-links a, .live-view-link { display: inline-flex; align-items: center; min-height: 44px; color: #fff; pointer-events: auto;
  font: 600 var(--atlas-t-label)/1.3 var(--atlas-text); text-decoration: underline; text-underline-offset: 0.2em; }
.live-view-link { padding-inline: 10px; }
.live-near { margin: 0; color: #fff; font-size: var(--atlas-t-small); width: fit-content; padding: 4px 10px 4px 8px; border-radius: 2px; background: rgba(6, 22, 56, 0.82); }
.live-near.atlas-live::before { background: #7ff0b8; }
.live-near.atlas-live::after { border-color: #7ff0b8; }
.live-location { display: grid; gap: 10px; justify-items: start; }
.live-locate { pointer-events: auto; min-height: 44px; border: 1px solid rgba(255,255,255,.8); padding: 10px 16px; border-radius: 3px; background: rgba(6,22,56,.88); color: white; font: 600 1rem/1.2 var(--atlas-text); cursor: pointer; }
.live-locate:hover, .live-locate:focus-visible { background: rgba(8,30,72,.9); outline-offset: 3px; }
.live-leg-layer { --live-leg-color: #b690ff; justify-self: start; max-width: 100%; padding: 0 10px 7px;
  background: rgba(6, 22, 56, 0.9); color: #fff; border: 1px solid rgba(182, 144, 255, 0.55); border-radius: var(--atlas-radius); }
.live-leg-total { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.live-leg-toggle { display: flex; align-items: center; gap: 9px; min-height: 44px; cursor: pointer; pointer-events: auto;
  font: 600 var(--atlas-t-label)/1.3 var(--atlas-text); }
.live-leg-toggle input { margin: 0; inline-size: 16px; block-size: 16px; flex: none; accent-color: var(--live-leg-color); }
.live-leg-key { inline-size: 16px; block-size: 16px; flex: none; fill: var(--live-leg-color); }
#live-legs-count { margin: 0; color: #fff; font: 500 var(--atlas-t-caption)/1.35 var(--atlas-text); }
.live-leg-total #live-legs-count { font: 600 var(--atlas-t-label)/1.35 var(--atlas-text); }
.live-mode { margin: 0; color: #fff !important; max-width: 34ch; width: fit-content; padding: 4px 8px; margin-left: -8px; border-radius: 2px; background: rgba(6, 22, 56, 0.74); }
.live-mode:empty { display: none; }

/* the chosen aircraft */
.live-card { --live-card-bottom: calc(var(--atlas-gutter) + 64px);
  position: absolute; right: var(--atlas-gutter); bottom: var(--live-card-bottom); width: min(360px, calc(100vw - 2 * var(--atlas-gutter))); padding: 18px 22px 22px; display: grid; gap: 8px;
  max-height: calc(100% - var(--live-card-bottom) - var(--atlas-bar-h) - 12px); overflow: auto; overscroll-behavior: contain;
  opacity: 0; transform: translateY(12px); visibility: hidden; transition: opacity 360ms var(--atlas-ease), transform 500ms var(--atlas-ease), visibility 0s 360ms; }
.live-card.show { opacity: 1; transform: none; visibility: visible; transition: opacity 360ms var(--atlas-ease), transform 500ms var(--atlas-ease); }
.live-close { position: absolute; right: 8px; top: 8px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; color: var(--atlas-ink-2); }
.live-close svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.4; }
.live-close:hover { color: var(--atlas-ink); }
.lc-img { width: 100%; height: 150px; object-fit: contain; margin: 4px 0 2px; }
.live-card h2 { margin: 0; }
.lc-sub { margin: 0; font: 600 var(--atlas-t-label)/1.4 var(--atlas-text); letter-spacing: 0; text-transform: none; color: var(--atlas-ink-3); }
.live-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 8px 0 6px; border-top: 1px solid var(--atlas-rule); }
.live-card dl div { padding: 12px 10px 0 0; }
.live-card dd { margin: 6px 0 0; font: 500 1.1875rem/1.1 var(--atlas-num); font-variant-numeric: lining-nums proportional-nums; overflow-wrap: anywhere; }
.live-card .atlas-btn { width: 100%; margin-top: 6px; }
.live-leg-card h2 { padding-inline-end: 40px; overflow-wrap: anywhere; }
.live-leg-card p { margin: 0; color: var(--atlas-ink-2); overflow-wrap: anywhere; }
.live-leg-card p:empty { display: none; }
.live-leg-card .atlas-btn { white-space: normal; }
.live-card [hidden] { display: none; }
.live-card .live-aircraft-image-note { margin: 0; color: var(--atlas-ink-3); font: 400 var(--atlas-t-caption)/1.35 var(--atlas-text); }
.live-leg-listing { display: grid; gap: 4px; min-width: 0; }
.live-leg-listing select { min-height: 44px; width: 100%; min-width: 0; border: 1px solid var(--atlas-rule-2); border-radius: var(--atlas-radius);
  padding: 8px; background: #fff; color: var(--atlas-ink); font: 500 1rem/1.3 var(--atlas-text); text-overflow: ellipsis; }
.live-leg-aircraft { display: grid; gap: 12px; align-items: center; padding-top: 8px; border-top: 1px solid var(--atlas-rule); }
.live-leg-aircraft:has(.lc-img:not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.live-leg-visual { margin: 0; }
.live-leg-visual:has(.lc-img[hidden]) { display: none; }
.live-leg-aircraft .lc-img { height: auto; max-height: 120px; aspect-ratio: 16 / 9; margin: 0; }
.live-leg-aircraft .live-leg-specs { grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 0; border: 0; }
.live-leg-aircraft .live-leg-specs div { padding: 0; }
.live-leg-aircraft .live-leg-specs dd { margin-top: 2px; font-size: 1rem; line-height: 1.25; }
.live-leg-actions { display: grid; justify-items: start; gap: 4px; }
.live-leg-actions .atlas-link { min-height: 36px; font-size: var(--atlas-t-small); line-height: 1.3; text-decoration: underline; }
@media (pointer: coarse) { .live-leg-actions .atlas-link { min-height: 44px; } }

/* tools: families and the camera */
.live-tools { position: absolute; left: var(--atlas-gutter); right: var(--atlas-gutter); bottom: var(--atlas-gutter); display: flex; align-items: end; justify-content: flex-end; gap: 16px; pointer-events: none; }
.live-tools > * { pointer-events: auto; }
.live-zoom { display: flex; flex-direction: column; gap: 1px; background: var(--atlas-rule); border-radius: 3px; overflow: hidden; box-shadow: var(--atlas-shadow); }
.live-zoom button { width: 46px; height: 46px; display: grid; place-items: center; border: 0; background: var(--atlas-cloud); color: var(--atlas-ink); cursor: pointer; }
.live-zoom button:hover { background: #fff; color: var(--atlas-azure); }
.live-zoom button:focus-visible { outline-offset: -3px; }
.live-zoom svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }

@media (max-width: 899px) {
  .live-head { --live-head-top: calc(var(--atlas-bar-h) + 18px); gap: 8px; }
  .live-head .atlas-h1 { font-size: 2.5rem; }
  .live-count .atlas-figure { font-size: 2.5rem; }
  .live-tools { bottom: calc(var(--atlas-tabs-space) + 14px); }
  .live-card { --live-card-bottom: calc(var(--atlas-tabs-space) + 70px);
    left: var(--atlas-gutter); right: var(--atlas-gutter); width: auto; padding: 14px 18px 18px; }
  .lc-img { height: 96px; }
}
@media (min-width: 740px) and (max-width: 899px) and (min-height: 501px) {
  :where(html:not(.app):not([data-app="installed"])) .live-card {
    --live-card-bottom: calc(var(--atlas-tabs-space) + max(70px, var(--live-credit-height, 0px) + 42px));
  }
}
@media (max-height: 700px) { .lc-img { height: clamp(54px, 14vh, 96px); } }
@media (max-height: 650px) {
  .live-head { --live-head-top: calc(var(--atlas-bar-h) + 12px); gap: 8px; }
  .live-head .atlas-h1 { font-size: clamp(1.75rem, 4.5vw, 2.5rem); }
  [data-live-mode="combined"] .live-head .atlas-h1 { font-size: clamp(1.75rem, 4.5vw, 2.5rem); }
  .live-count { margin-top: 0; }
  .live-count .atlas-figure,
  .live-count .atlas-figure.is-preview { font-size: clamp(1.625rem, 4vw, 2.5rem); }
  .live-location { gap: 6px; }
  .live-leg-card { padding: 14px 18px 16px; gap: 6px; }
  .live-leg-card h2 { font-size: clamp(1.25rem, 2.7vw, 1.5rem); line-height: 1.22; }
  .live-leg-card p { line-height: 1.4; }
  .live-leg-listing { grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; }
}
@media (max-height: 520px) {
  .live-head { max-height: calc(100% - var(--live-head-top) - var(--atlas-tabs-space, 0px) - var(--live-credit-height, 0px) - 38px);
    padding: 3px; overflow: auto; overscroll-behavior: contain; pointer-events: auto; }
}
@media (min-width: 740px) and (max-height: 520px) {
  [data-live-mode="empty-legs"] .live-head { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  [data-live-mode="empty-legs"] :is(.live-leg-total, .live-location) { grid-column: 1 / -1; }
  [data-live-mode="empty-legs"] .live-view-link { grid-area: 1 / 2; }
  [data-live-mode="empty-legs"] .live-location { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
}
@media (min-width: 740px) and (max-width: 899px) and (max-height: 520px) {
  .live-page .live-head { width: min(380px, calc(50% - var(--atlas-gutter) - 8px)); }
}
@media (max-height: 500px) { .live-card { --live-card-bottom: calc(var(--atlas-tabs-space) + 12px); } }

/* legibility: a soft band of the sky's deep blue behind the title, wherever the globe turns */
.live-stage::before { content: ""; position: absolute; inset: 0 0 auto 0; height: min(64vh, 560px); z-index: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 0% 0%, rgba(6, 22, 56, 0.62) 0%, rgba(6, 22, 56, 0.3) 45%, rgba(6, 22, 56, 0) 75%); }
#globe { z-index: 0; } .live-stage::before { z-index: 1; } .live-head, .live-card, .live-tools { z-index: 2; }
.live-card { right: calc(var(--atlas-gutter) + 64px); }
@media (max-width: 899px) {
  .live-stage::before { height: 52vh; background: linear-gradient(180deg, rgba(6, 22, 56, 0.76) 0%, rgba(6, 22, 56, 0.6) 50%, rgba(6, 22, 56, 0) 100%); }
  .live-card { right: var(--atlas-gutter); }
  .live-leg-card {
    --live-card-bottom: calc(var(--atlas-tabs-space) + max(70px, var(--live-credit-height, 0px) + 42px));
    right: calc(var(--atlas-gutter) + 58px);
  }
  .live-stage:has(#live-card.show) .live-zoom { opacity: 0; visibility: hidden; pointer-events: none; }
  .live-zoom { transition: opacity 240ms var(--atlas-ease); }
}

/* One quiet line at the foot of the screen: the position source credit (ODbL) and the carrier notice. */
/* the source credit and carrier notice: one quiet line on a solid night-blue surface, readable over any cloud */
.live-fine { position: absolute; z-index: 2; left: var(--atlas-gutter); bottom: 14px; max-width: calc(100% - 2 * var(--atlas-gutter) - 80px); width: fit-content; margin: 0; padding: 6px 10px; border-radius: 2px; background: rgba(6, 22, 56, 0.88); font: 400 var(--atlas-t-label)/1.45 var(--atlas-text); color: #fff; pointer-events: none; }
.live-fine .live-mode { padding: 0; margin: 0; background: none; }
@media (max-width: 899px) { .live-fine { bottom: calc(var(--atlas-tabs-space) + 30px); max-width: calc(100% - 2 * var(--atlas-gutter) - 64px); font-size: 0.8125rem; } }
@media (max-width: 739px) { .live-fine { font-size: 0.75rem; } }

/* a full-screen tool has no footer: its policies sit in the foot line, as links (owner brief, 17 Nov 2026) */
.live-fine .live-policies { white-space: nowrap; }
.live-fine a { pointer-events: auto; color: #fff; text-decoration: underline; text-underline-offset: 0.2em; }
@media screen {
  .live-head { grid-template-columns: minmax(0, 1fr); }
  .live-head > *, .live-fine { overflow-wrap: anywhere; }
  .live-fine .live-policies { white-space: normal; }
}
