/* SCRUM-270 (DD5) — Deployment Dashboard styles. Cloud Delivered brand
   (infra/lib/auth-stack.ts BRAND). Vanilla CSS, no build step. */
:root {
  --color-navy: #003057;
  --color-deep-blue: #1961AE;
  --color-brand-blue: #307FE2;
  --color-orange: #FF9E1B;
  --color-paper: #ffffff;
  --color-paper-soft: #f5f7fb;
  --color-rule: #e3e8f0;
  --color-body: #404040;
  --color-ink-muted: #51607a;
  --color-ok: #1a7f4b;
  --color-fail: #c0392b;
  --color-pending: #8a93a6;
  --color-running: #1961ae;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--color-body);
  background: var(--color-paper-soft);
  line-height: 1.5;
}

h1, h2, h3 { font-family: 'Times New Roman', Times, Georgia, serif; color: var(--color-navy); }

/* ── Header ── */
.dd-header {
  background: var(--color-navy);
  color: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.dd-header__logo { height: 34px; width: auto; display: block; }
.dd-header__titles { display: flex; flex-direction: column; line-height: 1.2; }
.dd-header__brand { font-family: 'Times New Roman', Times, Georgia, serif; font-size: 1.25rem; color: #fff; }
.dd-header__sub { color: var(--color-orange); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; font-weight: bold; }
.dd-header__spacer { flex: 1; }
.dd-header__user { font-size: 0.85rem; color: #cfe0f5; }

/* ── Buttons ── */
.dd-btn {
  font: inherit;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  background: var(--color-brand-blue);
  color: #fff;
}
.dd-btn:hover { background: var(--color-deep-blue); }
.dd-btn--ghost { background: transparent; border-color: rgba(255,255,255,0.5); color: #fff; }
.dd-btn--ghost:hover { background: rgba(255,255,255,0.12); }

/* ── Main ── */
.dd-main { max-width: 1200px; margin: 0 auto; padding: 32px 16px; }
.dd-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .dd-panels { grid-template-columns: 1fr; } }

.dd-panel {
  background: var(--color-paper);
  border: 1px solid var(--color-rule);
  border-radius: 10px;
  padding: 20px;
  min-height: 220px;
}
.dd-panel__head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--color-rule); padding-bottom: 10px; margin-bottom: 14px; }
.dd-panel__title { margin: 0; font-size: 1.15rem; }
.dd-panel__env { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-ink-muted); }
.dd-panel__body { color: var(--color-ink-muted); }

/* ── Gate / messages ── */
.dd-gate { max-width: 560px; margin: 64px auto; background: var(--color-paper); border: 1px solid var(--color-rule); border-radius: 10px; padding: 32px; text-align: center; }
.dd-gate h2 { margin-top: 0; }
.dd-error { color: var(--color-fail); }
.dd-muted { color: var(--color-ink-muted); }

/* ── Traffic-light pills (used by DD6/DD7) ── */
.dd-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: bold; text-transform: uppercase; letter-spacing: 0.04em; color: #fff; }
.dd-pill--success { background: var(--color-ok); }
.dd-pill--failure { background: var(--color-fail); }
.dd-pill--in_progress, .dd-pill--running { background: var(--color-running); }
.dd-pill--pending { background: var(--color-pending); }
.dd-pill--skipped { background: #b9a23a; }

/* ── Footer ── */
.dd-footer { max-width: 1200px; margin: 24px auto 48px; padding: 16px; color: var(--color-ink-muted); font-size: 0.85rem; border-top: 1px solid var(--color-rule); }
.dd-footer a { color: var(--color-deep-blue); }

/* ── Run card + traffic lights (DD6/DD7) ── */
.dd-run__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.dd-run__spacer { flex: 1; }
.dd-lights { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.dd-stage-btn { background: none; border: none; cursor: pointer; padding: 4px 2px; font: inherit; color: var(--color-body); }
.dd-stage-btn:hover { background: var(--color-paper-soft); border-radius: 4px; }
.dd-stage { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; }
.dd-pill--in_progress, .dd-pill--running { animation: dd-pulse 1.2s ease-in-out infinite; }
@keyframes dd-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.dd-detail { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--color-rule); }

.dd-kv { border-collapse: collapse; font-size: 0.85rem; }
.dd-kv th { text-align: left; color: var(--color-ink-muted); padding: 2px 12px 2px 0; vertical-align: top; font-weight: bold; }
.dd-kv td { padding: 2px 0; }

.dd-journeys, .dd-history { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.dd-journeys th, .dd-journeys td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--color-rule); }
.dd-journeys th { color: var(--color-ink-muted); }
.dd-shots-link { color: var(--color-deep-blue); text-decoration: none; }

.dd-history { list-style: none; padding: 0; }
.dd-history li { padding: 4px 0; border-bottom: 1px solid var(--color-rule); }
.dd-hist-link { color: var(--color-deep-blue); }

/* ── Screenshot lightbox ── */
.dd-lightbox { position: fixed; inset: 0; background: rgba(0,12,28,0.7); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 24px; }
.dd-lightbox__panel { background: var(--color-paper); border-radius: 10px; max-width: 1000px; width: 100%; max-height: 90vh; overflow: auto; padding: 16px; }
.dd-lightbox__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.dd-lightbox__main { text-align: center; }
.dd-lightbox__main img { max-width: 100%; max-height: 60vh; border: 1px solid var(--color-rule); }
.dd-lightbox__nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0; }
.dd-lightbox__thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.dd-thumb { width: 160px; height: auto; cursor: pointer; border: 1px solid var(--color-rule); border-radius: 4px; }
.dd-thumb:hover { border-color: var(--color-brand-blue); }

[hidden] { display: none !important; }
