/* sheets.css — Modal sheets and their entrance animation.
   Split from app.module.css; load order in app.html preserves the original cascade. */

/* ---------- modal sheets ---------- */
.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%);
  }
}

.panel h2 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  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; }

.rowwrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  padding: 10px 16px;
  border: 1.5px solid var(--line-2);
  border-radius: var(--r);
  font-weight: 700;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--lip);
  transition:
    transform 0.08s var(--ease),
    box-shadow 0.08s var(--ease);
}

.pill:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--lip);
}

.pill.on {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-ink);
  box-shadow: 0 3px 0 var(--brand);
}

select {
  width: 100%;
  margin: 4px 0 16px;
  padding: 13px 16px;
  border-radius: var(--r);
  font-size: 1rem;
  font-weight: 500;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--line-2);
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, currentcolor 50%),
    linear-gradient(135deg, currentcolor 50%, transparent 50%);
  background-position:
    calc(100% - 21px) calc(50% + 1px),
    calc(100% - 15px) calc(50% + 1px);
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

/* Primary button: brand face, shade lip, white label — the kit's Button Base. */
.big {
  display: block;
  width: 100%;
  text-decoration: none;
  padding: 14px 18px;
  border-radius: var(--r);
  background: var(--brand);
  color: var(--on-brand);
  text-align: center;
  line-height: 1.5;
  box-shadow: var(--drop) var(--brand-lip);
  transition:
    transform 0.08s var(--ease),
    box-shadow 0.08s var(--ease);
}

.big:active,
.big.is-pressed {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--brand-lip);
}

.big.danger {
  background: var(--amber);
  color: #4a3000;
  box-shadow: var(--drop) var(--amber-lip);
}

.big.danger:active {
  box-shadow: 0 0 0 var(--amber-lip);
}

.big.disabled {
  background: var(--line-1);
  color: var(--ink-3);
  box-shadow: none;
  cursor: default;
  transform: none;
}

/* Secondary button: white face, the brand's pale variant for stroke and lip. */
.ghost {
  display: block;
  width: 100%;
  padding: 12.5px 18px;
  margin-top: 12px;
  border: 1.5px solid var(--brand-soft);
  border-radius: var(--r);
  background: var(--paper);
  color: var(--brand-ink);
  text-align: center;
  line-height: 1.5;
  box-shadow: var(--drop) var(--brand-soft);
  transition:
    transform 0.08s var(--ease),
    box-shadow 0.08s var(--ease);
}

.ghost:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--brand-soft);
}

.hist {
  margin: 16px 0 0;
  font-size: 1rem;
  font-weight: 500;
}

.hist b.caps {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
  font-size: 1rem;
  font-weight: 700;
}

.hist div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1.5px solid var(--line-1);
  color: var(--ink-2);
}

.hist div:last-child {
  border-bottom: 0;
}

.hist div b {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
