/* ============================================================
   NovuTV Checkout Modal — matches the theme's blue palette
   ============================================================ */
.nv-co-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.nv-co-modal.open { display: flex; }
.nv-co-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 23, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.nv-co-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg-card, #0A1F38);
  border: 1px solid var(--border-glow, rgba(0, 102, 255, 0.32));
  border-radius: var(--radius-lg, 20px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 163, 255, 0.08);
  padding: 30px 28px 26px;
  font-family: var(--font-body, 'Inter', sans-serif);
  color: var(--text, #fff);
  animation: nvCoIn 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes nvCoIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }

.nv-co-close {
  position: absolute;
  top: 14px; right: 16px;
  width: 34px; height: 34px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted, #B8C2D0);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition, 0.3s ease);
}
.nv-co-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.nv-co-head { text-align: center; margin-bottom: 18px; }
.nv-co-head h3 {
  margin: 0 0 4px;
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}
.nv-co-sub { margin: 0; font-size: 0.86rem; color: var(--text-muted, #B8C2D0); }

.nv-co-summary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.07));
  border-radius: var(--radius, 12px);
  padding: 12px 16px;
  margin-bottom: 18px;
}
.nv-co-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  padding: 4px 0;
}
.nv-co-summary-row span { color: var(--text-muted, #B8C2D0); }
.nv-co-summary-row strong { color: #fff; font-weight: 600; }
.nv-co-summary-total { border-top: 1px solid var(--border-subtle, rgba(255,255,255,0.07)); margin-top: 4px; padding-top: 10px; }
.nv-co-summary-total span { font-weight: 600; color: #fff; }
.nv-co-summary-total strong { font-size: 1.25rem; font-weight: 800; color: var(--accent-blue, #3DD9FF); }

.nv-co-field { margin-bottom: 14px; }
.nv-co-field > label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #B8C2D0);
  margin-bottom: 6px;
}
.nv-co-field input[type="text"],
.nv-co-field input[type="email"],
.nv-co-field input[type="tel"] {
  width: 100%;
  background: var(--primary-bg, #020817);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.07));
  border-radius: var(--radius, 12px);
  color: var(--text, #fff);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.nv-co-field input:focus {
  outline: none;
  border-color: var(--primary-blue, #0066FF);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.18);
}

/* Payment radio cards */
.nv-co-pay { display: grid; grid-template-columns: 1fr; gap: 10px; }
.nv-co-pay-card {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.07));
  border-radius: var(--radius, 12px);
  padding: 12px 14px;
  cursor: pointer;
  background: var(--primary-bg, #020817);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.nv-co-pay-card input { position: absolute; opacity: 0; pointer-events: none; }
.nv-co-pay-icon {
  flex-shrink: 0;
  width: 34px; height: 34px;
  margin-right: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-blue, #3DD9FF);
}
.nv-co-pay-inner { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nv-co-pay-brands { display: flex; align-items: center; gap: 5px; margin-top: 3px; flex-wrap: wrap; }
.nv-co-brand {
  background: #fff;
  border-radius: 4px;
  padding: 2px 5px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
.nv-co-brand svg { display: block; }
.nv-co-pay-name { font-size: 0.9rem; font-weight: 700; color: #fff; }
.nv-co-pay-desc { font-size: 0.72rem; color: var(--text-muted, #B8C2D0); }
.nv-co-pay-check {
  position: absolute;
  top: 10px; right: 12px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gradient-main, linear-gradient(135deg, #0066FF, #00A3FF));
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s, transform 0.2s;
}
.nv-co-pay-card:hover { border-color: var(--border-glow, rgba(0, 102, 255, 0.32)); }
.nv-co-pay-card:has(input:checked) {
  border-color: var(--primary-blue, #0066FF);
  background: rgba(0, 102, 255, 0.1);
  box-shadow: 0 0 0 1px var(--primary-blue, #0066FF);
}
.nv-co-pay-card:has(input:checked) .nv-co-pay-check { opacity: 1; transform: scale(1); }
.nv-co-pay-card.is-checked {
  border-color: var(--primary-blue, #0066FF);
  background: rgba(0, 102, 255, 0.1);
  box-shadow: 0 0 0 1px var(--primary-blue, #0066FF);
}
.nv-co-pay-card.is-checked .nv-co-pay-check { opacity: 1; transform: scale(1); }

.nv-co-error {
  display: none;
  background: rgba(255, 70, 90, 0.1);
  border: 1px solid rgba(255, 70, 90, 0.32);
  color: #ff9aa6;
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 0.82rem;
  margin-bottom: 12px;
}
.nv-co-error.show { display: block; }

.nv-co-submit {
  width: 100%;
  border: none;
  border-radius: var(--radius, 12px);
  padding: 14px;
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: var(--gradient-main, linear-gradient(135deg, #0066FF, #00A3FF));
  box-shadow: 0 8px 26px rgba(0, 102, 255, 0.35);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.nv-co-submit:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(0, 102, 255, 0.5); }
.nv-co-submit:disabled { opacity: 0.65; cursor: default; transform: none; }
.nv-co-spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: nvCoSpin 0.7s linear infinite;
}
@keyframes nvCoSpin { to { transform: rotate(360deg); } }
#nvCoForm.loading .nv-co-spinner { display: inline-block; }
#nvCoForm.loading .nv-co-submit-text { opacity: 0.7; }

.nv-co-trust { text-align: center; font-size: 0.74rem; color: var(--text-soft, #8FA0B5); margin: 12px 0 0; }

/* Success / error views */
.nv-co-view[data-view="success"], .nv-co-view[data-view="error"] { text-align: center; padding: 8px 0; }
.nv-co-view h3 { font-family: var(--font-display, 'Space Grotesk', sans-serif); font-size: 1.4rem; margin: 6px 0; color: #fff; }
.nv-co-success-icon, .nv-co-error-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin: 6px auto 10px;
  font-size: 32px;
  line-height: 64px;
  font-weight: 800;
  color: #fff;
}
.nv-co-success-icon { background: linear-gradient(135deg, #16c784, #0aa06a); box-shadow: 0 8px 26px rgba(22, 199, 132, 0.35); }
.nv-co-error-icon { background: linear-gradient(135deg, #ff465a, #c81d2e); box-shadow: 0 8px 26px rgba(255, 70, 90, 0.35); }
.nv-co-order-badge {
  display: inline-block;
  margin: 14px 0;
  padding: 10px 22px;
  background: rgba(0, 163, 255, 0.1);
  border: 1px solid rgba(0, 163, 255, 0.35);
  border-radius: 50px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--accent-blue, #3DD9FF);
}
.nv-co-order-badge span { color: #fff; }
.nv-co-success-note { font-size: 0.84rem; color: var(--text-muted, #B8C2D0); margin: 0 0 20px; line-height: 1.6; }
.nv-co-done, .nv-co-retry { max-width: 200px; margin: 8px auto 0; }

@media (max-width: 420px) {
  .nv-co-dialog { padding: 26px 18px 22px; }
  .nv-co-pay { grid-template-columns: 1fr; }
}
