@import url('https://rsms.me/inter/inter.css');

* { box-sizing: border-box; }
html, body {
  margin: 0;
  font-family: var(--sc-font);
  background: var(--sc-light);
  color: var(--sc-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sc-indigo); }

/* ---------- Layout helpers ---------- */
.container         { max-width: 980px; margin: 0 auto; padding: clamp(1rem, 2vw, 2rem); }
.container.narrow  { max-width: 560px; }
.grid-2            { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1.25rem; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Typography ---------- */
header h1   { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0 0 .25rem; color: var(--sc-indigo); }
.subtle     { color: var(--sc-gray); margin-top: 0; }
.kicker     { color: var(--sc-orange); text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 600; margin: 0 0 .4rem; }

/* ---------- Cards ---------- */
.card {
  background: white;
  border-radius: var(--sc-radius);
  box-shadow: var(--sc-shadow);
  padding: clamp(1rem, 2vw, 1.5rem);
  margin: 1rem 0;
}

/* ---------- Forms ---------- */
form label { display: block; margin: .75rem 0; font-weight: 500; }
form input[type="text"], form input[type="date"], form textarea, form select {
  display: block; width: 100%; padding: .65rem .8rem; font-family: inherit; font-size: 1rem;
  border: 1px solid #d1d5db; border-radius: 8px; margin-top: .25rem; background: white;
}
form textarea { min-height: 6rem; resize: vertical; }
form label.checkbox { display: flex; align-items: center; gap: .5rem; }
button {
  background: var(--sc-primary); color: white; border: 0; border-radius: 8px;
  padding: .65rem 1.1rem; font: 600 1rem var(--sc-font); cursor: pointer;
  transition: filter .12s ease, transform .04s ease;
}
button:hover  { filter: brightness(0.95); }
button:active { transform: translateY(1px); }
button.ghost   { background: white; color: var(--sc-indigo); border: 1px solid #d1d5db; }
button.success { background: var(--sc-success); }
button.warning { background: var(--sc-warning); color: #1a1a1a; }
button.accent  { background: var(--sc-orange); }
button.indigo  { background: var(--sc-indigo); }
button.primary { background: var(--sc-primary); }
button.big     { padding: .85rem 1.4rem; font-size: 1.05rem; }
button.small   { padding: .35rem .6rem; font-size: .85rem; }

/* ---------- Admin: theme list ---------- */
.theme-list { list-style: none; padding: 0; margin: 0; }
.theme-row {
  background: var(--sc-light); border-radius: 10px; padding: .9rem 1rem; margin: .6rem 0;
  border: 1px solid #e5e7eb;
}
.theme-row.dragging { opacity: .6; }
.theme-row-head { display: flex; align-items: center; gap: .75rem; }
.drag-handle    { cursor: grab; color: var(--sc-gray); font-size: 1.2rem; user-select: none; }
.theme-intro    { margin: .35rem 0 0 1.6rem; font-size: .92rem; }
.theme-theory   { margin: .1rem 0 .4rem 1.6rem; font-size: .82rem; }
.items-block    { margin: .8rem 0 0 0; background: white; padding: .75rem; border-radius: 8px; border: 1px solid #e5e7eb; }
.items-table    { width: 100%; border-collapse: collapse; font-size: .92rem; }
.items-table th { text-align: left; padding: .3rem .4rem; color: var(--sc-gray); font-weight: 500; }
.items-table td { padding: .25rem .4rem; vertical-align: middle; }
.items-table input, .items-table select { padding: .35rem .5rem; font-size: .9rem; margin: 0; }
.items-table .remove-item { background: transparent; color: var(--sc-gray); font-size: 1.2rem; padding: 0 .4rem; }
.items-table .remove-item:hover { color: var(--sc-orange); }
.add-item       { margin-top: .5rem; background: white; color: var(--sc-indigo); border: 1px dashed var(--sc-primary); }

/* ---------- Facilitator topbar ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem clamp(1rem, 2vw, 2rem); background: white; box-shadow: var(--sc-shadow);
}
.topbar h1 { margin: 0; font-size: 1.2rem; }
.topbar-meta { display: flex; gap: .5rem; align-items: center; }
.badge {
  padding: .3rem .7rem; border-radius: 999px; background: var(--sc-light);
  font-size: .85rem; font-weight: 600; color: var(--sc-gray);
}
.badge.ok    { background: #dcfce7; color: #166534; }
.badge.link  { background: var(--sc-indigo); color: white; text-decoration: none; }

/* ---------- Facilitator grid ---------- */
.facilitator-grid {
  display: grid; grid-template-columns: 360px 1fr; gap: 1rem;
  padding: 1rem clamp(1rem, 2vw, 2rem); align-items: start;
}
@media (max-width: 980px) { .facilitator-grid { grid-template-columns: 1fr; } }

.control-pane .row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
.qr-wrap svg { width: 100%; height: auto; max-width: 170px; display: block; margin: .2rem auto; }

/* Regie buttons — uniform, aligned grid */
.regie-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.regie-grid button { width: 100%; margin: 0; min-height: 2.7rem; }
.regie-grid .span-2 { grid-column: 1 / -1; }
.control-pane .card { padding: 1rem 1.1rem; margin: .8rem 0; }
.control-pane h2 { margin: 0 0 .6rem; font-size: 1.1rem; }
.join-block .subtle, .join-block p { margin: .3rem 0; font-size: .88rem; }

.theme-overview         { list-style: none; padding: 0; margin: 0; }
.theme-overview-row     { margin: .3rem 0; }
.theme-overview-row button { width: 100%; text-align: left; }
.theme-overview-row.active button { background: var(--sc-indigo); color: white; border-color: var(--sc-indigo); }
.muted { color: var(--sc-gray); font-weight: 400; }

/* ---------- Projection (rechterkant facilitator) ---------- */
.projection {
  background: var(--sc-indigo); color: white; border-radius: var(--sc-radius-lg);
  min-height: 75vh; padding: clamp(1.5rem, 4vw, 3rem);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sc-shadow);
}
.proj-stage     { width: 100%; max-width: 880px; }
.proj-kicker    { text-transform: uppercase; letter-spacing: .15em; font-size: .9rem; font-weight: 600; color: var(--sc-primary); margin: 0 0 .8rem; }
.proj-title     { font-size: clamp(1.6rem, 3.4vw, 2.8rem); line-height: 1.2; margin: 0 0 1rem; color: white; }
.proj-subtle    { color: rgba(255, 255, 255, .7); margin: 0 0 1rem; }
.proj-counter   { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 600; margin-top: 1.5rem; }
.proj-results   { margin-top: 1.5rem; }

.bar-row { display: grid; grid-template-columns: 2.5rem 1fr 3rem; gap: .75rem; align-items: center; margin: .35rem 0; }
.bar-label.long { grid-column: 1 / 2; }
.bar-row .bar-label.long { font-size: .85rem; color: rgba(255,255,255,.85); }
.bar     { display: block; height: .9rem; background: rgba(255,255,255,.12); border-radius: 999px; overflow: hidden; }
.bar-fill{ display: block; height: 100%; min-width: 2px; background: var(--sc-primary); border-radius: 999px; transition: width .3s ease; }
.bar-count { font-weight: 600; text-align: right; }
@media (max-width: 720px) { .bar-row { grid-template-columns: 1fr 3rem; } .bar-row .bar-label { display: none; } }

.card-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-top: 1rem; }
.card-tile { background: rgba(255,255,255,.08); padding: .8rem; border-radius: 10px; border-left: 3px solid var(--sc-primary); font-size: .95rem; }

/* ---------- Participant ---------- */
.view-participant header { padding: .25rem 0 .75rem; }
.view-participant .card { padding: 1.2rem; }
.view-participant .waiting { text-align: center; padding: clamp(2rem, 8vw, 4rem) 1rem; }

.likert { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: space-between; margin: 1.2rem 0 .4rem; }
.likert-btn {
  flex: 1 1 0; min-width: 3rem; min-height: 3.5rem; font-size: 1.4rem; font-weight: 700;
  background: var(--sc-light); color: var(--sc-indigo); border: 2px solid #e5e7eb;
}
.likert-btn:active { background: var(--sc-primary); color: white; border-color: var(--sc-primary); }
.likert-labels { display: flex; justify-content: space-between; color: var(--sc-gray); font-size: .85rem; }

.choice-list { display: grid; gap: .55rem; margin-top: 1rem; }
.choice-btn  { background: var(--sc-light); color: var(--sc-dark); border: 1px solid #e5e7eb; text-align: left; padding: .9rem 1rem; font-size: 1rem; }
.choice-btn:active { background: var(--sc-primary); color: white; }

.dot-row {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  background: var(--sc-light); padding: .7rem .8rem; border-radius: 10px; margin: .35rem 0;
}
.dot-label    { flex: 1; font-weight: 500; }
.dot-controls { display: flex; align-items: center; gap: .4rem; }
.dot-controls button { padding: .35rem .9rem; background: white; color: var(--sc-indigo); border: 1px solid #d1d5db; font-size: 1.2rem; min-width: 2.6rem; }
.dot-count    { min-width: 1.6rem; text-align: center; font-weight: 700; font-size: 1.1rem; }

code           { background: var(--sc-light); padding: .15rem .4rem; border-radius: 4px; word-break: break-all; }
.session-code  { font-family: 'Inter', monospace; font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: .15em; color: var(--sc-primary); margin: .5rem 0; }

/* ---------- Anonymity cues ---------- */
.anon-note { background: #EDE9FE; border-left: 3px solid var(--sc-indigo-2); color: var(--sc-indigo);
  padding: .6rem .8rem; border-radius: 0 8px 8px 0; font-size: .9rem; margin: .6rem 0; }
.anon-pill { background: #EDE9FE; color: var(--sc-indigo-2); padding: .1rem .5rem; border-radius: 999px;
  font-size: .8rem; font-weight: 600; }

/* ---------- Participant: question blocks ---------- */
.q-block { border-top: 1px solid #eef0f3; padding-top: 1rem; margin-top: 1rem; }
.q-block:first-of-type { border-top: 0; }
.q-prompt { font-weight: 600; margin: 0 0 .3rem; }
.likert-btn.is-selected, .choice-btn.is-selected { background: var(--sc-primary); color: #fff; border-color: var(--sc-primary); }

/* ---------- Participant: stoplight ---------- */
.stoplight-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .8rem 0 .5rem; }
.sl-btn { border: 2px solid #e5e7eb; background: var(--sc-light); padding: .8rem .4rem; font-weight: 600; color: var(--sc-dark); }
.sl-btn.sl-groen.is-selected  { background: #DCFCE7; border-color: var(--sc-success); color: #166534; }
.sl-btn.sl-oranje.is-selected { background: #FEF3C7; border-color: var(--sc-warning); color: #92400e; }
.sl-btn.sl-rood.is-selected   { background: #FEE2E2; border-color: #EF4444; color: #991b1b; }
.sl-note { margin-top: .2rem; }

/* ---------- Participant: cards ---------- */
.cards-add { display: flex; gap: .5rem; margin: .8rem 0 .6rem; }
.cards-add .card-text { margin: 0; }
.card-add { min-width: 3rem; font-size: 1.3rem; padding: .5rem; }
.my-cards { display: flex; flex-wrap: wrap; gap: .4rem; }
.my-card { display: inline-flex; align-items: center; gap: .4rem; background: var(--sc-light);
  border: 1px solid #e5e7eb; border-radius: 999px; padding: .35rem .4rem .35rem .8rem; font-size: .92rem; }
.card-del { background: transparent; color: var(--sc-gray); padding: 0 .3rem; font-size: 1.1rem; line-height: 1; }
.card-del:hover { color: var(--sc-orange); }

/* ---------- Projection: aggregates ---------- */
.proj-item { margin: 1.1rem 0; padding-bottom: .8rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.proj-item:last-child { border-bottom: 0; }
.proj-q { font-size: 1.05rem; font-weight: 600; margin: 0 0 .2rem; color: #fff; }
.proj-avg { margin: 0 0 .4rem; color: rgba(255,255,255,.85); }
.proj-q .muted, .proj-avg .muted, .sl-legend.muted { color: rgba(255,255,255,.6); }
.bars { margin-top: .3rem; }
.rev-tag { font-size: .72rem; background: rgba(255,255,255,.15); padding: .1rem .45rem; border-radius: 999px;
  font-weight: 600; vertical-align: middle; color: rgba(255,255,255,.9); }
.metric-big { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .6rem; }
.metric-num { font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 800; color: var(--sc-primary); }
.metric-cap { color: rgba(255,255,255,.75); font-size: .95rem; }

/* ---------- Projection: stoplight ---------- */
.sl-stack { display: flex; height: 1.6rem; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.12); margin: .3rem 0; }
.sl-seg { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .85rem; min-width: 0; transition: flex .3s ease; }
.sl-seg.sl-groen  { background: var(--sc-success); }
.sl-seg.sl-oranje { background: var(--sc-warning); color: #1a1a1a; }
.sl-seg.sl-rood   { background: #EF4444; }
.sl-legend { font-size: .88rem; margin: .3rem 0 0; }
.sl-note-tile { font-style: italic; }
.sl-border-groen  { border-left-color: var(--sc-success) !important; }
.sl-border-oranje { border-left-color: var(--sc-warning) !important; }
.sl-border-rood   { border-left-color: #EF4444 !important; }

/* ---------- Projection: retro ---------- */
.retro-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 720px) { .retro-grid { grid-template-columns: 1fr; } }
.retro-head { font-size: 1rem; color: #fff; margin: 0 0 .5rem; }
.retro-stack { display: flex; flex-direction: column; gap: .5rem; }

/* ---------- Participant: agreement box (stoplicht) ---------- */
.agreement-box { background: var(--sc-light); border-left: 4px solid var(--sc-indigo-2);
  border-radius: 0 8px 8px 0; padding: .7rem .9rem; margin: .6rem 0 1rem; font-size: .98rem;
  line-height: 1.45; color: var(--sc-night); }
.agreement-label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--sc-indigo-2); margin-bottom: .25rem; }
.proj-agreement { color: rgba(255,255,255,.82); font-size: .95rem; margin: .1rem 0 .5rem;
  line-height: 1.4; }

/* ---------- Participant: starvote ---------- */
.star-budget { font-size: 1rem; margin: .2rem 0 .8rem; color: var(--sc-indigo); }
.vote-group-head { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--sc-gray); margin: .9rem 0 .3rem; }
.dot-count { color: var(--sc-warning); letter-spacing: 1px; }
.dot-controls button:disabled { opacity: .35; cursor: default; }

/* ---------- Projection: stemmen ---------- */
.vote-list { margin-top: .5rem; }
.vote-row { display: grid; grid-template-columns: 1fr 6rem 7rem; gap: .8rem; align-items: center; margin: .4rem 0; }
.vote-text { color: #fff; font-size: 1rem; }
.vote-group { font-size: .72rem; background: rgba(255,255,255,.15); padding: .08rem .4rem; border-radius: 999px;
  color: rgba(255,255,255,.85); margin-left: .3rem; white-space: nowrap; }
.vote-bar { height: .7rem; }
.vote-stars { color: var(--sc-warning); font-size: 1rem; text-align: right; letter-spacing: 1px; white-space: nowrap; }
@media (max-width: 720px) { .vote-row { grid-template-columns: 1fr 4rem; } .vote-bar { display: none; } }

/* ---------- Projection: acties ---------- */
.acties-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 1.2rem; align-items: start; }
@media (max-width: 720px) { .acties-grid { grid-template-columns: 1fr; } }
.acties-ref .card-tile { margin-bottom: .4rem; }
.acties-table { width: 100%; border-collapse: collapse; color: #fff; }
.acties-table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.6); padding: .3rem .5rem; border-bottom: 1px solid rgba(255,255,255,.2); }
.acties-table td { padding: .45rem .5rem; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 1rem; vertical-align: top; }

/* ---------- Facilitator: action editor ---------- */
.action-add { display: grid; grid-template-columns: 1fr; gap: .4rem; margin-bottom: .6rem; }
.action-add .act-owner { }
.action-list { list-style: none; padding: 0; margin: 0; }
.action-list li { display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  background: var(--sc-light); border: 1px solid #e5e7eb; border-radius: 8px; padding: .5rem .7rem; margin: .35rem 0; font-size: .95rem; }

/* ---------- Read-only beamer screen ---------- */
.view-screen { background: var(--sc-light); }
.screen-wrap { padding: clamp(1rem, 2.5vw, 2.5rem); min-height: 100vh; position: relative; }
.view-screen .projection { min-height: calc(100vh - 5rem); }

.beamer-join { display: flex; gap: 1.5rem; align-items: center; background: #fff;
  border-radius: var(--sc-radius); box-shadow: var(--sc-shadow); padding: 1.2rem 1.6rem; margin-bottom: 1rem; }
.beamer-join .beamer-qr svg { width: 200px; height: auto; display: block; }
.beamer-join-text .kicker { margin-bottom: .2rem; }
.beamer-join-text code { font-size: 1.05rem; }
/* Once started: shrink the QR to a fixed corner so results get the room */
.beamer-join.is-compact { position: fixed; top: 1rem; right: 1rem; z-index: 5;
  flex-direction: column; gap: .35rem; padding: .6rem; margin: 0; }
.beamer-join.is-compact .beamer-qr svg { width: 96px; }
.beamer-join.is-compact .beamer-join-text { display: none; }
.view-screen .projection { min-height: calc(100vh - 16rem); }
