/* ── facilitator.css ─────────────────────────────────────────────────────────
   Facilitator-specific styles. Always loaded alongside app.css.
────────────────────────────────────────────────────────────────────────────── */

/* ── Question color scheme ───────────────────────────────────────────────── */
:root {
  --question-a: #7a8fff;
  --question-b: #ff9f7a;
  --question-c: #7affd4;
}

/* ── Button variants ─────────────────────────────────────────────────────── */
.btn-primary {
  background: #7a8fff;
  border-color: #7a8fff;
  color: #0d0d1a;
}

.btn-primary:hover:not(:disabled) {
  background: #9aafff;
  border-color: #9aafff;
  color: #0d0d1a;
}

.btn-danger {
  background: transparent;
  border-color: #ff6b6b;
  color: #ff6b6b;
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
}

.btn-danger:hover:not(:disabled) {
  background: #ff6b6b;
  color: #0d0d1a;
}

/* ── Facilitator container (wider than participant screens) ──────────────── */
.container-wide {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Page header row ─────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.page-header h1 {
  text-align: left;
}

/* ── Workshop list ───────────────────────────────────────────────────────── */
.workshop-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.workshop-row {
  background: #0d0d1a;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  align-items: center;
  gap: 1rem;
  color: inherit;
  transition: border-color 0.2s;
  cursor: pointer;
}

.workshop-row:hover {
  border-color: #7a8fff;
}

.workshop-row-error {
  background: #1a0d0d;
  border: 1px solid #ff6b6b;
  border-radius: 4px;
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  color: #ff6b6b;
}

.workshop-code {
  font-size: 1rem;
  color: #fff;
  letter-spacing: 0.05em;
}

.workshop-detail {
  font-size: 0.85rem;
  color: #888;
}

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.modal-overlay.modal-open {
  display: flex;
}

.modal {
  background: #12122a;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 1.75rem 2rem;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  text-align: left;
  font-size: 1rem;
}

.modal-close {
  background: none;
  border: none;
  color: #555;
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover { color: #c8c8d0; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ── Participant table ───────────────────────────────────────────────────── */
.participant-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.participant-table th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7a8fff;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #333;
  font-weight: normal;
}

.participant-table td {
  padding: 0.65rem 0.75rem;
  color: #c8c8d0;
  border-bottom: 1px solid #1a1a2e;
  vertical-align: middle;
}

.participant-table tr:hover td {
  background: #0d0d1a;
  cursor: pointer;
}

.participant-table td.incomplete {
  color: #555;
  font-style: italic;
}

.participant-table td.name-link {
  color: #7a8fff;
}

/* ── Toggle row ──────────────────────────────────────────────────────────── */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: #888;
}

.toggle-row input[type="checkbox"] {
  accent-color: #7a8fff;
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

/* ── Pie chart grid ──────────────────────────────────────────────────────── */
.pie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.pie-card {
  background: #0d0d1a;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.pie-card-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #7a8fff;
  text-align: center;
  width: 100%;
}

.pie-svg {
  width: 140px;
  height: 140px;
}

.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  font-size: 0.8rem;
}

.pie-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #c8c8d0;
}

.pie-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.pie-no-data {
  font-size: 0.8rem;
  color: #444;
  font-style: italic;
}

/* ── Character selector placeholder ─────────────────────────────────────── */
.character-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: #555;
}

.character-selector .placeholder-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #444;
}

.character-tag {
  background: #12122a;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  color: #7a8fff;
  letter-spacing: 0.05em;
}

/* ── Questions reference page ────────────────────────────────────────────── */
.question-set {
  background: #0d0d1a;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.question-set-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #7a8fff;
}

.question-row {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}

.question-letter {
  font-size: 0.75rem;
  font-weight: bold;
  min-width: 1rem;
  flex-shrink: 0;
}

.question-letter.a { color: var(--question-a); }
.question-letter.b { color: var(--question-b); }
.question-letter.c { color: var(--question-c); }

.question-text-ref {
  font-size: 0.9rem;
  color: #c8c8d0;
  line-height: 1.5;
}

/* ── Back link ───────────────────────────────────────────────────────────── */
.back-link {
  font-size: 0.8rem;
  color: #7a8fff;
  text-decoration: none;
  letter-spacing: 0.03em;
}

.back-link:hover { text-decoration: underline; }

/* ── Section header ──────────────────────────────────────────────────────── */
.section-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #7a8fff;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #333;
}

/* ── One-pager participant header ────────────────────────────────────────── */
.participant-header-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

/* ── Input with toggle (password visibility) ─────────────────────────────── */
.input-with-toggle {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-toggle input {
  width: 100%;
  padding-right: 2.75rem;
}

.input-toggle-btn {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #555;
  padding: 0;
  line-height: 1;
}

.input-toggle-btn:hover { color: #c8c8d0; }
