/* astacida.com "Rakov šatník" (shared/satnik.js): the wardrobe dialog, the "Rak niečo našiel" card on the results
   screen and the [data-satnik] buttons (landing page, under each subject's map). Tokens --sat-* : light in :root,
   dark twice (media query + data-theme), like the rest of the site. */
:root {
  --sat-ink: var(--a-ink, #18264A); --sat-muted: var(--a-muted, #5E6C8C); --sat-surface: var(--a-surface, #fff);
  --sat-line: var(--a-line, #DCE3F0); --sat-bg: var(--a-bg, #F4F7FC); --sat-brand: var(--a-brand, #2F5BEA);
  --sat-gold: #F2A60C; --sat-gold-soft: #FFF3D1; --sat-on: #16A063; --sat-on-soft: #DDF5EA; --sat-on-ink: #0B7045;
  --sat-hook: #9AA6C4; --sat-wait: #EEF2F9; --sat-new: #C8323A; --sat-new-ink: #fff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sat-gold: #FFC23D; --sat-gold-soft: #3A3218; --sat-on: #3BD08A; --sat-on-soft: #143A2B; --sat-on-ink: #3BD08A;
    --sat-hook: #6B779C; --sat-wait: #1C274F; --sat-new: #FF6B6F; --sat-new-ink: #0d1430;
  }
}
:root[data-theme="dark"] {
  --sat-gold: #FFC23D; --sat-gold-soft: #3A3218; --sat-on: #3BD08A; --sat-on-soft: #143A2B; --sat-on-ink: #3BD08A;
  --sat-hook: #6B779C; --sat-wait: #1C274F; --sat-new: #FF6B6F; --sat-new-ink: #0d1430;
}

.sat-thing { display: block; overflow: visible; }

/* ---------- the opener buttons ([data-satnik]) ---------- */
.sat-open { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.sat-open .sat-ic { width: 26px; height: 22px; flex: none; color: var(--sat-gold); }
.sat-dot {
  display: inline-block; font: 800 12px/1 var(--a-body, "Nunito", system-ui, sans-serif); letter-spacing: .02em;
  background: var(--sat-new); color: var(--sat-new-ink); border-radius: 999px; padding: 4px 8px 3px; margin-left: 2px;
  animation: sat-dot 1.6s ease-in-out 3;
}
@keyframes sat-dot { 50% { transform: scale(1.1); } }

/* ---------- the dialog ---------- */
.sat-open-lock { overflow: hidden; }
.sat-dlg {
  width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 26px;
  background: var(--sat-surface); color: var(--sat-ink); box-shadow: 0 24px 60px -18px rgba(10, 20, 50, .55);
  font-family: var(--a-body, "Nunito", system-ui, sans-serif); overflow: auto; overscroll-behavior: contain;
}
.sat-dlg[open] { animation: sat-in .35s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes sat-in { from { transform: translateY(18px) scale(.96); opacity: 0; } }
.sat-dlg::backdrop { background: rgba(12, 20, 48, .55); backdrop-filter: blur(2px); }
.sat-in { position: relative; padding: 22px 20px 20px; display: flex; flex-direction: column; gap: 18px; }
.sat-x {
  position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 14px; border: 2px solid var(--sat-line);
  background: var(--sat-surface); color: var(--sat-muted); display: grid; place-items: center; cursor: pointer;
}
.sat-x svg { width: 18px; height: 18px; }
.sat-top { display: flex; align-items: center; gap: 16px; padding-right: 44px; }
.sat-rak {
  width: 116px; height: 116px; flex: none; border-radius: 50%; display: grid; place-items: center; padding: 12px 10px 4px;
  background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--sat-brand) 14%, var(--sat-surface)) 0 62%, transparent 63%);
}
.sat-rak .rak { width: 100%; }
.sat-dlg h2 { margin: 0 0 4px; font: 800 28px/1.1 var(--a-display, "Baloo 2", system-ui, sans-serif); }
.sat-intro { margin: 0; color: var(--sat-muted); font-size: 15.5px; line-height: 1.45; text-wrap: pretty; }
.sat-sub h3 { margin: 0 0 8px; font: 800 13px/1 var(--a-body, "Nunito", system-ui, sans-serif); text-transform: uppercase; letter-spacing: .1em; color: var(--sat-muted); }
.sat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.sat-grid li { display: flex; }
.sat-item {
  position: relative; width: 100%; min-height: 150px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 10px 12px; border-radius: 18px; border: 2px solid var(--sat-line); background: var(--sat-surface); color: inherit;
  font: inherit; text-align: center; -webkit-tap-highlight-color: transparent;
}
button.sat-item { cursor: pointer; box-shadow: 0 4px 0 var(--sat-line); transition: transform .08s, box-shadow .08s, border-color .15s; }
button.sat-item:hover { border-color: color-mix(in srgb, var(--sat-gold) 60%, var(--sat-line)); }
button.sat-item:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sat-line); }
.sat-item:focus-visible, .sat-x:focus-visible, .sat-done:focus-visible, .sat-found-b:focus-visible { outline: 3px solid var(--a-sun, #FFD45E); outline-offset: 2px; }
.sat-item.is-on { border-color: var(--sat-on); background: var(--sat-on-soft); box-shadow: 0 4px 0 color-mix(in srgb, var(--sat-on) 55%, transparent); }
.sat-hook { width: 46px; height: 20px; color: var(--sat-hook); flex: none; }
.sat-item .sat-thing { width: 76px; height: 56px; margin-top: -9px; }
.sat-name { font-weight: 800; font-size: 15px; line-height: 1.2; }
.sat-state { margin-top: auto; font-size: 13px; font-weight: 800; color: var(--sat-muted); }
.sat-item.is-on .sat-state { color: var(--sat-on-ink); }
.sat-item.is-on .sat-state::before { content: "✓ "; }
.sat-off { font-size: 12px; font-weight: 700; color: var(--sat-muted); margin-top: -2px; }
.sat-item.is-on .sat-state { margin-top: auto; }
.sat-more { margin: 0; padding: 12px 14px; border-radius: 14px; border: 2px dashed var(--sat-line); background: var(--sat-wait); color: var(--sat-muted); font-weight: 700; font-size: 14.5px; }
.sat-sub .sat-grid + .sat-more { margin-top: 10px; }
.sat-new { position: absolute; top: 6px; left: 6px; font-size: 11px; font-weight: 800; background: var(--sat-new); color: var(--sat-new-ink); border-radius: 999px; padding: 3px 7px 2px; }
.sat-item.is-wait { min-height: 0; background: var(--sat-wait); border-style: dashed; }
.sat-item.is-wait .sat-name { font-size: 13px; color: var(--sat-muted); font-weight: 700; }
.sat-q {
  width: 44px; height: 40px; margin: 2px 0 4px; display: grid; place-items: center; border-radius: 16px;
  border: 2px dashed var(--sat-hook); color: var(--sat-hook); font: 800 24px/1 var(--a-display, "Baloo 2", system-ui, sans-serif);
}
.sat-where { font-size: 13.5px; font-weight: 800; line-height: 1.25; color: var(--sat-ink); text-wrap: balance; }
.sat-done {
  align-self: center; min-width: 200px; min-height: 52px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--sat-brand); color: var(--a-brand-ink, #fff); font: 800 20px/1 var(--a-display, "Baloo 2", system-ui, sans-serif);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--sat-brand) 60%, #000);
}
.sat-done:active { transform: translateY(3px); box-shadow: 0 2px 0 color-mix(in srgb, var(--sat-brand) 60%, #000); }
@media (max-width: 420px) {
  .sat-in { padding: 18px 14px 16px; }
  .sat-top { gap: 10px; }
  .sat-rak { width: 92px; height: 92px; }
  .sat-dlg h2 { font-size: 24px; }
  .sat-intro { font-size: 14.5px; }
  .sat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}

/* ---------- "Rak niečo našiel" on the results screen ---------- */
.sat-found {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; border-radius: 20px;
  background: linear-gradient(135deg, var(--sat-gold-soft), color-mix(in srgb, var(--sat-brand) 12%, var(--sat-surface)));
  border: 2px solid color-mix(in srgb, var(--sat-gold) 60%, var(--sat-line)); color: var(--sat-ink);
  animation: sat-card .7s cubic-bezier(.2, 1.3, .4, 1) .45s both;
}
@keyframes sat-card { 0% { transform: translateY(12px) scale(.94); opacity: 0; } 100% { transform: none; opacity: 1; } }
.sat-found-art { position: relative; width: 74px; height: 80px; flex: none; display: grid; place-items: end center; }
.sat-found-art .rak { width: 70px; }
.sat-found-art .sat-thing { width: 72px; height: 50px; }
.sat-found-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sat-found-k { font-size: 14px; font-weight: 800; color: var(--sat-muted); }
.sat-found-n { font: 800 22px/1.1 var(--a-display, "Baloo 2", system-ui, sans-serif); }
.sat-found-also { font-size: 14px; font-weight: 700; color: var(--sat-muted); margin-top: 2px; }
.sat-found-b {
  flex: none; min-height: 44px; padding: 8px 14px; border-radius: 14px; border: 2px solid color-mix(in srgb, var(--sat-gold) 70%, var(--sat-line));
  background: var(--sat-surface); color: var(--sat-ink); font: 800 16px/1 var(--a-display, "Baloo 2", system-ui, sans-serif); cursor: pointer;
}
@media (max-width: 340px) { .sat-found { flex-wrap: wrap; } .sat-found-b { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .sat-dot, .sat-dlg[open], .sat-found, .sat-found-art .sat-thing { animation: none; }
  button.sat-item { transition: none; }
}

/* Under each subject's map: "Vybrať si úlohy" and the wardrobe side by side, stacked on a narrow screen. */
.sat-row { display: flex; flex-wrap: wrap; gap: 10px; }
.sat-row > * { flex: 1 1 200px; width: auto; }

/* 1st grade: a waiting hanger shows the stop's example ("3 + 0"), as on its map; the title is for screen readers. */
.sat-where.sat-ex { font: 800 19px/1.1 var(--a-display, "Baloo 2", system-ui, sans-serif); letter-spacing: .02em; white-space: nowrap; }
.sat-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
