/* Session entrance pages (entrance.jsx): Input Sheets and Recall on desktop.
   Past sessions as a list; live and upcoming use each page's own cards. */

.en-section { margin-top: 22px; }
.en-chev { flex: none; transition: transform 0.15s ease-out; }
.is-sess-section-caret .en-chev { width: 12px; height: 12px; vertical-align: -1px; }
.en-empty { padding: 36px 2px; color: var(--text-secondary); font-size: 13.5px; }

/* Room: its colour and name. */
.en-room { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-size: 12.5px; color: var(--text-secondary); }
.en-room-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--room); }
.en-room-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.en-state { font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.en-state.ready { color: var(--green); }
.en-state.part { color: var(--accent-text); }

/* ─── Past: search, rooms, list ───────────────────────────────────── */
.en-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 10px 0 10px; }
.en-toolbar .page-search { flex: 1 1 300px; max-width: 420px; margin: 0; }
.en-found { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.en-chips { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
.en-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text-secondary); font: inherit; font-size: 12.5px; cursor: pointer;
}
.en-chip:hover { border-color: var(--border-strong); color: var(--text-primary); }
.en-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.en-chip[aria-pressed="true"] {
  border-color: color-mix(in oklab, var(--room, var(--accent)) 60%, var(--border));
  background: color-mix(in oklab, var(--room, var(--accent)) 14%, var(--surface));
  color: var(--text-primary);
}
.en-chip-count { font-size: 11.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

.en-rows {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface);
}
.en-block { margin-top: 12px; }
.en-block.muted { opacity: 0.85; }

/* Time groups: a header row each (Last 14 days, months, years). */
.en-group + .en-group { border-top: 1px solid var(--border); }
.en-group-head {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 14px;
  border: 0; background: color-mix(in oklab, var(--bg) 35%, var(--surface));
  color: var(--text-primary); font: inherit; text-align: left; cursor: pointer;
}
.en-group-head:hover { background: var(--surface-2); }
.en-group-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.en-group-head .en-chev { color: var(--text-secondary); }
.en-group-title { font-size: 13px; font-weight: 600; }
.en-group-count { margin-left: auto; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

/* Months inside a year. */
.en-month { padding: 12px 14px 6px 38px; border-top: 1px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
.en-month span { margin-left: 6px; font-weight: 400; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

.en-row {
  display: grid; grid-template-columns: 128px 148px minmax(0, 1fr) 150px 132px 14px;
  align-items: center; gap: 0 16px;
  width: 100%; min-height: 50px; padding: 6px 14px;
  border: 0; border-top: 1px solid var(--border); background: none;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.en-row:hover { background: var(--surface-2); }
.en-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.en-row:disabled { cursor: default; }
.en-row:disabled:hover { background: none; }
.en-row .en-chev { color: var(--text-secondary); }
.en-row .en-state { text-align: right; }
.en-when { font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.en-who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.en-artist { font-size: 14px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.en-row:disabled .en-artist { color: var(--text-secondary); font-weight: 500; }
.en-detail, .en-eng { font-size: 12.5px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Repeat bookings: one row that opens into each day. */
.en-fold-items { border-top: 1px solid var(--border); background: color-mix(in oklab, var(--bg) 45%, var(--surface)); }
.en-fold-items .en-row { padding-left: 30px; min-height: 44px; }
.en-fold-items .en-row:first-child { border-top: 0; }
.en-fold.open > .en-row-fold { background: var(--surface-2); }

/* Narrower windows: the engineer column goes first. */
@media (max-width: 1180px) {
  .en-row { grid-template-columns: 112px 128px minmax(0, 1fr) 118px 14px; gap: 0 12px; }
  .en-row .en-eng { display: none; }
}

@media (prefers-reduced-motion: reduce) { .en-chev { transition: none; } }
