/* ═══════════════════════════════════════════════════════════════════
   src/quest-log-panel.css — QUEST-LOG-UI-01 (#5277)

   Quest Log panel chrome. Theme follows settings-panel-v2.css /
   hud-objective-tracker.css conventions: #080f1a plate, #22d3ee cyan
   accents, Segoe UI, uppercase micro-headings.

   A11y notes (ticket AC6):
   - Body text #e2e8f0 on #080f1a ≈ 15.5:1; muted #94a3b8 on #080f1a ≈
     7.2:1 — both clear WCAG 2.2 SC 1.4.3 (4.5:1).
   - Focus indicators: 2px solid #22d3ee outline (≥3:1 against the plate,
     SC 2.4.7 / 1.4.11).
   - Status is icon + label, never color-only (SC 1.4.1).
   - The only animation (panel fade) is gated by prefers-reduced-motion.
   ═══════════════════════════════════════════════════════════════════ */

#quest-log-panel {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 150;
  width: min(720px, 96vw);
  max-height: 82vh;
  flex-direction: column;
  background: #080f1a;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 10px;
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(34, 211, 238, 0.05);
  color: #e2e8f0;
  font-family: 'Segoe UI', system-ui, sans-serif;
  padding: 14px 16px 16px;
}
@media (prefers-reduced-motion: no-preference) {
  #quest-log-panel[data-open="1"] { animation: qlog-fade-in 120ms ease-out; }
  @keyframes qlog-fade-in { from { opacity: 0; } to { opacity: 1; } }
}

/* Visible keyboard focus on every control (never outline:none). */
#quest-log-panel button:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 1px;
}

/* ── Header ── */
#quest-log-panel .qlog-head {
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(34, 211, 238, 0.14);
  padding-bottom: 8px; margin-bottom: 8px;
}
#quest-log-panel .qlog-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #22d3ee;
}
#quest-log-panel .qlog-hotkey-hint { font-size: 10px; color: #64748b; }
#quest-log-panel .qlog-close {
  margin-left: auto;
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px; color: #94a3b8; cursor: pointer;
  font-size: 12px; line-height: 1; padding: 6px 9px; /* comfortable hit target */
}
#quest-log-panel .qlog-close:hover { color: #e2e8f0; border-color: rgba(255, 255, 255, 0.35); }

/* ── Tabs ── */
#quest-log-panel .qlog-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
#quest-log-panel .qlog-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #94a3b8; cursor: pointer;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 14px;
}
#quest-log-panel .qlog-tab:hover { color: #e2e8f0; }
#quest-log-panel .qlog-tab--active {
  color: #22d3ee;
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.08);
}

/* ── Master-detail body ── */
#quest-log-panel .qlog-body {
  display: flex; gap: 12px; min-height: 0; flex: 1;
}
#quest-log-panel .qlog-list {
  width: 44%; min-width: 220px;
  overflow-y: auto; max-height: 58vh;
  display: flex; flex-direction: column; gap: 4px;
  padding-right: 4px;
}
#quest-log-panel .qlog-detail {
  flex: 1; overflow-y: auto; max-height: 58vh;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 12px;
}

/* ── List ── */
#quest-log-panel .qlog-group {
  font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #64748b; margin: 8px 0 2px;
}
#quest-log-panel .qlog-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 2px solid transparent;
  border-radius: 6px;
  color: #e2e8f0;
  font-family: inherit;
  padding: 8px 10px;
}
#quest-log-panel .qlog-item:hover { background: rgba(34, 211, 238, 0.05); }
#quest-log-panel .qlog-item--selected {
  border-left-color: #22d3ee;
  background: rgba(34, 211, 238, 0.08);
}
#quest-log-panel .qlog-item-title { display: block; font-size: 12px; font-weight: 700; }
#quest-log-panel .qlog-item-meta  { display: block; font-size: 10px; color: #94a3b8; margin-top: 2px; }
#quest-log-panel .qlog-item-prog  { font-variant-numeric: tabular-nums; color: #cbd5e1; }
#quest-log-panel .qlog-pinned-mark { color: #22d3ee; }

/* Status chips — icon + label; hue is a secondary channel only. */
#quest-log-panel .qlog-status--active    { color: #cbd5e1; }
#quest-log-panel .qlog-status--ready     { color: #f59e0b; }
#quest-log-panel .qlog-status--completed { color: #34d399; }
#quest-log-panel .qlog-status--failed    { color: #94a3b8; }

/* ── Detail pane ── */
#quest-log-panel .qlog-detail-title { font-size: 14px; font-weight: 700; }
#quest-log-panel .qlog-detail-meta  { font-size: 10px; color: #94a3b8; margin: 2px 0 8px; }
#quest-log-panel .qlog-summary {
  font-size: 12px; color: #cbd5e1; line-height: 1.5;
  max-width: 60ch; /* XAG 101 line-width cap for text blocks */
  margin: 0 0 10px;
}
#quest-log-panel .qlog-section-label {
  font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #64748b; margin: 10px 0 3px;
}
#quest-log-panel .qlog-objective { font-size: 12px; color: #e2e8f0; line-height: 1.5; }
#quest-log-panel .qlog-objective--done { color: #34d399; }
#quest-log-panel .qlog-detail-prog { color: #94a3b8; font-variant-numeric: tabular-nums; }
#quest-log-panel .qlog-turnin {
  font-size: 11px; color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 6px; padding: 5px 9px; margin-top: 8px;
  display: inline-block;
}
#quest-log-panel .qlog-rewards { font-size: 12px; color: #cbd5e1; }
#quest-log-panel .qlog-pin-btn {
  display: inline-block; margin-top: 14px; cursor: pointer;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 8px;
  color: #a5f3fc;
  font-family: inherit; font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 8px 16px; /* comfortable hit target */
}
#quest-log-panel .qlog-pin-btn:hover { background: rgba(34, 211, 238, 0.2); }

/* ── Empty states — say why + teach the filling action (NN/g) ── */
#quest-log-panel .qlog-empty {
  font-size: 12px; color: #94a3b8; font-style: italic;
  padding: 12px 6px; line-height: 1.6;
}
#quest-log-panel .qlog-empty-hint { color: #64748b; font-size: 11px; }
