/* Welcome dialog ("Vitajte") and the wish form ("Čo vám chýba?"), also as the plain page /napady. Tokens from base.css.
   The dialog is a sheet of paper laid on the desk (the sheet shadow); a small "VITAJTE" stamp is its one bold touch and
   it presses only when the dialog opens by itself or after sending. Under 600 px it is a bottom sheet. */

.vt { width: min(640px, calc(100vw - 32px)); max-width: none; max-height: min(780px, calc(100dvh - 32px));
  margin: auto; padding: var(--s-6); border: 0; border-radius: var(--r-sheet); overflow: auto; overscroll-behavior: contain;
  background: var(--sheet); color: var(--ink); box-shadow: var(--sheet-shadow), 0 24px 64px -24px rgba(24, 34, 44, .45); }
.vt::backdrop { background: rgba(18, 23, 28, .42); }
.vt[open] { animation: vt-in .22s ease-out both; }
.vt[open]::backdrop { animation: vt-fade .22s ease-out both; }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes vt-fade { from { opacity: 0; } to { opacity: 1; } }
html:has(.vt[open]) { overflow: hidden; }

.vt-x { position: absolute; top: var(--s-3); right: var(--s-3); }
.vt h2 { font-size: var(--f-26); line-height: 32px; letter-spacing: -0.015em; margin: 0 0 var(--s-3); padding-right: 40px; }
.vt h2:focus, .np-card h1:focus { outline: none; box-shadow: none; }
.vt-kicker { margin: 0 0 var(--s-1); font-size: var(--f-13); line-height: 18px; font-weight: 550; color: var(--ink-2); }
.vt-sub { margin: 0 0 var(--s-4); color: var(--ink-2); }

/* the stamp: smaller than on an approved invoice, top right, beside the close button */
.vt-stamp { top: 44px; right: 72px; bottom: auto; padding: 6px 12px 4px; border-width: 2.5px; border-radius: 8px; opacity: .9; }
.vt-stamp b { font-size: var(--f-15); letter-spacing: .16em; }
.vt[data-step="2"] .vt-stamp { display: none; }
/* after sending, the stamp lands beside the button, like a real one next to the signature */
.vt[data-step="3"] .vt-stamp { top: auto; right: var(--s-6); bottom: var(--s-6); }

/* step 1: three entries on a ledger, numbered like the steps on the home page */
.vt-points { list-style: none; margin: var(--s-4) 0 var(--s-3); padding: 0; border-top: 2px solid var(--ink); counter-reset: vt; }
.vt-points li { position: relative; display: grid; gap: 2px; padding: var(--s-3) 0 var(--s-3) 40px;
  border-bottom: 1px solid var(--rule); counter-increment: vt; }
.vt-points li::before { content: counter(vt); position: absolute; left: 0; top: var(--s-3); display: grid; place-items: center;
  width: 26px; height: 26px; border: 2px solid var(--stamp); border-radius: 50%; color: var(--stamp);
  font-weight: 700; font-size: var(--f-13); line-height: 1; }
.vt-points b { font-weight: 600; font-size: var(--f-15); line-height: 22px; }
.vt-points span { color: var(--ink-2); font-size: var(--f-15); line-height: 22px; }
.vt-demo { margin: 0 0 var(--s-5); font-size: var(--f-15); }
.vt-demo a { font-weight: 550; }

.vt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.vt-later { margin-left: auto; min-height: 40px; padding: 0 var(--s-2); border: 0; border-radius: var(--r-ctl); background: none;
  color: var(--ink-2); font: 500 var(--f-15)/1 "Onest", system-ui, sans-serif; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; }
.vt-later:hover { color: var(--ink); }

/* ── the wish form (dialog step 2 and /napady) ─────────────────────── */
.np-form em { font-style: normal; font-weight: 400; color: var(--ink-2); margin-left: 4px; }
.np-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.np-group legend { padding: 0; margin-bottom: var(--s-2); font-size: var(--f-13); line-height: 18px; font-weight: 500; color: var(--ink-2); }
.np-group legend em { margin-left: 2px; }
.np-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.np-chip { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px;
  border: 1px solid var(--control); border-radius: 999px; background: var(--sheet); cursor: pointer;
  font-size: var(--f-15); line-height: 20px; }
