/* poll/css/poll.css — styles for host, play, and dashboard panel */

:root {
  --poll-1: #E53E3E;
  --poll-2: #3182CE;
  --poll-3: #2F9E44;
  --poll-4: #D4760A;
  --poll-5: #8B5CF6;
  --poll-6: #DB2777;
}

/* Host lobby QR panel + dashboard-list QR modal both reuse the shared
   .mp-qr-panel / #globe-qr-* rules from css/mp-shared.css. */

/* ── Question text (shared by host + play) ─────────────────── */
.poll-q-text {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 20px;
  text-align: center;
}

/* ── Vote option buttons (play page) ─────────────────────────── */
.poll-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.poll-option-btn {
  border: none;
  border-radius: 12px;
  padding: 16px 18px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.poll-option-btn:hover  { opacity: .88; transform: scale(1.01); }
.poll-option-btn:active { transform: scale(.98); }
.poll-option-btn:disabled { cursor: default; transform: none; opacity: .6; }
.poll-option-btn:nth-child(1) { background: var(--poll-1); }
.poll-option-btn:nth-child(2) { background: var(--poll-2); }
.poll-option-btn:nth-child(3) { background: var(--poll-3); }
.poll-option-btn:nth-child(4) { background: var(--poll-4); }
.poll-option-btn:nth-child(5) { background: var(--poll-5); }
.poll-option-btn:nth-child(6) { background: var(--poll-6); }

.poll-waiting-msg {
  text-align: center;
  padding: 32px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ── Results bar chart (host live/ended + play ended) ────────── */
.poll-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-height: 140px;
  margin: 12px 0 20px;
}
.poll-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.poll-bar-fill { width: 100%; border-radius: 6px 6px 0 0; transition: height .5s; min-height: 4px; }
.poll-bar-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-align: center; }
.poll-bar-count { font-size: 13px; font-weight: 700; }
.poll-bar-col:nth-child(1) .poll-bar-fill { background: var(--poll-1); }
.poll-bar-col:nth-child(2) .poll-bar-fill { background: var(--poll-2); }
.poll-bar-col:nth-child(3) .poll-bar-fill { background: var(--poll-3); }
.poll-bar-col:nth-child(4) .poll-bar-fill { background: var(--poll-4); }
.poll-bar-col:nth-child(5) .poll-bar-fill { background: var(--poll-5); }
.poll-bar-col:nth-child(6) .poll-bar-fill { background: var(--poll-6); }

.poll-total-votes {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ── Dashboard panel: create form + poll list ────────────────── */
.poll-option-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.poll-option-input-row input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--btn-border);
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 14px;
  box-sizing: border-box;
  font-family: inherit;
}
.poll-option-input-row input:focus { outline: 2px solid var(--purple); border-color: transparent; }
.poll-option-remove-btn {
  background: none;
  border: 1px solid var(--btn-border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  width: 36px;
  flex-shrink: 0;
}
.poll-option-remove-btn:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }

.poll-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.poll-row {
  background: var(--surface);
  border: 1px solid var(--toolbar-border);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.poll-row-info { flex: 1; min-width: 0; }
.poll-row-question { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poll-row-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.poll-row-meta span + span::before { content: ' · '; }
.poll-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

.poll-status-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.poll-status-badge.waiting { background: #fef3c7; color: #92400e; }
.poll-status-badge.live    { background: #dcfce7; color: #15803d; }
.poll-status-badge.ended   { background: #e5e7eb; color: #4b5563; }
