/* Mobile-first attendee styles. Palette matches web/public/css/tokens.css so
   phones and TVs read as the same event. */

:root {
  --navy: #06172f;
  --deep-teal: #003c43;
  --teal: #14c8c5;
  --teal-soft: #83e5df;
  --paper: #f7faf9;
  --paper-soft: #edf4f3;
  --paper-line: #bdd4d1;
  --ink: #0b2230;
  --muted: #547077;
  --danger: #c0392b;
  --warning: #b7791f;
  --font-body: "Spartan", "League Spartan", "Century Gothic", Futura, system-ui, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; font-size: 100%; }
/* "Larger text" toggle: every size below is in rem, so this one rule scales the
   whole app. */
html[data-text="large"] { font-size: 125%; }
/* iPhone: this system font is the only way a page gets the Text Size set in the
   phone's settings. body resets the family and line height. The toggle then
   zooms on top, because 125% here would discard the phone's setting. */
@supports (font: -apple-system-body) {
  html, html[data-text="large"] { font: -apple-system-body; }
  html[data-text="large"] body { zoom: 1.25; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
}

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: var(--navy);
  color: #fff;
  padding: 14px 16px 10px;
}
.text-size {
  flex: none;
  min-width: 44px;
  min-height: 44px;
  margin: -4px -8px 0 0;
  border: 1px solid var(--teal-soft);
  border-radius: 8px;
  background: transparent;
  color: var(--teal-soft);
  font: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}
.text-size span { font-size: 1.25rem; }
.text-size[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--navy); }
.text-size:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.room-link { color: inherit; text-decoration: underline; text-decoration-color: var(--paper-line); text-underline-offset: 3px; }
.back-link { display: inline-block; margin: 0 0 12px; padding: 6px 0; color: var(--deep-teal); font-weight: 600; }
.link-button {
  margin: 6px 0 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--deep-teal);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.hint { flex: 1 1 100%; margin: 4px 0 0; font-size: 0.8rem; color: var(--muted); }
.top h1 { margin: 0; font-size: 1.15rem; letter-spacing: 0.02em; }
.feed-status { margin: 2px 0 0; font-size: 0.75rem; color: var(--teal-soft); min-height: 1em; }
.feed-status.warn { color: #ffd479; }

.tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap; /* very large text: tabs take a second row instead of overlapping */
  background: var(--deep-teal);
}
.tabs button {
  flex: 1 1 auto;
  padding: 12px 4px;
  white-space: nowrap;
  font-size: 0.9rem;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--teal-soft);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.tabs button[aria-selected="true"] { color: #fff; border-bottom-color: var(--teal); }
.tabs button:focus-visible, .chip:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: -3px;
}

main { padding: 12px 16px 24px; max-width: 760px; margin: 0 auto; }
main:focus { outline: none; }

.foot { max-width: 760px; margin: 0 auto; padding: 0 16px 48px; text-align: center; }
.foot a { display: inline-block; padding: 12px 8px; color: var(--deep-teal); font-size: 0.85rem; font-weight: 600; }

.page-heading { margin: 0 0 4px; font-size: 1.15rem; color: var(--deep-teal); }
.sponsor-card { padding: 0; }
.sponsor-card summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 14px;
  cursor: pointer;
  list-style: none;
}
.sponsor-card summary::-webkit-details-marker { display: none; }
.sponsor-card summary::after { content: "+"; margin-left: auto; font-size: 1.3rem; color: var(--muted); }
.sponsor-card[open] summary::after { content: "–"; }
.sponsor-logo { width: 72px; height: 36px; object-fit: contain; flex: none; }
.sponsor-name { font-weight: 700; color: var(--deep-teal); min-width: 0; }
.sponsor-card summary small { color: var(--muted); white-space: nowrap; }
.sponsor-sessions { padding: 0 10px 2px; border-top: 1px solid var(--paper-soft); padding-top: 10px; }

