/* Underground TV Join sheet (public/assets/checkout.js): Stripe's payment form inside ugtv.tv.
   Owner: public pages. Spec: docs/EMBEDDED-CHECKOUT-SPEC.md section 4.3.
   Loaded after the page's other style sheets on /join/ and every player page. Site tokens only.
   It must also work under player.css's "* { margin: 0; padding: 0 }" and "a { color: inherit;
   text-decoration: none }", so margins, padding and link styles are set here explicitly.
   Phones: a full-height sheet whose body is the only scroller (Stripe's frame grows to its content
   and scrolls inside it). From 720px wide: a centered panel at most 560px wide. */

.co-sheet {
  position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: stretch;
  margin: 0; padding: 0; background: rgba(7, 5, 10, .78); overflow: hidden;
}
.co-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.co-panel {
  display: flex; flex-direction: column; width: 100%; height: 100%; max-width: 100%; min-width: 0; box-sizing: border-box;
  margin: 0; padding: 0; background: var(--bg2); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5;
  animation: co-up .2s ease-out;
}
@keyframes co-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .co-panel { animation: none; } }

.co-top {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px; box-sizing: border-box; margin: 0;
  padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 10px; border-bottom: 1px solid var(--line);
}
.co-title {
  flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; font-family: var(--serif); font-weight: 700; font-size: 1.15rem;
  line-height: 1.25; color: var(--gold-hi); overflow-wrap: anywhere;
}
.co-title:focus { outline: none; }
.co-title:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.co-close {
  flex: 0 0 auto; min-width: 44px; min-height: 44px; margin: 0; padding: 0 16px; border-radius: 99px;
  border: 1px solid rgba(243, 237, 228, .35); background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
}
.co-close:focus-visible, .co-hosted:focus-visible, .co-btn:focus-visible, .co-sheet a:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }

.co-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  box-sizing: border-box; margin: 0; padding: 14px var(--gutter) calc(24px + env(safe-area-inset-bottom));
}
.co-renew { margin: 0 0 14px; padding: 0; font-size: 1rem; line-height: 1.45; color: var(--ink); overflow-wrap: break-word; }
.co-renew strong { color: #fff; font-weight: 700; }
.co-sheet a { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 2px; }

.co-error { margin: 0 0 14px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid rgba(200, 160, 77, .45); background: var(--panel); }
.co-error h3 { margin: 0; padding: 0; font-family: var(--serif); font-size: 1.1rem; line-height: 1.25; color: var(--gold-hi); }
.co-error h3:focus { outline: none; }
.co-error p { margin: 8px 0 0; padding: 0; color: var(--ink); font-size: .95rem; }
.co-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; padding: 0; }
.co-actions:empty { display: none; }
.co-sheet .co-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 0; padding: 0 18px; border-radius: 12px; border: none;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1a1206; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}

.co-mountwrap { position: relative; min-height: 420px; margin: 0; padding: 0; border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.co-loading { position: absolute; left: 0; right: 0; top: 40px; margin: 0; padding: 0 16px; text-align: center; font-size: .95rem; color: var(--ink); }
.co-mount { position: relative; z-index: 1; width: 100%; margin: 0; padding: 0; }
.co-mount iframe { display: block; max-width: 100%; }

.co-fine, .co-alt { margin: 14px 0 0; padding: 0; font-size: .9rem; line-height: 1.45; color: var(--ink); }
.co-hosted {
  display: inline-flex; align-items: center; min-height: 44px; margin: 0; padding: 0; border: none; background: none; text-align: left;
  color: var(--gold-hi); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* While the sheet is open, the page behind it (and the player's episode feed) does not scroll. */
html.co-open, html.co-open body { overflow: hidden; }
html.co-open .feed { overflow: hidden; }

@media (min-width: 720px) {
  .co-sheet { align-items: center; padding: 24px; box-sizing: border-box; }
  .co-panel {
    max-width: 560px; height: auto; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
    border: 1px solid rgba(200, 160, 77, .35); border-radius: 16px; overflow: hidden;
  }
}
