/* sheets.css — Modal sheets: the backdrop, the panel and its entrance, the one
   dialog title, and the confirm actions. Calendar, streak and review share
   .sheet-hero / .sheet-box / .sheet-month-head / .sheet-step here, plus one
   .is-unlit rule for grey icons. */

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgb(17 25 39 / 50%);
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.panel {
  position: relative;
  width: 100%;
  max-width: 540px;
  background: var(--paper);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 24px 16px calc(16px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
  max-height: 82dvh;
  overflow-y: auto;
  animation: sheetup 0.28s var(--ease);
}

.panel::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 40px;
  height: 5px;
  border-radius: 999px;
  background: var(--line-2);
  transform: translateX(-50%);
}

@keyframes sheetup {
  from {
    transform: translateY(18%);
  }
}

/* One dialog title for every sheet: 21px, the same weight and tracking as the
   page titles behind them. Sheets that lead with a number use the headline
   tier instead (settings.css). */
.panel h2 {
  font-size: 21px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.3px;
  margin: 0 0 4px;
}

.panel .phead {
  color: var(--ink-2);
  font-weight: 600;
  margin: 0 0 16px;
  font-size: 1rem;
}

/* The safe choice is the primary one and takes focus, so a stray Return or a
   reflexive tap never destroys work. */
.confirm-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.confirm-actions .big {
  margin: 0;
}

/* Shared inner chrome for the calendar, streak and review sheets. */
.sheet-hero {
  flex: none;
  width: 52px;
  height: 52px;
}
.sheet-box {
  padding: 8px 8px 10px;
  border: 1.5px solid var(--line-2);
  border-radius: 16px;
}
.sheet-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 4px;
}
.sheet-month {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}
.sheet-step {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
}
.sheet-step:hover:not(:disabled) {
  background: var(--panel);
}
.sheet-step:disabled {
  opacity: 0.3;
}
.sheet-step svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* The test-date calendar keeps its slightly smaller arrows. */
#calPrev svg,
#calNext svg {
  width: 20px;
  height: 20px;
}

/* Grey icons on the sheets, header buttons and the feed streak chip. */
.is-unlit {
  filter: grayscale(1);
  opacity: 0.45;
}
