/* ============================================================
   COLLECTORS CERTIFIED GRADING — cc-checkout.css
   Cloud Card SUBSCRIPTION checkout (cc-checkout.html,
   js/cc-checkout.js). Builds on style.css tokens and reuses the
   pf-* shell/panels + the .bt-switch billing toggle. All new
   selectors are ccc- prefixed and scoped so no other page is
   affected.
   ============================================================ */

/* ---------------- header + global states ---------------- */
.ccc-sub { color: var(--muted); font-size: 15px; margin-top: 6px; font-family: var(--font-mark); }
.ccc-loading { text-align: center; color: var(--dim); padding: 60px 20px; font-size: 14px; }

.ccc-alert {
  margin: 0 0 20px; padding: 12px 16px; border-radius: 12px;
  background: rgba(247, 111, 114, .1); border: 1px solid rgba(247, 111, 114, .4);
  color: #ffd7d8; font-size: 13.5px; line-height: 1.5;
}
.ccc-alert[hidden] { display: none; }

.ccc-loaderr { max-width: 560px; margin: 20px auto; padding: 34px 30px; text-align: center; }
.ccc-loaderr p { color: #ffd7d8; font-size: 14px; line-height: 1.5; margin-bottom: 20px; }
.ccc-loaderr-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------------- two-column layout: form + sticky plan ---------------- */
.ccc-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px; align-items: start;
}
.ccc-main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.ccc-panel { padding: 26px 28px; margin-bottom: 0; }
.ccc-head {
  font-family: var(--font-display); font-size: 24px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase; margin-bottom: 16px; outline: none;
}
.ccc-head:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 6px; }

/* ---------------- field grid (mirrors checkout-page.css) ---------------- */
.ccc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.ccc-col-2 { grid-column: 1 / -1; }
.ccc-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ccc-field label {
  font-size: 11.5px; font-weight: 600; letter-spacing: .5px;
  text-transform: uppercase; color: var(--dim);
}
.ccc-req { color: var(--cyan); }
.ccc-field input {
  width: 100%; font: 14px var(--font-body); color: var(--text);
  background: rgba(6, 16, 25, .72); border: 1px solid rgba(166, 196, 224, .2);
  border-radius: 10px; padding: 10px 12px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.ccc-field input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(54, 212, 249, .15); }
