/* The popup's styles; the rules and the script are in /app/client/sheet.js. */

/* The popup (/app/client/sheet.js): a sheet on a phone, a dialog from 720 px. */
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; background: rgba(20,17,14,.45); overscroll-behavior: contain; touch-action: none; animation: sheet-dim .2s ease-out }
.sheet.stacked { background: transparent; animation: none }
.sheet-in { position: relative; box-sizing: border-box; width: 100%; max-width: 520px; max-height: 90%; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch;
  display: grid; gap: 14px; align-content: start; padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: 20px 20px 0 0; background: var(--card); color: var(--ink); text-align: left;
  box-shadow: 0 -10px 30px rgba(20,17,14,.10); animation: sheet-up .2s ease-out }
.sheet-in:focus { outline: none }
.sheet-in > h3, .sheet-title { margin: 0; font: 700 17px/1.3 "Golos Text", -apple-system, "Helvetica Neue", Arial, sans-serif; color: var(--ink); text-align: left; overflow-wrap: anywhere }
.sheet-in > .hint, .sheet-in > p { margin: 0 }
.sheet-text { margin: 0; font-size: 15px; line-height: 1.45; white-space: pre-line }
/* The closing buttons stand a little apart from the choices above them. */
.sheet-acts { display: flex; gap: 8px; margin-top: 8px }
.sheet-acts > button, .sheet-in > button, .sheet-btn { flex: 1 1 0; min-width: 0; min-height: 48px; margin: 0; padding: 0 16px; border: 1px solid transparent; border-radius: 12px;
  background: var(--brand); color: #fff; font: inherit; font-weight: 600; line-height: 1.25; text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent }
.sheet-acts > button.quiet, .sheet-in > button.quiet, .sheet-btn.quiet { background: transparent; color: var(--ink); border-color: color-mix(in srgb, var(--ink) 18%, transparent); font-weight: 500 }
.sheet-acts > button.danger, .sheet-in > button.danger, .sheet-btn.danger { background: #B4413C; color: #fff; border-color: transparent }
.sheet-in > button.quiet.danger { background: transparent; color: #B4413C; border-color: color-mix(in srgb, #B4413C 40%, transparent) }
.sheet-acts > button:disabled, .sheet-in > button:disabled { opacity: .55; cursor: default }
.sheet-acts > button:focus-visible, .sheet-in > button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px }
/* The line that says how it went, inside the popup. */
.sheet-msg { margin: 0; font-size: 14.5px; line-height: 1.4; color: var(--dim) }
.sheet-msg.ok { color: #1C7F46; font-weight: 600 }
.sheet-msg.bad { color: #B4413C }
.sheet-msg:empty, .sheet-msg[hidden] { display: none }
.sheet-big { margin: 0; font: 700 28px/1.2 "Golos Text", sans-serif; letter-spacing: .06em; font-variant-numeric: tabular-nums; text-align: center }
@keyframes sheet-up { from { transform: translateY(100%) } }
@keyframes sheet-pop { from { transform: scale(.96); opacity: 0 } }
@keyframes sheet-dim { from { background: rgba(20,17,14,0) } }
@media (min-width: 720px) {
  .sheet { align-items: center; padding: 24px }
  .sheet-in { max-height: 90%; padding-bottom: 16px; border-radius: 20px; box-shadow: 0 24px 60px rgba(20,17,14,.22); animation-name: sheet-pop }
}
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-in { animation: none } }
/* One toast at a time, over every popup. */
.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); box-sizing: border-box; width: max-content; max-width: min(480px, calc(100% - 32px));
  padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--card); font-size: 14.5px; line-height: 1.4; box-shadow: 0 10px 30px rgba(0,0,0,.22); pointer-events: none }
.toast.bad { background: #B4413C; color: #fff }
