/* ============================================================
   IPTV Adults — Secure Checkout page
   Requires: style.css (design tokens + header/footer/buttons)
   Neon Noir theme
   ============================================================ */

.checkout-wrap {
  padding: 110px 0 80px;
  min-height: 70vh;
  background:
    radial-gradient(560px 340px at 90% -10%, rgba(255, 45, 120, 0.10), transparent 70%),
    radial-gradient(480px 320px at 0% 110%, rgba(124, 58, 237, 0.10), transparent 70%),
    var(--bg);
}

/* Checkout must render instantly — no scroll-reveal animation here */
.checkout-summary, .checkout-pay {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.checkout-summary,
.checkout-pay,
.checkout-done,
.checkout-invalid {
  padding: 36px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.checkout-plan-name {
  margin: 10px 0 4px;
  font-size: 30px;
}

.checkout-plan-meta {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.checkout-includes {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.checkout-includes li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
}
.checkout-includes .icon {
  width: 16px;
  height: 16px;
  color: var(--neon);
  flex-shrink: 0;
}

.checkout-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 20px;
  border-top: 1px dashed rgba(255, 255, 255, 0.16);
  font-weight: 600;
}
.checkout-total {
  font-family: var(--font-head);
  font-size: 38px;
  letter-spacing: -0.02em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.checkout-old-price {
  margin: 4px 0 24px;
  font-size: 13px;
  color: var(--muted);
  text-align: right;
}
.checkout-old-price s { color: #F87171; }

.checkout-guarantee {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(232, 196, 104, 0.06);
  border: 1px solid rgba(232, 196, 104, 0.28);
}
.checkout-guarantee .icon {
  width: 26px;
  height: 26px;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}
.checkout-guarantee strong { font-size: 14.5px; color: var(--text); }
.checkout-guarantee p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }

/* --- Payment card --- */
.checkout-pay h2 { margin: 10px 0 24px; font-size: 24px; }
.checkout-pay .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ck-field { margin-bottom: 20px; }
.ck-field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 7px;
  color: var(--text);
}
.ck-field input,
.ck-field select {
  width: 100%;
  padding: 13px 15px;
  font-size: 16px; /* 16px minimum — prevents iOS/Android auto-zoom on focus */
  font-family: var(--font-body);
  color: var(--text);
  background: var(--surface-2);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.ck-field input::placeholder { color: var(--muted); }
.ck-field select option { background: var(--surface-2); color: var(--text); }
.ck-field input:focus,
.ck-field select:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(255, 45, 120, 0.22);
}
.ck-field small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }

/* --- Geo-aware payment method cards --- */
.ck-provider-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ck-provider-loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px 12px;
  color: var(--muted);
  font-size: 13.5px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
}

.ck-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 45, 120, 0.18);
  border-top-color: var(--neon);
  border-radius: 50%;
  animation: ck-spin .8s linear infinite;
}
@keyframes ck-spin { to { transform: rotate(360deg); } }

.ck-provider {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  text-align: left;
  font-family: var(--font-body);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out), background .18s var(--ease-out);
}
.ck-provider:hover {
  border-color: rgba(255, 45, 120, 0.55);
  box-shadow: 0 4px 14px rgba(255, 45, 120, 0.16);
}
.ck-provider:focus-visible {
  outline: none;
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(255, 45, 120, 0.22);
}
.ck-provider.is-selected {
  border-color: var(--neon);
  background: rgba(255, 45, 120, 0.08);
  box-shadow: 0 0 0 3px rgba(255, 45, 120, 0.18);
}

.ck-provider-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
}
.ck-provider-logo img { display: block; }

.ck-provider-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ck-provider-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  line-height: 1.2;
}
.ck-provider-desc {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.3;
}

/* radio-style check on the right */
.ck-provider-check {
  margin-left: auto;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--surface);
  position: relative;
  transition: border-color .18s var(--ease-out), background .18s var(--ease-out);
}
.ck-provider.is-selected .ck-provider-check {
  border-color: var(--neon);
  background: var(--neon);
  box-shadow: 0 0 12px rgba(255, 45, 120, 0.6);
}
.ck-provider.is-selected .ck-provider-check::after {
  content: "";
  position: absolute;
  left: 5.5px;
  top: 2.5px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* "Recommended" pill on the top-ranked option */
.ck-provider-badge {
  position: absolute;
  top: -9px;
  right: 12px;
  padding: 2px 9px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--grad-neon);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(255, 45, 120, 0.4);
}

.ck-error {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #FCA5A5;
  font-size: 13.5px;
}

.checkout-trust {
  list-style: none;
  margin: 22px 0 10px;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
}
.checkout-trust li { display: inline-flex; align-items: center; gap: 6px; }
.checkout-trust .icon { width: 14px; height: 14px; color: var(--gold); }

.ck-methods {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* --- Done / activation panel --- */
.checkout-done,
.checkout-invalid {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}
.ck-done-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 45, 120, 0.1);
  border: 2px solid rgba(255, 45, 120, 0.35);
  margin-bottom: 18px;
  box-shadow: 0 0 34px rgba(255, 45, 120, 0.22);
}
.ck-done-icon .icon { width: 32px; height: 32px; color: var(--neon-soft); }
.checkout-done h1,
.checkout-invalid h1 { font-size: 28px; margin: 0 0 12px; }
.checkout-done p,
.checkout-invalid p { color: var(--muted); margin: 0 0 22px; }
.ck-done-note { margin-top: 20px !important; font-size: 13px; }
.ck-done-note code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--neon-soft);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12.5px;
}
.checkout-invalid .btn { margin-top: 6px; }

/* --- Done panel: retry / reopen actions --- */
.ck-retry {
  margin-top: 14px;
  padding: 14px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  text-align: center;
}
.ck-retry-title {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}
.ck-retry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .18s var(--ease-out), color .18s var(--ease-out);
}
.ck-retry-btn:hover { border-color: var(--neon); color: var(--neon-soft); }
.ck-retry-btn .icon { width: 15px; height: 15px; color: var(--neon-soft); }
.ck-retry-links {
  margin: 10px 0 0;
  font-size: 12.5px;
}
.ck-retry-links a {
  color: var(--neon-soft);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ck-retry-ref {
  margin: 8px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}
.ck-retry-ref code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
}

@media (max-width: 860px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-wrap { padding: 96px 0 60px; }
  /* Order summary first on mobile (natural order) */
  .checkout-summary, .checkout-pay, .checkout-done, .checkout-invalid { padding: 26px; }
  .checkout-total { font-size: 32px; }
}

@media (max-width: 480px) {
  .ck-provider-grid { grid-template-columns: 1fr; }
}