.np-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.np-chip:hover { border-color: var(--ink-2); }
/* chosen: stamp ink plus a tick, so it never rests on colour alone */
.np-chip:has(input:checked) { border-color: var(--stamp); background: var(--stamp-wash); color: var(--stamp); font-weight: 550; }
.np-chip:has(input:checked)::before { content: ""; width: 9px; height: 5px; margin: -3px 0 0 -2px; border: solid currentColor;
  border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.np-chip:has(input:focus-visible) { box-shadow: var(--focus); }
.np-bad .np-chip { border-color: color-mix(in srgb, var(--bad) 55%, var(--rule)); }
.np-bad legend { color: var(--bad); }

.np-text { margin-top: var(--s-4); }
.np-text textarea { width: 100%; resize: vertical; }
textarea[aria-invalid="true"] { border-color: var(--bad); }
.np-roles { margin-top: var(--s-4); }
.np-chip-role { min-height: 36px; padding: 4px 14px; }
.np-mail { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--rule); }
.np-mail .field { max-width: 360px; }
.np-check { display: flex; align-items: flex-start; gap: var(--s-3); margin-top: var(--s-3); max-width: 64ch;
  font-size: var(--f-13); line-height: 20px; cursor: pointer; }
.np-check input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--stamp); }

.np-send { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-5); }
.np-live { flex-basis: 100%; margin: 0; font-size: var(--f-13); color: var(--ink-2); }
.np-live:empty { display: none; }
.np-note { margin: var(--s-4) 0 0; font-size: var(--f-13); line-height: 20px; color: var(--ink-2); }
.np-note a { color: var(--ink-2); }

/* honeypot: off-screen, out of the tab order and hidden from assistive tech */
.np-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* thanks (dialog step 3 and /napady/dakujeme) */
.vt-done p { color: var(--ink-2); }
.vt-done .np-more { margin: var(--s-4) 0 var(--s-5); padding: var(--s-3) var(--s-4); border-left: 3px solid var(--stamp);
  background: var(--paper); color: var(--ink); }
.vt-done .np-more a { font-weight: 550; }

/* ── the plain page /napady ────────────────────────────────────────── */
.np-page { max-width: 768px; padding-top: var(--s-7); padding-bottom: var(--s-8); }
.np-card h1 { font-size: var(--f-33); line-height: 40px; letter-spacing: -0.015em; margin-bottom: var(--s-3); }
.np-card .vt-sub { font-size: var(--f-17); line-height: 28px; }
.np-errors { margin: 0 0 var(--s-5); padding: var(--s-4); border-radius: var(--r-ctl); background: var(--bad-wash); }
.np-errors h2 { font-size: var(--f-17); color: var(--bad); }
.np-errors ul { margin: var(--s-2) 0 0; padding-left: var(--s-5); }
.np-ok { width: 40px; height: 40px; margin-bottom: var(--s-3); padding: 8px; border-radius: 50%; background: var(--ok-wash); color: var(--ok); }

/* ── phone: a bottom sheet ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .vt { width: 100%; max-height: 92dvh; margin: auto 0 0; padding: var(--s-5) var(--s-4) calc(var(--s-4) + env(safe-area-inset-bottom));
    border-radius: 12px 12px 0 0; }
  .vt[open] { animation-name: vt-up; }
  @keyframes vt-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
  .vt h2 { font-size: var(--f-21); line-height: 28px; }
  .vt-x { top: var(--s-2); right: var(--s-2); }
  .vt-stamp { top: 22px; right: 56px; }
  .vt[data-step="3"] .vt-stamp { right: var(--s-5); bottom: calc(var(--s-5) + env(safe-area-inset-bottom)); }
  .vt-done .vt-actions .btn { flex: none; }
  .vt-points li { padding-left: 36px; }
  .vt-actions .btn { flex: 1 1 auto; }
  .vt-later { margin: 0 auto; }
  .np-chip { font-size: var(--f-13); min-height: 40px; padding: 6px 12px; }
  .np-send .btn { flex: 1 1 auto; }
  .np-page { padding-top: var(--s-5); }
  .np-card h1 { font-size: var(--f-26); line-height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .vt[open], .vt[open]::backdrop { animation: none; }
}

/* ── touch ─────────────────────────────────────────────────────────── */
@media (pointer: coarse) {
  .vt-later { min-height: 44px; }
  .np-chip, .np-chip-role { min-height: 44px; }
  .np-check { min-height: 44px; align-items: center; font-size: var(--f-15); }
  .np-check input { width: 22px; height: 22px; margin: 0; }
}
/* tablets in landscape are short: the dialog keeps a margin and scrolls inside, the stamp does not cover the title */
@media (min-width: 601px) and (max-height: 860px) {
  .vt { padding: var(--s-5) var(--s-6); max-height: calc(100dvh - 24px); }
  .vt-points { margin-top: var(--s-3); }
  .vt-points li { padding-top: var(--s-2); padding-bottom: var(--s-2); }
  .vt-points li::before { top: var(--s-2); }
}
