/* ── Curation Slideshow Overlay ────────────────────────────────────────── */
#cs-overlay {
  position: fixed;
  inset: 0;
  z-index: 2600;
  background: #111;
  display: none;
  flex-direction: column;
  font-family: inherit;
  color: #eee;
}
#cs-overlay.cs-open { display: flex; }

/* ── Topbar ─────────────────────────────────────────────────────────────── */
#cs-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
  gap: 12px;
}
#cs-counter-area {
  display: flex;
  gap: 16px;
  font-size: 0.82em;
  color: #aaa;
  white-space: nowrap;
  flex-wrap: wrap;
  align-items: center;
}
#cs-decision-counts { font-size: 0.9em; }
.cs-count-selected  { color: #198754; font-weight: 600; }
.cs-count-rejected  { color: #c0392b; font-weight: 600; }
.cs-count-undecided { color: #888; }
.cs-count-sep       { color: #444; }

#cs-right-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
#cs-open-link { color: #64968c; text-decoration: none; font-size: 1.1em; }
#cs-open-link:hover { color: #80b8ac; }
.cs-topbtn {
  background: none;
  border: none;
  color: #aaa;
  font-size: 1em;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
}
.cs-topbtn:hover { color: #fff; background: #333; }

/* ── Body ───────────────────────────────────────────────────────────────── */
#cs-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

/* ── Prev / Next ────────────────────────────────────────────────────────── */
#cs-prev, #cs-next {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 3rem;
  cursor: pointer;
  padding: 0 6px;
  flex-shrink: 0;
  align-self: center;
  line-height: 1;
  transition: color 0.15s;
}
#cs-prev:hover, #cs-next:hover { color: #fff; }

/* ── Left: image ────────────────────────────────────────────────────────── */
#cs-left {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  background: #000;
}
#cs-img-a, #cs-img-b {
  position: absolute;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.3s;
}
.cs-hidden-img { opacity: 0; pointer-events: none; }

/* ── Right: info + scores + decision ────────────────────────────────────── */
#cs-right {
  width: 380px;
  min-width: 300px;
  background: #1a1a1a;
  border-left: 1px solid #2e2e2e;
  overflow-y: auto;
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Artwork info ───────────────────────────────────────────────────────── */
#cs-artwork-info {
  padding-bottom: 10px;
  border-bottom: 1px solid #2e2e2e;
}
#cs-artwork-title   { font-size: 1em; font-weight: 700; color: #fff; line-height: 1.3; }
#cs-artwork-artists { font-size: 0.82em; color: #888; margin-top: 3px; }
#cs-artwork-year,
#cs-artwork-medium,
#cs-artwork-dims    { font-size: 0.78em; color: #666; margin-top: 2px; line-height: 1.5; font-style: italic; }
#cs-artwork-year:empty,
#cs-artwork-medium:empty,
#cs-artwork-dims:empty { display: none; }

/* ── Scores section ─────────────────────────────────────────────────────── */
#cs-scores {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.cs-overall-score {
  font-size: 0.95em;
  font-weight: 700;
  color: #64968c;
  margin-bottom: 6px;
}
.cs-scores-header {
  font-size: 0.75em;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.cs-juror-block {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #222;
}
.cs-juror-block:last-child { border-bottom: none; margin-bottom: 0; }
.cs-juror-name {
  font-size: 0.82em;
  font-weight: 600;
  color: #bbb;
  margin-bottom: 3px;
}
.cs-score-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.76em;
  padding: 1px 0;
  color: #888;
}
.cs-crit-name { color: #777; }
.cs-crit-score { color: #aaa; }
.cs-score-weak { color: #c0392b; }
.cs-no-scores  { font-size: 0.82em; color: #555; }

/* ── Decision buttons ───────────────────────────────────────────────────── */
#cs-decision-area {
  display: flex;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid #2e2e2e;
  flex-shrink: 0;
}
.cs-decision-btn {
  flex: 1;
  padding: 7px 4px;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  background: none;
  color: #888;
  cursor: pointer;
  font-size: 0.78em;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.cs-decision-btn:hover { border-color: #555; color: #ccc; }

.cs-btn-undecided.cs-decision-active { background: #3a3a3a; border-color: #666; color: #ccc; }
.cs-btn-selected.cs-decision-active  { background: #1a4a2e; border-color: #198754; color: #4caf7d; }
.cs-btn-rejected.cs-decision-active  { background: #4a1a1a; border-color: #c0392b; color: #e57373; }

.cs-btn-selected:hover { border-color: #198754; color: #4caf7d; }
.cs-btn-rejected:hover { border-color: #c0392b; color: #e57373; }

/* ── Footer: thumbnails ─────────────────────────────────────────────────── */
#cs-footer {
  flex-shrink: 0;
  background: #161616;
  border-top: 1px solid #2a2a2a;
  padding: 3px 8px;
}
#cs-thumbs {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  padding: 3px 0;
  scrollbar-width: thin;
  scrollbar-color: #444 transparent;
}
.cs-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 3px;
  border: 2px solid #3a3a3a;
  cursor: pointer;
  flex-shrink: 0;
  background: #2a2a2a;
  transition: border-color 0.15s;
}
.cs-thumb.cs-thumb-selected  { border-color: #198754; }
.cs-thumb.cs-thumb-rejected  { border-color: #c0392b; }
.cs-thumb.cs-thumb-undecided { border-color: #3a3a3a; }
.cs-thumb.cs-thumb-current   { outline: 2px solid #64968c; }

.cs-loading { color: #888; font-size: 0.85em; padding: 8px 0; }
.cs-error   { color: #f66; font-size: 0.85em; padding: 8px 0; }

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  #cs-body { flex-direction: column; }
  #cs-right {
    width: 100%;
    min-width: 0;
    border-left: none;
    border-top: 1px solid #2e2e2e;
    max-height: 50vh;
  }
  #cs-left { min-height: 28vh; }
  #cs-prev, #cs-next { display: none; }
}