.ccc-field input::placeholder { color: var(--dim); opacity: .7; }
.ccc-field input.ccc-invalid { border-color: #F76F72; box-shadow: 0 0 0 3px rgba(247, 111, 114, .15); }
.ccc-hint { font-size: 11.5px; color: var(--dim); line-height: 1.4; }

.ccc-field-error {
  margin: 0 0 16px; padding: 11px 14px; border-radius: 10px;
  background: rgba(247, 111, 114, .1); border: 1px solid rgba(247, 111, 114, .42);
  color: #ffd7d8; font-size: 13px; line-height: 1.5;
}
.ccc-field-error[hidden] { display: none; }

/* ---------------- test-mode + checkbox ---------------- */
.ccc-testnote {
  font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 20px;
  background: rgba(255, 209, 102, .09); border: 1px solid rgba(255, 209, 102, .38);
  border-radius: 10px; padding: 11px 14px;
}
.ccc-testnote b { color: #FFD166; }
.ccc-testtag { color: #FFD166; font-weight: 600; }
/* D106.1 — on a real gateway the same line is reassurance, not a caution flag. */
.ccc-testnote.is-live {
  background: rgba(54, 212, 249, .06); border-color: rgba(54, 212, 249, .22);
}
.ccc-testtag.is-live { color: var(--muted); font-weight: 500; }

.ccc-check {
  display: flex; align-items: center; gap: 10px; margin: 16px 0;
  font-size: 13.5px; color: var(--muted); cursor: pointer;
}
.ccc-check input { width: 17px; height: 17px; accent-color: var(--cyan); cursor: pointer; flex-shrink: 0; }

/* ---------------- client-side tokenization boundary (js/payment-tokenize.js) ----------------
   The card panel renders with its own pt-* classes, styled by the shared css/payment.css so it
   looks identical here and on the submit Payment step. Only the mount container's spacing is
   page-specific; the billing address stays in its own fieldset below. */
.ccc-card-mount { margin-bottom: 6px; }

.ccc-billing {
  border: 1px solid rgba(166, 196, 224, .14); border-radius: 14px;
  padding: 8px 18px 18px; margin: 6px 0 22px; min-width: 0;
}
.ccc-billing legend {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 0 8px;
}
.ccc-billing .ccc-grid { margin-top: 8px; }

.ccc-submit { font-size: 16px; margin-top: 4px; }
.ccc-submit:disabled { opacity: .6; cursor: wait; }
.ccc-fine { font-size: 12px; color: var(--dim); line-height: 1.5; margin-top: 14px; text-align: center; }

/* ---------------- plan summary (sticky) ---------------- */
.ccc-summary { position: sticky; top: 100px; }
.ccc-plan-card {
  position: relative; padding: 30px 26px 26px; margin-bottom: 0;
  background: linear-gradient(170deg, rgba(20,146,253,.12), rgba(87,218,249,.03));
  border: 1px solid rgba(54,212,249,.35);
}
.ccc-plan-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, #E05E00, #FF9A3D); color: #1a0d02;
  font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; padding: 5px 16px; border-radius: 999px; white-space: nowrap;
}
.ccc-plan-badge[hidden] { display: none; }
.ccc-plan-kicker {
  font-family: var(--font-display); font-size: 12.5px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); margin-bottom: 6px;
}
.ccc-plan-name { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: .5px; margin-bottom: 10px; }
.ccc-plan-price { font-family: var(--font-display); font-size: 52px; font-weight: 700; line-height: 1; margin-bottom: 6px; }
.ccc-plan-price sup { font-size: 24px; vertical-align: super; color: var(--cyan); }
.ccc-plan-period { font-size: 15px; font-weight: 400; color: var(--dim); }
.ccc-plan-save { font-size: 13px; font-weight: 600; color: var(--cyan); margin-bottom: 4px; min-height: 18px; }
.ccc-plan-trial { font-size: 13px; color: var(--muted); margin-bottom: 18px; }

.ccc-billing-toggle { margin-bottom: 20px; }
.ccc-billing-toggle .bt-switch { display: flex; width: 100%; }
.ccc-billing-toggle .bt-opt { flex: 1 1 0; padding: 10px 12px; font-size: 14px; }

.ccc-plan-feats { list-style: none; margin: 0; padding: 0; }
.ccc-plan-feats li {
  padding: 9px 0 9px 30px; position: relative; color: var(--muted); font-size: 14px;
  border-bottom: 1px dashed rgba(166,196,224,.1);
}
.ccc-plan-feats li:last-child { border-bottom: 0; }
.ccc-plan-feats li::before {
  content: ''; position: absolute; left: 2px; top: 13px;
  width: 15px; height: 15px; border-radius: 50%;
  background:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23061019" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round"><path d="M5 13l4 4L19 7"/></svg>') center/9px no-repeat,
    var(--grad);
}

/* ---------------- confirmation view ---------------- */
.ccc-confirm { text-align: center; max-width: 620px; margin: 20px auto; padding: 44px 34px; }
.ccc-confirm-mark {
  width: 66px; height: 66px; margin: 0 auto 20px; border-radius: 50%;
  background: rgba(61, 214, 140, .12); border: 1px solid rgba(61, 214, 140, .45);
  display: flex; align-items: center; justify-content: center; color: var(--green);
}
.ccc-confirm h2 {
  font-family: var(--font-display); font-size: 28px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase; margin-bottom: 12px; outline: none;
}
.ccc-confirm h2:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 6px; }
.ccc-confirm > p { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin-bottom: 24px; }
.ccc-confirm > p b { color: var(--text); }
.ccc-confirm-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

/* ---------------- responsive ---------------- */
@media (max-width: 980px) {
  .ccc-layout { grid-template-columns: 1fr; }
  .ccc-summary { position: static; order: -1; }   /* the plan rides to the top on stack */
}
@media (max-width: 560px) {
  .ccc-grid { grid-template-columns: 1fr; }
  .ccc-panel { padding: 20px 16px; }
  .ccc-confirm { padding: 34px 20px; }
}
