/* Open Day companion app - view styles (Phase 2 skeleton). */

#app {
  min-height: 100vh;
}

.od-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-2xl) var(--space-lg);
}

.od-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.od-header .logo-10x {
  height: 40px;
}

.od-presenter-tag {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

/* ── Cards ──────────────────────────────────── */
.od-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* ── Forms ──────────────────────────────────── */
.od-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}

.od-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 17px;
  font-family: var(--font-body);
  color: var(--text-color);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s ease;
}

.od-input:focus {
  border-color: var(--primary-color);
}

.od-btn {
  padding: 13px 28px;
  font-size: 16px;
  font-weight: 500;
  font-family: var(--font-body);
  color: #fff;
  background: var(--accent-warm);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.od-btn:hover:not(:disabled) {
  background: var(--accent-warm-hover);
}

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

.od-btn-big {
  flex: 1;
  padding: 22px;
  font-size: 22px;
}

.od-error {
  color: #c0392b;
  font-size: 14px;
}

/* ── Live / status ──────────────────────────── */
.od-status {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 15px;
  color: var(--text-secondary);
}

.od-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-default);
}

.od-dot.is-on {
  background: #2ecc71;
}

.od-dot.is-off {
  background: #e74c3c;
}

/* ── Display view (venue screen) ────────────── */
/* Inline-size container: slide typography is sized in cqw against this. */
.od-display-stage {
  position: relative;
  min-height: 100vh;
  container-type: inline-size;
}

.od-display-badge {
  position: absolute;
  inset-block-end: var(--space-lg);
  inset-inline-end: var(--space-lg);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  background: rgba(255, 255, 255, 0.55);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(6px);
}

/* ── Participant (phone companion) ──────────── */
.od-participant-status {
  align-self: center;
}

/* Wrapper around the phone slide; inline-size container so the slide's cqw
   typography tracks the card width on any handset. */
.od-participant-slide {
  width: 100%;
  max-width: 480px;
  container-type: inline-size;
}

/* Compact the chrome on real phones so the slide card gets the width. */
@media (max-width: 480px) {
  .od-view {
    padding: var(--space-lg) var(--space-md);
    gap: var(--space-lg);
  }

  .od-header .logo-10x {
    height: 32px;
  }
}

/* ── Presenter console ──────────────────────── */
.od-console {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* ── Presenter preview stage ─────────────────
   A fixed 1920x1080 display canvas scaled to the stage width, so the preview
   is exactly what the venue screen shows (same 16:9 ratio, same cqw type). */
.od-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-md);
  background: var(--bg-surface);
}

.od-stage-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 1920px;
  height: 1080px;
  transform-origin: top left;
  container-type: inline-size;
}

.od-stage-canvas .slide--surface-display {
  min-height: 100%;
  height: 100%;
}

/* ── Presenter preview meta (notes + next) ──── */
.od-preview-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.od-preview-notes,
.od-preview-next {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  text-align: left;
}

/* Fixed heights so the controls below never move between slides; long notes
   scroll inside the box instead of growing it. */
.od-preview-notes {
  height: 132px;
  flex: none;
  overflow-y: auto;
}

.od-preview-next {
  height: 76px;
  flex: none;
  overflow: hidden;
}

.od-preview-meta-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--text-tertiary);
}

.od-preview-notes-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-color);
  /* Notes are Hebrew; keep them RTL for the presenter. */
  direction: rtl;
  text-align: right;
}

.od-preview-next-text {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-color);
  direction: rtl;
  text-align: right;
}

.od-console-index {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  margin-inline-start: auto;
}
.od-controls {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

/* "Go to beginning": quieter secondary action next to Prev/Next. */
.od-btn-start {
  flex: 0 0 auto;
  color: var(--text-color);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
}

.od-btn-start:hover:not(:disabled) {
  background: var(--bg-surface);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* ── Slide pager: numbered buttons in wrapping rows ── */
.od-pager {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
  margin-top: var(--space-sm);
}

.od-pager-btn {
  padding: 10px 0;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.od-pager-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.od-pager-btn.is-active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
  font-weight: 700;
}

.od-kbd-hint {
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}

.od-participants-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: var(--space-sm);
  color: var(--text-color);
}

.od-participants-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-size: 15px;
  color: var(--text-secondary);
}

/* ── Presenter curriculum control (drives the synced accordion) ───────────── */
.od-curric-ctl {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--space-md);
}

.od-curric-ctl-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--text-tertiary);
}

.od-curric-ctl-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.od-curric-ctl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 260px;
  padding: 6px 10px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  font-family: inherit;
  font-size: 12px;
  color: var(--text-color);
  cursor: pointer;
  text-align: start;
}

.od-curric-ctl-btn:hover {
  border-color: var(--primary-color);
}

.od-curric-ctl-btn.is-open {
  border-color: var(--primary-color);
  background: var(--primary-light);
  color: var(--primary-color);
}

.od-curric-ctl-num {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.7;
  flex: none;
}

.od-curric-ctl-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
