body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #0b1220;
  color: white;
}

/* HEADER */
.checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px; /* match index */
  background: #0f1a2e;
  position: sticky;
  top: 0;
  z-index: 1000;
}

    .checkout-logo,
    .checkout-logo:visited,
    .checkout-logo:hover,
    .checkout-logo:active {
      color: #ffffff;
      text-decoration: none;
      font-weight: 700;
      font-size: 20px;
    }

/* LAYOUT */
.checkout-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: calc(100vh - 60px);
  gap: 20px;
}

/* LEFT */
.checkout-form {
  padding: 40px;
}

.checkout-form h1 {
  margin-bottom: 5px;
}

.subhead {
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 15px;
}

.form-group {
  margin-bottom: 8px;
}

.checkout-form label {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  opacity: 0.8;
}

/* FIX WIDTH ISSUE */
.checkout-form input,
.checkout-form select,
.checkout-form textarea {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  border-radius: 8px;
  border: none;
  background: #111c33;
  color: white;
  box-sizing: border-box;
  font-size: 14px;
}

.optional-fields {
  margin-top: 10px;
  background: #0f1a2e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 14px;
}

.optional-fields summary {
  cursor: pointer;
  font-size: 13px;
  opacity: 0.85;
  padding: 6px 0;
}

.optional-fields summary:hover {
  opacity: 1;
}

.optional-fields[open] {
  padding-bottom: 14px;
}

/* RIGHT */
.checkout-summary {
  position: sticky;
  top: 20px;
  height: fit-content;

  padding: 40px;
  box-sizing: border-box;

  border-radius: 12px;
  overflow: hidden;
}

.summary-box {
  background: #111c33;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.currency-note {
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 10px;
}

.pay-btn {
  width: 100%;
  padding: 14px;
  margin-top: 20px;
  background: #3b82f6;
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.pay-btn:hover {
  background: #2f6fe0;
}

/* TRUST */
.pay-trust {
  margin-top: 12px;
  font-size: 12px;
  opacity: 0.75;
  line-height: 1.5;
  text-align: center;
}

.manual-note {
  margin-top: 15px;
  font-size: 13px;
  opacity: 0.8;
}

.secure-note {
  margin-top: 12px;
  font-size: 12px;
  opacity: 0.6;
  text-align: center;
}

/* PACKAGE SELECTOR */
.package-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.package-option {
  display: block;
  cursor: pointer;
}

.package-option input {
  display: none;
}

.option-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #111c33;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 14px;
  transition: 0.2s;
}

.package-option:hover .option-content {
  border-color: #3b82f6;
}

.package-option input:checked + .option-content {
  border-color: #3b82f6;
  background: #162544;
}

.package-option.best input:checked + .option-content {
  border-color: #22c55e;
}

.option-title {
  font-size: 14px;
  font-weight: 600;
}

.option-price {
  font-size: 15px;
  font-weight: bold;
}

.badge {
  margin-left: 8px;
  background: #22c55e;
  color: #000;
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 6px;
  font-weight: bold;
}

.checkout-info-box {
  margin-top: 12px;
  padding: 14px 16px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #cbd5e1;
}

.checkout-info-box ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.clip-details summary {
  font-size: 13px;
  opacity: 0.85;
  cursor: pointer;
  padding: 6px 0;
}

.clip-details summary:hover {
  opacity: 1;
}

.clip-details {
  margin-top: 12px;
}

.small-note {
  margin-top: 10px;
  opacity: 0.8;
}

#error-message {
  color: red;
  margin-top: 10px;
  font-size: 12px;
}

/* ===== STRIPE-STYLE SECTION CARDS ===== */
.section-card {
  background: #0f1a2e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px;
  margin-top: 14px;
}

/* spacing between sections inside form */
.checkout-form .section-card + .section-card {
  margin-top: 16px;
}

/* better label spacing inside cards */
.section-card label {
  margin-top: 0;
  margin-bottom: 6px;
  opacity: 0.9;
}

.section-sub {
  font-size: 11px;
  opacity: 0.55;
  margin-top: 3px;
  font-weight: 400;
}

/* improve group spacing consistency */
.form-group {
  margin-bottom: 12px;
}

/* make inputs feel less "stacked" */
.checkout-form input,
.checkout-form select,
.checkout-form textarea {
  margin-top: 4px;
}

/* optional: subtle section title feel for details summary */
.clip-details summary {
  font-weight: 600;
}

/* MOBILE */
@media (max-width: 900px) {
  .checkout-container {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .checkout-form {
    padding: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .checkout-summary {
    border-left: none;
    border-top: none;

    border-radius: 0;
    padding: 24px;
  }
}
@media (max-width: 600px) {
  .checkout-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .checkout-logo {
    font-size: 20px;
  }
}

.checkout-processing {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 18, 32, 0.72);
  backdrop-filter: blur(8px);
}

.checkout-processing.show {
  display: flex;
}

.processing-card {
  width: min(420px, 100%);
  background: #0f1a2e;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 26px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0,0,0,0.32);
}

.processing-card h2 {
  margin: 14px 0 8px;
  font-size: 22px;
}

.processing-card p {
  margin: 0;
  font-size: 14px;
  opacity: 0.75;
  line-height: 1.5;
}

.processing-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border: 4px solid rgba(255,255,255,0.18);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: checkoutSpin 0.9s linear infinite;
}

@keyframes checkoutSpin {
  to {
    transform: rotate(360deg);
  }
}

.checkout-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 50px;
  font-size: 12px;
  opacity: 0.8;
}

.progress-step {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.progress-step.active {
  background: #3b82f6;
  color: white;
  font-weight: 600;
}

.progress-step.done {
  background: #22c55e;
  color: black;
  font-weight: 600;
}

.progress-line {
  width: 30px;
  height: 2px;
  background: rgba(255,255,255,0.2);
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.payment-option {
  display: block;
  cursor: pointer;
}

.payment-option input {
  display: none;
}

.payment-box {
  border: 1px solid rgba(255,255,255,0.10);
  background: #111c33;
  padding: 14px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.payment-title {
  font-weight: 600;
  font-size: 14px;
}

.payment-sub {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 3px;
}

/* hover */
.payment-option:hover .payment-box {
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

/* selected state */
.payment-option input:checked + .payment-box {
  border: 2px solid #3b82f6;
  background: rgba(59,130,246,0.08);
}

/* BASE PILL */
.pill {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  vertical-align: middle;
}

/* VARIANTS */
.pill--green {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.pill--blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.pill--purple {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.pill--amber {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.option-meta {
  display: block;
  font-size: 11px;
  opacity: 0.65;
  margin-top: 2px;
}

.currency-toggle {
  display: flex;
  gap: 6px;
  align-items: center;
}

.currency-btn {
  background: #111c33;
  border: 1px solid rgba(255,255,255,0.12);
  color: white;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0.65;
  transition: 0.2s ease;
}

.currency-btn:hover {
  opacity: 1;
  border-color: rgba(255,255,255,0.3);
}

.currency-btn.active {
  background: #22c55e;
  color: #0b1220;
  font-weight: 600;
}

.currency-btn {
  opacity: 0.7;
  transition: all 0.2s ease;
}

.currency-btn:hover {
  opacity: 1;
}

.currency-btn.active {
  opacity: 1;
  transform: translateY(-1px);
}

.field-error {
  color: #dc2626;
  font-size: 12px;
  margin-top: 6px;
  display: none;
}

.input-error {
  border-color: #dc2626 !important;
}