/* ============================================================================
   waitlist.css — modal „Ročník 2026 je za námi" + waitlist formulář.

   Používá se na: index.html (modal), rocnik-2026.html, prihlaska.html.
   Staví jen na tokenech ze styles.css, takže funguje ve street i light režimu.
   Feature je dočasná — až se otevře ročník 2027, stačí smazat tenhle soubor,
   waitlist.js a odkazy na ně.
   ========================================================================== */

/* ---------------------------- MODAL ---------------------------- */

.recap-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 2, 14, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.recap-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Zavřený modal musí zmizet i pro čtečky obrazovky — proto [hidden],
   které by jinak `display: grid` výše přebilo. */
.recap-overlay[hidden] {
  display: none;
}

[data-theme="light"] .recap-overlay {
  background: rgba(20, 10, 5, 0.62);
}

.recap-card {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 44px 38px 34px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.recap-overlay.open .recap-card {
  transform: none;
}

/* Zelený nádech shora, ať karta nevypadá jako plochý box */
.recap-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 180px;
  border-radius: 24px 24px 0 0;
  background: radial-gradient(120% 100% at 50% 0%, rgba(127, 224, 59, 0.14), transparent 70%);
  pointer-events: none;
}

.recap-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.recap-close:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(127, 224, 59, 0.08);
}

.recap-eyebrow {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 12px;
  border: 1px solid rgba(127, 224, 59, 0.3);
  border-radius: 999px;
  background: rgba(127, 224, 59, 0.08);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.recap-card h2 {
  position: relative;
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 38px);
  line-height: 1.05;
  color: var(--text);
  text-transform: uppercase;
}

.recap-card h2 .accent {
  color: var(--accent);
}

.recap-lead {
  position: relative;
  margin: 0 0 26px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
}

.recap-actions {
  position: relative;
  margin-bottom: 26px;
}

.recap-actions .btn {
  width: 100%;
  justify-content: center;
}

.recap-fine {
  position: relative;
  margin: 14px 0 0;
  color: var(--gray-dim);
  font-size: 11.5px;
  line-height: 1.5;
}

.recap-fine a {
  color: var(--text-dim);
  text-decoration: underline;
}

.recap-fine a:hover {
  color: var(--accent);
}

/* Modal je otevřený → zamknout scroll stránky pod ním */
body.recap-locked {
  overflow: hidden;
}

/* ------------------------ WAITLIST FORMULÁŘ ------------------------ */

/* Panel, který z pole na e-mail dělá viditelně „waitlist", ne náhodný input.
   Kroužek v rohu je narážka na trojkovou čáru. */
.wl-panel {
  position: relative;
  overflow: hidden;
  padding: 26px 24px 24px;
  border: 1px solid rgba(127, 224, 59, 0.28);
  border-radius: 18px;
  background:
    radial-gradient(130% 150% at 100% 0%, rgba(127, 224, 59, 0.12), transparent 62%),
    rgba(127, 224, 59, 0.045);
}

.wl-panel::before {
  content: "";
  position: absolute;
  top: -68px;
  right: -78px;
  width: 210px;
  height: 210px;
  border: 2px solid rgba(127, 224, 59, 0.18);
  border-bottom-color: transparent;
  border-radius: 50%;
  pointer-events: none;
}

.wl-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Blikající tečka — signál „tohle je živý seznam, zapisuje se do něj" */
.wl-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(127, 224, 59, 0.16);
  animation: wl-pulse 2.2s ease-in-out infinite;
}

@keyframes wl-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

.wl-panel-lead {
  position: relative;
  margin: 0 0 18px;
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.6;
}

.wl-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wl-label {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.wl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wl-form input[type="email"] {
  flex: 1 1 200px;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wl-form input[type="email"]::placeholder {
  color: var(--gray-dim);
}

.wl-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(127, 224, 59, 0.16);
}

.wl-form input[type="email"]:disabled {
  opacity: 0.6;
}

.wl-form button {
  flex: 0 0 auto;
  height: 52px;
  padding: 0 24px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.wl-form button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(127, 224, 59, 0.28);
}

.wl-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

.wl-msg {
  flex: 1 0 100%;
  margin: 2px 0 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
}

.wl-msg.is-error {
  color: #ff8080;
}

[data-theme="light"] .wl-msg.is-error {
  color: #c62828;
}

.wl-done {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(127, 224, 59, 0.35);
  border-radius: 14px;
  background: rgba(127, 224, 59, 0.08);
}

.wl-done-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.wl-done b {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.wl-done span {
  display: block;
  margin-top: 2px;
  color: var(--text-dim);
  font-size: 13px;
}

/* ------------- UZAVŘENÉ PŘIHLÁŠKY (prihlaska.html) ------------- */

/* Přepínač je `SU_REGISTRATIONS_OPEN` v hlavičce prihlaska.html.
   Je-li false, dostane <html> třídu `regs-closed` ještě před vykreslením —
   formulář se tedy ani na okamžik neukáže. */

[data-regs-closed] {
  display: none;
}

.regs-closed [data-regs-closed] {
  display: block;
}

.regs-closed .form-hero,
.regs-closed .form-wrap {
  display: none;
}

.closed-wrap {
  padding: 150px 20px 90px;
}

.closed-card {
  max-width: 620px;
  margin: 0 auto;
  padding: 46px 40px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  text-align: center;
}

.closed-card h1 {
  margin: 16px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--text);
}

.closed-card > p {
  margin: 0 0 26px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.65;
}

.closed-card .btn {
  width: 100%;
  justify-content: center;
  margin-bottom: 26px;
}

/* Karty jsou vycentrované, ale text uvnitř waitlist panelu čte se líp zleva. */
.closed-card .wl-panel,
.recap-signup .wl-panel {
  text-align: left;
}

@media (max-width: 480px) {
  .recap-card {
    padding: 38px 22px 26px;
  }

  .closed-wrap {
    padding: 120px 16px 60px;
  }

  .closed-card {
    padding: 34px 22px;
  }

  .wl-panel {
    padding: 22px 18px 20px;
  }

  .wl-form input[type="email"],
  .wl-form button {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .recap-overlay,
  .recap-card,
  .wl-form button {
    transition: none;
  }

  .recap-card {
    transform: none;
  }

  .wl-tag::before {
    animation: none;
  }
}
