/*
 * ab.css — A/B compare page: upload slots, the simulated sidebar
 * column (variants shuffled among generated distractor tiles), and
 * the self-scoring tally.
 */

.variant-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.variant-slot {
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
  background: var(--bg);
}

.variant-slot__thumb {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: var(--bg-inset);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 6px;
  text-align: center;
}

.variant-slot__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.variant-slot label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.variant-slot input[type="file"] {
  width: 100%;
  font-size: 0.75rem;
}

.variant-slot input[type="text"] {
  width: 100%;
  margin-top: 6px;
  font-size: 0.8125rem;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-primary);
}

.variant-slot__remove {
  margin-top: 8px;
}

.rig-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0 14px;
}

.rig-header h2 {
  font-size: 1.0625rem;
  margin: 0;
}

.rig-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  background: var(--bg-inset);
  border-radius: var(--radius-lg);
  padding: 14px;
}

/* The [hidden] attribute is set/cleared from ab.js. Author CSS that
   sets `display` on the same element takes precedence over the
   user-agent's default `[hidden] { display: none }` rule (author
   origin beats user-agent origin regardless of specificity), so
   without this explicit override an "empty" rig-column would still
   render as a visible, content-less box instead of disappearing. */
.rig-column[hidden] {
  display: none;
}

.rig-tile {
  display: flex;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 6px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

.rig-tile:hover {
  background: var(--bg);
}

.rig-tile:focus-visible {
  border-color: var(--focus-ring);
}

.rig-tile .yt-thumb {
  width: 168px;
  flex-basis: 168px;
  background-size: cover;
  background-position: center;
}

.rig-tile .yt-body {
  min-width: 0;
}

.rig-tile .yt-title {
  font-size: 0.875rem;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.rig-tile .yt-channel {
  margin-top: 4px;
}

.rig-tile[data-kind="distractor"] .yt-title,
.rig-tile[data-kind="distractor"] .yt-channel,
.rig-tile[data-kind="distractor"] .yt-meta {
  color: var(--text-secondary);
}

.rig-tile__tag {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.rig-tile[data-kind="distractor"] .rig-tile__tag {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 0.875rem;
  max-width: 480px;
}

.score-table th,
.score-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.score-table td.score-count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.score-bar-track {
  background: var(--bg-inset);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  width: 100%;
  min-width: 80px;
}

.score-bar-fill {
  background: var(--accent);
  height: 100%;
  border-radius: 999px;
}

.rounds-count {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.empty-state {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  padding: 20px;
  text-align: center;
}
