/* assets/css/sheets.css — overlays shared by every page.
   Unlock sheet (the paywall), early-access modal, restore form, toast.
   Mobile: slides up as a bottom sheet. Desktop: centered dialog. */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.sheet.is-open {
  display: flex;
}
.sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(1, 8, 14, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}
.sheet-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  border: 1px solid var(--hairline-strong);
  border-bottom: 0;
  background: linear-gradient(180deg, #0b2f49, var(--plate) 40%, #041a2b);
  box-shadow: 0 -30px 80px rgba(0, 0, 0, 0.6);
  animation: sheet-up 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes sheet-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (min-width: 720px) {
  .sheet {
    align-items: center;
    padding: 16px;
  }
  .sheet-dialog {
    width: min(500px, 100%);
    padding: 28px 28px 26px;
    border-radius: 22px;
    border-bottom: 1px solid var(--hairline-strong);
    animation-name: sheet-pop;
  }
  @keyframes sheet-pop {
    from {
      opacity: 0;
      transform: translateY(14px) scale(0.98);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
.sheet-grip {
  width: 44px;
  height: 4px;
  margin: -6px auto 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
}
@media (min-width: 720px) {
  .sheet-grip {
    display: none;
  }
}
.sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.sheet-close:hover {
  background: rgba(255, 255, 255, 0.14);
}
.sheet-kicker {
  margin-bottom: 6px;
  color: var(--red-soft);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.sheet-dialog h2 {
  font-size: 1.45rem;
  margin-bottom: 6px;
  padding-right: 40px;
}
.sheet-sub {
  color: var(--mist);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

/* Context strip: poster thumb + "Continue with EP 11 of …" */
.unlock-context {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(1, 15, 28, 0.55);
  border: 1px solid var(--hairline);
}
.unlock-context img {
  width: 44px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 6px;
}
.unlock-context strong {
  display: block;
  font-size: 0.92rem;
}
.unlock-context span {
  color: var(--steel);
  font-size: 0.78rem;
}

/* The two plans, rendered as tappable cards. */
.plan-list {
  display: grid;
  gap: 10px;
}
.plan {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  border-radius: 16px;
  border: 1px solid var(--hairline-strong);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.plan:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}
.plan:disabled {
  opacity: 0.6;
  cursor: wait;
}
.plan-best {
  border-color: rgba(237, 27, 36, 0.75);
  background: linear-gradient(135deg, rgba(237, 27, 36, 0.22), rgba(237, 27, 36, 0.06) 60%);
  box-shadow: 0 10px 30px rgba(237, 27, 36, 0.2);
}
.plan-badge {
  position: absolute;
  top: -10px;
  left: 14px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--red);
  color: var(--chalk);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.plan-name {
  font-size: 1rem;
  font-weight: 900;
}
.plan-desc {
  grid-column: 1;
  color: var(--mist);
  font-size: 0.8rem;
}
.plan-price {
  grid-row: 1 / span 2;
  grid-column: 2;
  text-align: right;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.plan-price small {
  display: block;
  color: var(--steel);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 14px;
  color: var(--steel);
  font-size: 0.74rem;
  font-weight: 600;
}
.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.trust-row svg {
  width: 13px;
  height: 13px;
}
.sheet-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(237, 27, 36, 0.45);
  background: rgba(237, 27, 36, 0.12);
  color: #ffd7d9;
  font-size: 0.84rem;
  font-weight: 600;
}
.sheet-note a {
  text-decoration: underline;
}
.restore-toggle {
  display: block;
  margin: 16px auto 0;
  background: none;
  border: 0;
  color: var(--steel);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.restore-toggle:hover {
  color: var(--chalk);
}
.restore-form {
  margin-top: 12px;
}
.restore-form .form-row button {
  min-height: 46px;
}

/* Early-access modal reuses the sheet shell with a lighter header. */
.waitlist-dialog h2 {
  font-size: 1.5rem;
}

/* Toast: brief confirmation after a claim / restore. */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 120;
  transform: translate(-50%, 20px);
  opacity: 0;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(61, 214, 140, 0.5);
  background: rgba(1, 15, 28, 0.92);
  color: var(--chalk);
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
