/* ghost-overlay.css — Ghost View resting glow (Phase 2.1).
 *
 * Admin-only travel overlay on the calendar grid. The glow is painted as a
 * ::before layer on the day cell, sitting BETWEEN the cell's background and its
 * content: the ::before is z-index:0 while the cell's direct children (date
 * number + chips) are raised to z-index:1 — so chips and the date stay fully
 * readable and are never obscured. The glow's colour + brightness are composed
 * per-cell in calendar-ghost-overlay.js (hue = resource, brightness = leg
 * volume) and handed in via the --ghost-bg / --ghost-ring custom properties.
 * Companion: public/calendar-ghost-overlay.js.
 */

.oss-ghost-cell { position: relative; }

/* Raise the cell's own content above the glow layer. */
.oss-ghost-cell > * { position: relative; z-index: 1; }

.oss-ghost-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;                /* above the cell background, below the content */
  pointer-events: none;      /* never intercept clicks meant for chips */
  border-radius: 6px;
  /* Hue-by-resource: the gradient (one soft bloom per resource colour) and the
     ring colour are composed in calendar-ghost-overlay.js and handed in via
     --ghost-bg / --ghost-ring (alpha already baked in, scaled by leg volume).
     A run keeps one hue across its days -> reads as a continuous colour-band.
     Still purely BENEATH the content layer (z-index:0), so chips/date numbers
     stay fully legible over any hue. */
  background: var(--ghost-bg, none);
  box-shadow: inset 0 0 0 1px var(--ghost-ring, transparent);
  transition: background .25s ease, box-shadow .25s ease;
}

/* ── Focus bloom: per-leg detail in the focused cells (Slice 2.2) ──────────────
   One thin lane per focused leg touching the day, stacked from the bottom of
   the cell. Lives at the content layer (z-index:1, raised by the > * rule), so
   it sits above the glow but stays low in the cell; pointer-events:none so the
   release/re-bloom click still reaches the cell. */
.oss-ghost-detail {
  position: absolute;
  left: 0; right: 0; bottom: 3px;
  height: 30px;
  pointer-events: none;
}
.oss-ghost-lane {
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  bottom: calc(var(--lane, 0) * 6px);
}
/* drive / convoy → solid glowing bar in the resource hue */
.oss-ghost-lane--drive,
.oss-ghost-lane--convoy {
  background: var(--hue, #38BFFF);
  box-shadow: 0 0 5px 0 var(--hue, #38BFFF);
  opacity: .92;
}
/* staged → faint hatched bar */
.oss-ghost-lane--staged {
  background: repeating-linear-gradient(45deg,
    var(--hue, #38BFFF) 0 3px, transparent 3px 7px);
  opacity: .55;
}
/* fly → small glowing dot on the flight day */
.oss-ghost-lane.oss-ghost-dot {
  left: 50%; right: auto;
  width: 8px; height: 8px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--hue, #38BFFF);
  box-shadow: 0 0 6px 1px var(--hue, #38BFFF);
}

/* ── Detail panel / roster ─────────────────────────────────────────────────── */
.oss-ghost-panel {
  position: fixed;
  right: 16px; bottom: 16px;
  width: 340px; max-height: 60vh;
  overflow: auto;
  z-index: 10000;
  background: #0F1722;
  border: 1px solid #2A3D58;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
  color: #D4E4F4;
  font: 13px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.oss-ghost-panel-hd {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #2A3D58;
  font-weight: 700;
  position: sticky; top: 0;
  background: #0F1722;
}
.oss-ghost-panel-hd button {
  background: none; border: none; color: #8BACC8;
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.oss-ghost-panel-hd button:hover { color: #fff; }
.oss-ghost-panel-bd { padding: 6px 12px 12px; }
.oss-ghost-leg {
  padding: 8px 0;
  border-bottom: 1px solid rgba(42, 61, 88, .5);
}
.oss-ghost-leg:last-child { border-bottom: none; }
.oss-ghost-cdot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; margin-right: 7px; vertical-align: middle;
}
.oss-ghost-dim { color: #8BACC8; font-size: .85em; margin-top: 2px; }

/* ── Advisory grid markers (Slice 3.2) — amber edge, DISTINCT from the cyan/
   hue glow so it reads as "look at this," not ambiance. Solid = long duty day,
   dashed = unplanned transition. Drawn via ::after (glow owns ::before), thin
   top bar so it never covers the date number or chips. ─────────────────────── */
.oss-ghost-adv { position: relative; }
.oss-ghost-adv::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  z-index: 2;
  pointer-events: none;
}
/* long duty day → solid amber bar + soft amber glow */
.oss-ghost-adv--long::after {
  background: #F5A623;
  box-shadow: 0 0 6px 0 rgba(245, 166, 35, .7);
}
/* unplanned transition → dashed/hollow amber (clearly "not planned yet") */
.oss-ghost-adv--unplanned::after {
  background: repeating-linear-gradient(90deg, #F5A623 0 7px, transparent 7px 13px);
}

/* ── Advisory notes in the bloom panel ──────────────────────────────────────── */
.oss-ghost-panel-adv {
  padding: 8px 12px;
  border-bottom: 1px solid #2A3D58;
  background: rgba(245, 166, 35, .07);
}
.oss-ghost-adv-note {
  font-size: .82em;
  line-height: 1.4;
  color: #F5C77E;
  padding: 4px 0;
}
.oss-ghost-adv-note--unplanned { color: #E8B96A; }
.oss-ghost-adv-note + .oss-ghost-adv-note { border-top: 1px dashed rgba(245, 166, 35, .25); }

/* ── Filter bar (Slice 2.3) — chips beside the Ghost toggle; the coloured
   chips double as the legend. Only shown while Ghost view is ON. ───────────── */
.oss-ghost-fbar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  max-width: 62vw;
  vertical-align: middle;
}
.oss-ghost-fglabel {
  font: 700 .58rem/1 'JetBrains Mono', monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #4A6480;
  margin: 0 2px 0 6px;
}
.oss-ghost-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #1E2636;
  border: 1px solid #2A3D58;
  color: #D4E4F4;
  border-radius: 11px;
  padding: 3px 9px;
  font: 600 .62rem/1 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .5px;
  cursor: pointer;
}
.oss-ghost-chip[aria-pressed="true"] { border-color: #38BFFF55; }
.oss-ghost-chip--off { opacity: .4; text-decoration: line-through; }
.oss-ghost-chipdot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
}
.oss-ghost-reset {
  background: none;
  border: 1px solid #2A3D58;
  color: #8BACC8;
  border-radius: 11px;
  padding: 3px 9px;
  font: 600 .62rem/1 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .5px;
  cursor: pointer;
  margin-left: 4px;
}
.oss-ghost-reset:hover { color: #fff; border-color: #38BFFF55; }
