/* Review page — page-specific styles. Tokens, base form controls, button
   variants, and the .rb-topnav primitive come from /shared/brand.css. */

html, body { height: 100%; }
body {
  display: flex;
  flex-direction: column;
  background: var(--rb-black-05);
}

/* Verdict semantic colors. These are state indicators for the reviewer, not
   brand accents — kept distinct from --rb-orange so a reviewer scanning at a
   glance can tell like/dislike/unsure apart. */
:root {
  --verdict-like: #1B7F3B;
  --verdict-like-soft: rgba(27, 127, 59, 0.08);
  --verdict-dislike: #B0271A;
  --verdict-dislike-soft: rgba(176, 39, 26, 0.08);
  --verdict-unsure: #B26A00;
  --verdict-unsure-soft: rgba(178, 106, 0, 0.10);
}

#unverified-banner {
  flex-shrink: 0;
  padding: 12px 24px;
  background: var(--verdict-unsure-soft);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--verdict-unsure);
  color: var(--fg);
  font-size: 13px;
  font-weight: 500;
}

#expired-banner {
  flex-shrink: 0;
  padding: 12px 24px;
  background: var(--verdict-dislike-soft);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--verdict-dislike);
  color: var(--fg);
  font-size: 13px;
  font-weight: 500;
}

#expired-banner a {
  color: var(--verdict-dislike);
  font-weight: 600;
}

#app {
  display: grid;
  grid-template-columns: 1fr 360px;
  flex: 1;
  min-height: 0;
}

#stage {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  min-height: 0;
  padding: 16px;
  gap: 12px;
}

#stage-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}
#position {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--fg);
}
#filename {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#progress {
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.creative-mix {
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--rb-black-05);
}
.backdrop-chip {
  font-size: 12px;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--rb-black-05);
  color: var(--fg-muted);
}
.backdrop-chip.dark {
  background: #111;
  color: #fff;
  border-color: #111;
}
.specificity-chip {
  font-size: 12px;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border: 1px solid var(--state-warning);
  border-radius: 4px;
  background: rgba(255, 196, 0, 0.10);
  color: var(--state-warning);
  font-weight: 600;
}
.ultra-pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--rb-white);
  border: 1px solid var(--accent);
}

#image-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
#image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: var(--surface-alt);
  border-radius: 4px;
}

/* Plan §feature-4: stacked dark_hero / photo_bright A/B view for event
   campaigns. Two equal-height panels; active panel outlined in accent,
   inactive panel dimmed and clickable to swap. */
.variant-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  height: 100%;
  align-self: stretch;
}
.variant-item {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  border: 2px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.variant-item.active {
  border-color: var(--accent);
}
.variant-item.clickable {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.12s ease, border-color 0.12s ease;
}
.variant-item.clickable:hover {
  opacity: 1;
  border-color: var(--fg-muted);
}
.variant-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.variant-label {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rb-white);
  background: rgba(0, 0, 0, 0.65);
  border-radius: 3px;
  pointer-events: none;
}

#stage-foot {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  align-items: center;
}
#stage-foot button {
  padding: 8px 16px;
  font-size: 16px;
}
#save-status {
  color: var(--fg-muted);
  font-size: 12px;
  margin-left: auto;
}

#panel {
  border-left: 1px solid var(--border);
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
}

.group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.group h3 {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}
.group label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}
.hint {
  color: var(--fg-muted);
  font-size: 12px;
  font-weight: 400;
}
/* OPP-13: polite filter-reset announcement. Subtle by default; stays empty
   (and so invisible) until a filter change writes a line. */
.filter-announce {
  color: var(--fg-subtle);
  font-style: italic;
}
.filter-announce:empty {
  display: none;
}

.verdict-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.verdict {
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border-strong);
}
.verdict:hover {
  background: var(--surface-alt);
  color: var(--fg);
  border-color: var(--fg);
}
.verdict.active[data-verdict="like"] {
  background: var(--verdict-like);
  color: var(--rb-white);
  border-color: var(--verdict-like);
}
.verdict.active[data-verdict="dislike"] {
  background: var(--verdict-dislike);
  color: var(--rb-white);
  border-color: var(--verdict-dislike);
}
.verdict.active[data-verdict="unsure"] {
  background: var(--verdict-unsure);
  color: var(--rb-white);
  border-color: var(--verdict-unsure);
}

textarea {
  resize: vertical;
  min-height: 120px;
  font: inherit;
  font-size: 13px;
}

/* OPP-01: while a comment has unsaved edits or its last save failed, mark the
   field with a red left rule so the dirty/failed state is visible even when the
   transient save-status text has scrolled out of view. Cleared on a successful
   save. Mirrors the #expired-banner left-rule idiom. */
#comment.comment-dirty {
  border-left: 3px solid var(--state-error);
}

/* OPP-01: inline Retry affordance next to the save status. Hidden until a save
   fails. */
#save-retry {
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
}

#change {
  font-weight: 700;
  letter-spacing: 0.02em;
}

#export {
  background: var(--fg);
  color: var(--rb-white);
  border-color: var(--fg);
  font-weight: 700;
}
#export:hover {
  background: var(--rb-black-80);
  border-color: var(--rb-black-80);
  color: var(--rb-white);
}

#download-zip {
  background: var(--fg);
  color: var(--rb-white);
  border-color: var(--fg);
  font-weight: 700;
}
#download-zip:hover:not(:disabled) {
  background: var(--rb-black-80);
  border-color: var(--rb-black-80);
  color: var(--rb-white);
}

@media (max-width: 880px) {
  #app { grid-template-columns: 1fr; }
  #panel { border-left: none; border-top: 1px solid var(--border); }
}