.notice {
  background: var(--paper-soft);
  border-left: 4px solid var(--teal);
  padding: 10px 12px;
  margin: 0 0 12px;
  border-radius: 4px;
}
.notice.warn { border-left-color: var(--warning); }
.loading, .empty { color: var(--muted); text-align: center; padding: 32px 0; }

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--paper-line);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 12px;
}
.card h2 { margin: 0 0 8px; font-size: 1rem; color: var(--deep-teal); }
.card h2 small { font-weight: 400; color: var(--muted); font-size: 0.8rem; margin-left: 6px; }

.slot { padding: 8px 0; border-top: 1px solid var(--paper-soft); }
.slot:first-of-type { border-top: 0; padding-top: 0; }
.slot-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.slot-label.live { color: #fff; background: var(--danger); padding: 1px 7px; border-radius: 99px; }
.slot-title { font-weight: 700; }
.slot-meta { font-size: 0.85rem; color: var(--muted); }
.slot.quiet .slot-title { font-weight: 500; color: var(--muted); }

.session {
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-areas: "when sponsor star" "what what what";
  gap: 4px 10px;
  align-items: center;
}
.session .when { grid-area: when; }
.session .what { grid-area: what; }
.session img.sponsor { grid-area: sponsor; }
.star {
  grid-area: star;
  width: 44px;
  height: 44px;
  margin: -6px -8px -6px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.star[aria-pressed="true"] { color: var(--warning); }
.star:focus-visible { outline: 3px solid var(--teal); border-radius: 8px; }
.conflict {
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--danger);
}
.conflict::before { content: "⚠ "; }

/* A starred session's room or time changed (js/app/changes.js). */
.changes:empty { display: none; }
.changes { padding: 12px 16px 0; max-width: 760px; margin: 0 auto; }
.change-notice { font-size: 0.9rem; }
.change-notice .change-title { font-weight: 700; }
.change-notice .chip { margin-top: 8px; }
.changed {
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--danger);
}
.changed::before { content: "⚠ Changed. "; }
.day-heading { margin: 18px 0 8px; font-size: 0.95rem; color: var(--deep-teal); }
/* Larger-text mode keeps the three tab labels on one line at phone width. */
html[data-text="large"] .tabs button { font-size: 0.75rem; }
.tabs .count:not(:empty) {
  display: inline-block;
  min-width: 1.4em;
  padding: 0 5px;
  margin-left: 2px;
  border-radius: 99px;
  background: var(--teal);
  color: var(--navy);
  font-size: 0.75rem;
}
.actions, .share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.share { margin-top: 16px; }
.chip.primary { background: var(--deep-teal); border-color: var(--deep-teal); color: #fff; }
.share-url { flex: 1 1 100%; padding: 10px 12px; border: 1px solid var(--paper-line); border-radius: 8px; font: inherit; font-size: 0.85rem; }
.share-status { font-size: 0.85rem; color: var(--muted); }
[hidden] { display: none !important; }
.session .when { font-size: 0.85rem; font-weight: 700; color: var(--deep-teal); }
.session .what .t { font-weight: 700; }
.session .what .sub { font-style: italic; }
.session .what .meta { font-size: 0.85rem; color: var(--muted); }
.session .what .more-by-speaker {
  display: block;
  padding: 3px 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--deep-teal);
}
.session .what .meta .ce { font-weight: 600; color: var(--ink, inherit); }
.session.quiet .what .t { font-weight: 500; color: var(--muted); }
.session img.sponsor { height: 28px; max-width: 72px; object-fit: contain; }

/* Filters */
.filters { display: grid; gap: 8px; margin: 0 0 12px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.chip {
  flex: none;
  padding: 7px 12px;
  border: 1px solid var(--paper-line);
  border-radius: 99px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--deep-teal); border-color: var(--deep-teal); color: #fff; }
.filters input, .filters select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
.result-count { font-size: 0.8rem; color: var(--muted); margin: 0 0 8px; }
