/* Zoom-panel-appropriate styling — neutral, clean, fits inside the side panel */
:root {
  --bg: #1a1a2e;
  --surface: #232340;
  --text: #e0e0e0;
  --text-muted: #8b8ba3;
  --accent: #2d8cff;       /* Zoom blue */
  --success: #2ecc71;
  --border: #2e2e4a;
  --warning: #e67e22;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
}

h1 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Roster header with count badge */
.roster-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  width: 100%;
  max-width: 340px;
  margin-bottom: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

/* Roster list */
.roster-list {
  width: 100%;
  max-width: 340px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Individual roster row */
.roster-row {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  gap: 10px;
}

.roster-row.self {
  border-color: var(--accent);
}

.roster-row.verified {
  border-color: var(--success);
}

.roster-row .roster-info {
  flex: 1;
  min-width: 0;
}

.roster-row .roster-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roster-row .roster-email {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roster-row .roster-host-badge {
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.roster-row .roster-status {
  font-size: 18px;
  flex-shrink: 0;
}

/* Nudge button */
.nudge-btn {
  background: var(--warning);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.nudge-btn:hover {
  opacity: 0.85;
}

.nudge-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Not-in-Witness participant (dimmed row) */
.roster-row.not-in-witness { opacity: 0.5; }

/* Subtitle line inside roster rows (e.g. "Verifying...", "Hasn't opened Witness") */
.roster-subtitle { font-size: 11px; color: var(--text-muted); font-style: italic; }

/* Nudge flash animation on self row */
.nudge-flash {
  animation: nudgeFlash 1.5s ease-in-out 3;
}

@keyframes nudgeFlash {
  0%, 100% { border-color: var(--accent); }
  50% { border-color: var(--warning); box-shadow: 0 0 8px rgba(230, 126, 34, 0.4); }
}

/* Verification area — sits above the roster */
.verification-area {
  width: 100%;
  max-width: 340px;
  margin-bottom: 16px;
}

.verification-heading {
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
}

/* HV widget container */
#hv-container {
  width: 100%;
  max-width: 340px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Compact verified-self line (replaces widget after verification) */
.verified-self-line {
  display: none;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--success);
  border-radius: 6px;
  padding: 10px 12px;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}

.verified-self-line .verified-self-check {
  font-size: 18px;
  color: var(--success);
  flex-shrink: 0;
}

.verified-self-line #verified-self-name {
  color: var(--text);
}

/* Email prompt for shared-app attendees without a stored email */
.email-prompt {
  text-align: center;
  padding: 16px 0;
}

.email-prompt-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.email-prompt-input {
  width: 100%;
  max-width: 280px;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  box-sizing: border-box;
}

.email-prompt-input:focus {
  border-color: var(--accent);
}

.email-prompt-btn {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 12px auto 0;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.email-prompt-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.email-prompt-error {
  font-size: 12px;
  color: var(--warning);
  margin-top: 8px;
  min-height: 16px;
}

/* Collaborate button (host only, after self-verification) */
.collaborate-btn {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 8px;
}

.collaborate-btn:hover { opacity: 0.85; }
.collaborate-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Auto-open hint (shown once per session after verification) */
.auto-open-hint {
  display: none;
  background: rgba(45, 140, 255, 0.08);
  border: 1px solid rgba(45, 140, 255, 0.15);
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  position: relative;
}

.auto-open-hint .hint-dismiss {
  position: absolute;
  top: 4px;
  right: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  opacity: 0.6;
}

.auto-open-hint .hint-dismiss:hover { opacity: 1; }

/* Error state */
.error-msg {
  color: #e74c3c;
  font-size: 13px;
  margin-top: 12px;
  display: none;
}

/* DEV MODE badge */
.dev-badge {
  position: fixed;
  top: 8px;
  right: 8px;
  background: var(--warning);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  display: none;
}

/* Dev controls */
.dev-controls {
  margin-top: 20px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--warning);
  border-radius: 8px;
  width: 100%;
  max-width: 340px;
  font-size: 13px;
  display: none;
}

.dev-controls label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Loading spinner */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Status text below widget */
.status-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
  text-align: center;
}

/* Roster disclaimer beneath the verified count */
.roster-disclaimer {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.3;
  opacity: 0.7;
}

/* Dev badge preview canvases */
.dev-badge-preview {
  width: 100%;
  max-width: 900px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.dev-badge-preview canvas {
  border: 1px solid var(--border);
  border-radius: 4px;
  max-width: 100%;
  height: auto;
}

.dev-badge-preview-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  margin-bottom: 2px;
}
