/* CarkedIt Online — Scheduled games (create form, countdown banner, host list) */

/* Native date/time picker chrome inherits the dark scheme from base.css. */
.schedule__datetime {
  width: 100%;
}

/* ── Schedule form ─────────────────────────────────── */
.schedule__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
  /* Pull the label to its field: the form's flex gap would otherwise leave it
     floating equidistant between the previous input and its own. */
  margin-bottom: calc(var(--space-md) * -0.5);
}

/* Paste target for a whole invite — roomy enough to see what was pasted
   without pushing the Schedule button off a phone screen. */
.schedule__paste {
  width: 100%;
  min-height: 5.5rem;
  resize: vertical;
  font-family: inherit;
  line-height: 1.4;
}

.schedule__label-note {
  font-weight: 500;
  color: var(--color-text-muted);
}

/* ── Video call link ───────────────────────────────── */
.schedule__video-btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  font-size: 0.9rem;
}

/* When only the call link is left (countdown spent), drop the banner padding
   so it reads as a button rather than an empty panel. */
.schedule__banner--compact {
  padding: 0;
  background: transparent;
}

/* ── Countdown banner ───────────────────────────────
   Shown above the room code in a waiting lobby, and above the join form when a
   scheduled link is opened early. Deliberately the loudest thing on screen —
   before the game exists, the time IS the content. */
.schedule__banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md);
  background: var(--color-primary-subtle);
  border-radius: var(--radius-md);
  text-align: center;
}

.schedule__banner--closed {
  background: var(--color-input-bg);
}

.schedule__banner-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

.schedule__banner-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* The date is what the host chose and what players recognise, so it leads;
   the countdown sits under it as the live detail. */
.schedule__banner-when {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
}

/* ── Countdown ─────────────────────────────────────
   Shown under a start time on every screen that has one. */
.schedule__countdown {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
}

.schedule__countdown-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.schedule__countdown-value {
  /* Tabular figures stop the countdown jittering as digits change each second. */
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

/* Dense list rows: the surrounding text already says what it is. */
.schedule__countdown--compact {
  font-size: 0.875rem;
  font-weight: 700;
}

/* ── Add to Calendar ───────────────────────────────
   One button; the services appear underneath once pressed. */
.schedule__calendar {
  width: 100%;
  margin-top: var(--space-xs);
}

.schedule__calendar-btn {
  width: 100%;
  font-size: 0.9rem;
}

.schedule__calendar-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--space-xs);
  padding: var(--space-xs);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.schedule__calendar-menu[hidden] {
  display: none;
}

.schedule__calendar-option {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  text-align: left;
}

.schedule__how-btn {
  font-size: 0.8rem;
}

/* ── Confirmation screen ────────────────────────── */
.schedule__created-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
}

.schedule__created-when {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
}

.schedule__created-countdown {
  text-align: center;
}

/* ── Host list ──────────────────────────────────── */
.schedule__list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.schedule__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.schedule__row {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md);
  background: var(--color-input-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.schedule__row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.schedule__row-code {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: 0.15em;
}

.schedule__row-status {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* A lobby with people already in it is the one state worth calling out. */
.schedule__row-status--live {
  color: var(--color-live);
}

/* Played/cancelled games are a record, not something to act on — recede them. */
.schedule__row--closed {
  opacity: 0.6;
}

.schedule__row-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}

.schedule__row-when {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5em;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.schedule__row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
}

.schedule__row-actions .btn {
  flex: 1;
  min-width: 7rem;
  font-size: 0.8rem;
}

.schedule__row-edit {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
}

.schedule__cancel-btn {
  color: var(--color-danger);
}
