/* Conference push reminders — BRIEF §13.
 *
 * Four pieces, all shared by Home, Conference and Profile:
 *   .rem-next       the "Next up" strip
 *   .rem-attending  the "I'm attending" switch
 *   .rem-controls   reminder toggle + lead select + test button
 *   .rem-banner     the in-app fallback notification
 *
 * Colour comes only from app.css tokens, so every one of them is correct in
 * light and dark without a second set of rules.
 */

/* ------------------------------------------------------------ Next up strip */

.rem-next[hidden] { display: none !important; }

.rem-next {
  margin: 0 0 12px;
}

.rem-next-btn {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    'kicker title'
    'kicker meta';
  align-items: center;
  gap: 2px 14px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red, #e03939);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.rem-next-btn:hover { background: var(--surface-2, var(--surface)); }
.rem-next-btn:active { transform: scale(0.995); }
.rem-next-btn:focus-visible { outline: 2px solid var(--blue, #467bb8); outline-offset: 2px; }

.rem-next-kicker {
  grid-area: kicker;
  align-self: center;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--red, #e03939);
  writing-mode: horizontal-tb;
  max-width: 5.5em;
  line-height: 1.15;
}

.rem-next-title {
  grid-area: title;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.25;
}

.rem-next-meta {
  grid-area: meta;
  font-size: 0.82rem;
  color: var(--muted);
}

/* --------------------------------------------------------------- switches */

.rem-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  cursor: pointer;
}

.rem-switch-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rem-switch-label { font-weight: 600; font-size: 0.95rem; }
.rem-switch-desc { font-size: 0.8rem; color: var(--muted); }

.rem-switch-control { position: relative; flex: 0 0 auto; }

.rem-switch-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.rem-switch-track {
  display: block;
  width: 46px;
  height: 27px;
  border-radius: 999px;
  background: var(--line);
  transition: background 0.18s ease;
}

.rem-switch-thumb {
  display: block;
  width: 21px;
  height: 21px;
  margin: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.3);
  transition: transform 0.18s ease;
}

/* --blue, not --navy: navy stays #002060 in dark mode too, where a navy pill on
   a near-navy surface reads as "off". Blue is legible on both palettes. */
.rem-switch-input:checked ~ .rem-switch-track { background: var(--blue, #467bb8); }
.rem-switch-input:checked ~ .rem-switch-track .rem-switch-thumb { transform: translateX(19px); }
.rem-switch-input:focus-visible ~ .rem-switch-track { outline: 2px solid var(--blue, #467bb8); outline-offset: 2px; }
.rem-switch-input:disabled ~ .rem-switch-track { opacity: 0.55; }

@media (prefers-reduced-motion: reduce) {
  .rem-switch-track,
  .rem-switch-thumb,
  .rem-next-btn { transition: none; }
}

/* --------------------------------------------------------------- controls */

.rem-attending { border-bottom: 1px solid var(--line); }

.rem-controls { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }

.rem-controls.is-off .rem-row,
.rem-controls.is-off .rem-actions { opacity: 0.55; }

.rem-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}

.rem-row-label { font-size: 0.9rem; color: var(--muted); }

.rem-lead {
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.rem-actions { padding: 4px 0 2px; }
.rem-actions .rem-test { width: 100%; }

.rem-note { margin: 2px 0 0; font-size: 0.78rem; color: var(--muted); line-height: 1.4; }

.rem-debug {
  margin: 6px 0 0;
  padding: 6px 9px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--red, #e03939) 12%, transparent);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
}

@media (min-width: 560px) {
  .rem-actions .rem-test { width: auto; }
}

/* ------------------------------------------------------------- the banner */

.rem-host {
  position: fixed;
  top: calc(var(--banner-h, 0px) + 8px);
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  padding: 0 12px;
  pointer-events: none;
}

.rem-banner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(560px, 100%);
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.22);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.rem-banner.in { opacity: 1; transform: none; }
.rem-banner.rem-quiet { opacity: 0.98; }

.rem-banner-icon { display: inline-flex; flex: 0 0 auto; line-height: 1; color: var(--accent); }

.rem-banner-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.rem-banner-title { font-weight: 700; font-size: 0.9rem; }
.rem-banner-body { font-size: 0.82rem; color: var(--muted); }

.rem-banner-close {
  flex: 0 0 auto;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1;
  padding: 6px;
  border-radius: 8px;
  cursor: pointer;
}

.rem-banner-close:hover { color: var(--text); }

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

/* ------------------------------------------- hosts (conference / sheet) */

.conf-remind .conf-remind-head { margin-bottom: 2px; }

.conf-sheet-remind {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: color-mix(in srgb, var(--blue, #467bb8) 8%, transparent);
}

.conf-sheet-remind-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.conf-sheet-remind-title { font-weight: 700; font-size: 0.92rem; }
.conf-sheet-remind-body { font-size: 0.85rem; color: var(--muted); }

.home-nextup:empty { display: none; }
