/* Gentle reminders: their screen (two switches, then the hours and how
   often), and the question under the first practice round's result. The
   screen has the settings screen's frame and head (settings.css), and the
   switches are the site's own (.memory-switch in memory.css). */

/* The screen stands in for the app while it is open. With the tabs gone,
   the settings menu keeps its end of the bar. */
body[data-reminders] .layout,
body[data-reminders] .view-tabs {
  display: none;
}

body[data-reminders] .topbar {
  justify-content: flex-end;
}

.reminders-screen {
  gap: 16px;
}

.reminders-intro {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* A card of rows, a quiet line between them. */
.reminders-card {
  display: grid;
  border: 1px solid var(--border);
  border-radius: 13px 10px 12px 9px;
  background: var(--surface-soft);
}

.reminders-card > :not([hidden]) ~ * {
  border-top: 1px dashed var(--border);
}

.reminder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  min-height: 58px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 650;
}

.reminder-row[hidden],
.reminders-card[hidden],
.reminder-ask[hidden],
.reminder-ask-actions[hidden],
.reminder-ask-answer[hidden],
.reminders-note[hidden] {
  display: none;
}

/* While the browser turns notifications on: on already, but quieter. */
.memory-switch[aria-busy="true"] {
  opacity: 0.6;
  cursor: progress;
}

/* A switch's name, with its icon. */
.reminder-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.reminder-name svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
}

/* When and how often: the name above, then tiles of one width in a row
   (the hours two by two on a phone). */
.reminder-choice {
  display: grid;
  align-items: stretch;
  justify-content: stretch;
  gap: 10px;
  padding-block: 12px 14px;
}

.reminder-pills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

#remind-often {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* An hour's tile: its name, and the hours under it, smaller. */
.reminder-pill {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  min-height: 44px;
  padding: 9px 8px 8px;
  border: 1.5px solid var(--border);
  border-radius: 13px 10px 12px 9px;
  background: var(--surface-raised);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}

/* The icon of that part of the day, above its name. */
.reminder-pill-top {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.reminder-pill-top svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.75;
}

.reminder-pill-hours {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.8;
}

.reminder-pill:hover {
  border-color: var(--brand);
}

.reminder-pill[aria-pressed="true"],
.reminder-pill[aria-checked="true"] {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.reminder-pill:focus-visible,
.reminder-ask button:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}

/* Why notifications cannot be on here, or that no hour is picked: a line
   in the card, under the row it is about. */
.reminders-note {
  margin: 0;
  padding: 10px 14px;
  background: var(--title-wash);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* For the admin only: a reminder now. Small and quiet, at the bottom. */
.reminder-test {
  display: grid;
  justify-items: start;
  gap: 6px;
  padding-top: 4px;
}

.reminder-test[hidden],
.reminder-test-note[hidden] {
  display: none;
}

.reminder-test-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1.5px dashed var(--border);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
}

.reminder-test-button:hover {
  border-color: var(--brand);
  color: var(--text);
}

.reminder-test-button:disabled {
  cursor: progress;
  opacity: 0.6;
}

.reminder-test-button svg {
  width: 16px;
  height: 16px;
}

.reminder-test-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* The question after the first practice round, under its result. */
.reminder-ask {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 460px;
  margin: 14px auto 0;
  padding: 12px 14px;
  border: 1.5px dashed var(--border);
  border-radius: 14px 11px 13px 10px;
  background: var(--title-wash);
  text-align: center;
}

.reminder-ask-title,
.reminder-ask-answer {
  margin: 0;
  font-weight: 650;
  line-height: 1.5;
  text-wrap: balance;
}

.reminder-ask-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.reminder-ask-yes,
.reminder-ask-no {
  padding: 7px 16px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.reminder-ask-yes {
  border: 0;
  background: var(--accent);
  color: #fff;
}

.reminder-ask-yes:hover {
  filter: brightness(1.08);
}

.reminder-ask-no {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--muted);
}

/* On a phone the hours go two by two. */
@media (max-width: 620px) {
  #remind-windows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
