/* =====================================================================
   AI Resume Builder checkout (two steps) + payment success
   (/{lang}/ai-resume-builder-payment, /{lang}/ai-resume-builder-checkout,
    /{lang}/ai-resume-builder-payment-success)
   Ported from frontend-design/ai-resume-builder/payment.html + checkout.html
   (css/payment.css, shared) and payment-success.html (inline <style>), plus
   the css/checkout.css tokens. Generated by bin/build_ai_resume_builder_css.py
   — keep the designer sections verbatim so `diff` against the export stays
   readable.

   Adaptations (the only intentional differences from the export):
     1. checkout.css `:root` tokens + `body` styles live on the `.rbc` page
        scope (<main class="page rbc">); the font token points at the
        page-scoped gordita-rb family.
     2. nav.css / footer.css and payment.css's "Nav integration and sticky
        footer" tail are dropped: the Laminas layout renders that chrome. The
        export's html/body sticky-footer rules become a flex rule on the wrapper.
     3. (0,0,1) `:where(.rbc)` neutralisers undo Bootstrap's reboot and the
        site's `*` reset — link this file from the view body.
     4. APP ADDITIONS at the end (sign-in link in a field error, busy CTA).
   ===================================================================== */

.rbc {
  --bg: #f2f4f8;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.08);
  --card: #ffffff;
  --blue: #1f66ff;
  --blue-2: #1a5af0;
  --blue-3: #0e4de0;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --font: "gordita-rb", "Gordita", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

/* Typeface: the designer's Gordita cut (same OTFs the glass nav uses) registered as a private
   family with the export's metric overrides. The global style.css maps "Gordita" to an older cut
   via a `*` rule, so the family is applied to every descendant of the page scope too. */
@font-face { font-family: "gordita-rb"; src: url("/new-design/fonts/Gordita-Light.otf") format("opentype");   font-weight: 300;     font-style: normal; font-display: swap; ascent-override: 98.3%; descent-override: 20%; line-gap-override: 0%; }
@font-face { font-family: "gordita-rb"; src: url("/new-design/fonts/Gordita-Regular.otf") format("opentype"); font-weight: 400;     font-style: normal; font-display: swap; ascent-override: 98.3%; descent-override: 20%; line-gap-override: 0%; }
@font-face { font-family: "gordita-rb"; src: url("/new-design/fonts/Gordita-Medium.otf") format("opentype");  font-weight: 500;     font-style: normal; font-display: swap; ascent-override: 98.3%; descent-override: 20%; line-gap-override: 0%; }
@font-face { font-family: "gordita-rb"; src: url("/new-design/fonts/Gordita-Bold.otf") format("opentype");    font-weight: 600 900; font-style: normal; font-display: swap; ascent-override: 98.3%; descent-override: 20%; line-gap-override: 0%; }

/* ---- Host-page neutralisers (the export has no Bootstrap / global reset) ---- */
.rbc, .rbc * { font-family: "gordita-rb", "Gordita", sans-serif; }
.rbc { line-height: normal; }
:where(.rbc) *, :where(.rbc) *::before, :where(.rbc) *::after { box-sizing: border-box; }
:where(.rbc) :is(b, strong) { font-weight: bold; }
:where(.rbc) small { font-size: smaller; }
:where(.rbc) :is(button, input, textarea, select) { font: inherit; margin: 0; text-transform: none; }
:where(.rbc) button { border-radius: 0; }
:where(.rbc) img { vertical-align: baseline; border-style: none; }
:where(.rbc) svg { vertical-align: baseline; overflow: visible; }
:where(.rbc) a { color: inherit; text-decoration: none; }
:where(.rbc) a:hover, :where(.rbc) a:focus { text-decoration: none; }
:where(.rbc) :is(ul, ol) { list-style: none; margin: 0; padding: 0; }
/* Bootstrap forces an outline on every button:focus; the export only shows the UA ring for keyboard focus. */
.rbc button:focus:not(:focus-visible) { outline: none; box-shadow: none; }
/* style.css pins every bare <header> to `position: fixed` under a mobile media query (the site navbar). */
:where(.rbc) header { position: static; width: auto; top: auto; z-index: auto; }

/* ---- checkout.css: body / page (scoped) ---- */
.rbc { margin: 0; font-family: var(--font); font-size: 16px; color: var(--text); background: var(--bg); }
.rbc [hidden] { display: none !important; }
.rbc.page { padding: 34px 16px 0; }

/* =================== css/payment.css (steps 1 + 2) =================== */
/* =============================================================
   AI Resume Builder checkout, shared by payment.html (step 1: plan + your details)
   and checkout.html (step 2: order summary + payment). Loads after checkout.css + nav.css.
   ============================================================= */

/* ---- Page frame ---- */
.co-wrap { max-width: 1060px; margin: 0 auto; padding: 44px 20px 80px; display: flex; flex-direction: column; gap: 26px; }
.co-head { text-align: center; }
.co-head h1 { font-size: 30px; font-weight: 700; color: #0f172a; margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
.co-head p { font-size: 14.5px; color: #64748b; margin: 8px 0 0; }
.co-label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #94a3b8; }

/* ---- Steps: 1 Your details, 2 Payment ---- */
.co-steps { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.co-step { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; color: #94a3b8; }
.co-step i {
  width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid #cbd5e1; color: #94a3b8;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-style: normal; font-weight: 700;
}
.co-step.is-active { color: #0f172a; }
.co-step.is-active i { background: var(--blue); border-color: var(--blue); color: #fff; }
.co-step.is-done { color: #0f172a; }
.co-step.is-done i { background: #e9f9f0; border-color: #bfe9cf; color: #16a34a; }
.co-step.is-done i svg { width: 13px; height: 13px; }
.co-steps hr { width: 44px; border: none; border-top: 1.5px solid #dbe3f0; margin: 0; }

/* ---- Card ---- */
.co-card {
  display: grid; background: #fff; border-radius: 24px; overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(15, 23, 42, 0.28); border: 1px solid rgba(15, 23, 42, 0.06);
}

/* ---- Step 1: plan panel (left) ---- */
.co-details { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
.co-plan {
  background: linear-gradient(180deg, #2469ff 0%, #1a5af0 100%); color: #fff;
  padding: 40px 38px; display: flex; flex-direction: column;
}
.co-plan .co-label { color: rgba(255, 255, 255, 0.8); }
.co-plan-name { font-size: 24px; font-weight: 700; line-height: 1.2; margin-top: 8px; }
.co-plan-sub { font-size: 14px; color: rgba(255, 255, 255, 0.85); margin-top: 6px; line-height: 1.5; }
.co-plan-amount { display: flex; align-items: baseline; gap: 10px; margin-top: 26px; }
.co-plan-amount b { font-size: 56px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.co-plan-amount span { font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.9); }
.co-plan-terms { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; font-size: 13px; color: rgba(255, 255, 255, 0.92); }
.co-plan-terms span { display: flex; align-items: center; gap: 8px; }
.co-plan-terms svg { width: 14px; height: 14px; flex: 0 0 14px; }
.co-plan-div { border: none; border-top: 1px solid rgba(255, 255, 255, 0.22); margin: 26px 0 22px; }
.co-plan-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.co-plan-feats li { display: flex; align-items: center; gap: 11px; font-size: 14px; line-height: 1.35; color: #fff; }
.co-plan-feats svg {
  width: 20px; height: 20px; flex: 0 0 20px; padding: 4px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18); color: #fff;
}

/* ---- Step 1: your details form (right) ---- */
.co-form { padding: 40px 44px 36px; display: flex; flex-direction: column; justify-content: center; }
.co-form h2, .co-summary h2, .co-pay h2 { font-size: 21px; font-weight: 700; color: #0f172a; margin: 0 0 6px; line-height: 1.25; }
.co-form-sub { font-size: 14px; color: #64748b; margin: 0 0 26px; line-height: 1.5; }
.co-field { display: flex; flex-direction: column; gap: 7px; }
.co-field + .co-field, .co-field-row + .co-field { margin-top: 18px; }
.co-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.co-field-row > .co-field + .co-field { margin-top: 0; }
.co-field label { font-size: 13.5px; font-weight: 600; color: #0f172a; }
.co-field label em { color: #ef4444; font-style: normal; margin-left: 2px; }
.co-input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.16); background: #fff; color: #0f172a;
  font-family: inherit; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.co-input::placeholder { color: #94a3b8; }
.co-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 102, 255, 0.15); }
.co-field.is-error .co-input { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14); }
.co-field-error { display: none; font-size: 12.5px; color: #dc2626; }
.co-field.is-error .co-field-error { display: block; }
.co-field-hint { font-size: 12.5px; color: #64748b; }
.co-form .co-cta { margin-top: 28px; }
.co-form-note { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.5; color: #64748b; margin-top: 16px; }
.co-form-note svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 2px; color: #16794c; }

/* ---- Step 2: order summary (left) + payment (right) ---- */
.co-checkout { grid-template-columns: 400px minmax(0, 1fr); }
.co-summary { background: #f4f7ff; padding: 44px 36px; display: flex; flex-direction: column; }
.co-summary h2 { margin-bottom: 20px; }
.co-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; color: #334155; }
.co-row + .co-row { margin-top: 12px; }
.co-row small { display: block; font-size: 12px; color: #64748b; margin-top: 2px; }
.co-row b { font-weight: 700; color: #0f172a; white-space: nowrap; }
.co-row--discount b { color: #15803d; }
.co-sum-div { border: none; border-top: 1px solid rgba(15, 23, 42, 0.1); margin: 16px 0; }
.co-row--total { font-size: 15px; font-weight: 700; color: #0f172a; }
.co-row--total b { font-size: 26px; }
.co-summary-foot { margin-top: auto; padding-top: 22px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #64748b; }
.co-summary-foot svg { width: 15px; height: 15px; color: #16794c; flex: 0 0 15px; }

/* Coupon: field, applied pill, message */
.co-coupon { margin: 0 0 18px; }
.co-coupon-field { display: flex; gap: 8px; }
.co-coupon-field[hidden] { display: none; }
.co-coupon-input {
  flex: 1; min-width: 0; height: 42px; padding: 0 13px; border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.16); background: #fff; color: #0f172a;
  font-family: inherit; font-size: 13.5px; text-transform: uppercase; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.co-coupon-input::placeholder { color: #94a3b8; text-transform: none; }
.co-coupon-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 102, 255, 0.15); }
.co-coupon.is-error .co-coupon-input { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14); }
.co-coupon-btn {
  flex: 0 0 auto; height: 42px; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--blue); background: #fff; color: var(--blue);
  font-family: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: background .15s, color .15s, opacity .15s;
}
.co-coupon-btn:hover { background: var(--blue); color: #fff; }
.co-coupon-btn:disabled { opacity: .6; cursor: default; }
.co-coupon-applied {
  display: none; align-items: center; gap: 10px;
  padding: 9px 9px 9px 12px; border-radius: 10px;
  background: #e9f9f0; border: 1px solid #bfe9cf; color: #0f172a;
}
.co-coupon-applied.is-visible { display: flex; }
.co-coupon-applied > svg { width: 18px; height: 18px; flex: 0 0 18px; color: #16a34a; }
.co-coupon-applied-text { flex: 1; min-width: 0; font-size: 13px; line-height: 18px; }
.co-coupon-applied-text b { font-weight: 700; letter-spacing: .02em; }
.co-coupon-applied-text span { color: #475569; }
.co-coupon-remove {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid rgba(15, 23, 42, 0.12); background: #fff; color: #0f172a;
  font-family: inherit; font-size: 12px; font-weight: 700; border-radius: 8px; padding: 6px 10px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.co-coupon-remove svg { width: 12px; height: 12px; }
.co-coupon-remove:hover { background: #e8eefb; border-color: #c9d8ff; }
.co-coupon-msg { display: none; margin-top: 10px; font-size: 12.5px; line-height: 18px; color: #dc2626; }
.co-coupon-msg.is-visible { display: block; }
.co-coupon-msg.is-success { color: #15803d; }

.co-pay { padding: 44px 48px 40px; display: flex; flex-direction: column; justify-content: center; }
.co-pay h2 { margin-bottom: 4px; }
.co-pay-sub { font-size: 14px; color: #64748b; margin: 0 0 28px; }
.co-stripe-mount { min-height: 120px; padding: 4px 0; }
.co-stripe-loading { display: flex; align-items: center; gap: 10px; padding: 34px 0; justify-content: center; font-size: 13.5px; color: #64748b; }
.co-spinner {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid #dbe6ff; border-top-color: var(--blue);
  animation: co-spin .8s linear infinite;
}
@keyframes co-spin { to { transform: rotate(360deg); } }
.co-pay-msg { display: none; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #fef2f2; color: #b91c1c; font-size: 13px; line-height: 1.45; }
.co-pay-msg.is-visible { display: block; }
.co-cta:disabled, .co-cta.is-busy { opacity: .7; cursor: default; box-shadow: none; }
.co-pay .co-cta { margin-top: 30px; }

/* ---- Buttons and small print ---- */
.co-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: var(--blue); color: #fff; border: none; border-radius: 999px; padding: 16px 28px;
  font-size: 15.5px; font-weight: 700; font-family: inherit; text-decoration: none; cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.co-cta:hover { background: var(--blue-3); box-shadow: 0 10px 24px rgba(31, 102, 255, 0.35); color: #fff; }
.co-cta svg { width: 16px; height: 16px; }
.co-secure { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12.5px; color: #64748b; margin-top: 14px; }
.co-secure svg { width: 14px; height: 14px; color: #16794c; }
.co-back { display: inline-flex; align-items: center; gap: 6px; align-self: center; font-size: 13.5px; font-weight: 600; color: #64748b; text-decoration: none; }
.co-back:hover { color: var(--blue); }
.co-back svg { width: 14px; height: 14px; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .co-wrap { padding: 28px 14px 56px; gap: 20px; }
  .co-head h1 { font-size: 25px; }
  .co-details, .co-checkout { grid-template-columns: 1fr; }
  .co-plan { padding: 30px 24px; }
  .co-plan-amount b { font-size: 48px; }
  .co-form, .co-summary, .co-pay { padding: 30px 22px; }
  .co-summary-foot { padding-top: 18px; }
}
@media (max-width: 520px) {
  .co-field-row { grid-template-columns: 1fr; gap: 18px; }
  .co-steps hr { width: 24px; }
  .co-step span { display: none; }
  .co-step.is-active span { display: inline; }
}

/* =================== payment-success.html <style> =================== */
/* ===== Payment success: one wide card. Left says it went through, right is the receipt. ===== */
.rbc--success.page { display: flex; flex-direction: column; }
.ps-wrap { flex: 1 0 auto; width: 100%; max-width: 1160px; margin: 0 auto; padding: 14px 20px 48px; display: flex; align-items: center; }
.ps-card {
  width: 100%; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: center;
  background: #fff; border-radius: 26px; padding: 72px 72px;
  box-shadow: 0 24px 60px -30px rgba(15, 23, 42, 0.28); border: 1px solid rgba(15, 23, 42, 0.06);
}
.ps-status { display: flex; flex-direction: column; align-items: flex-start; }
.ps-icon {
  width: 88px; height: 88px; margin: 0 0 26px; border-radius: 50%; background: #e9f9f0; color: #16a34a;
  display: flex; align-items: center; justify-content: center;
}
.ps-icon svg { width: 42px; height: 42px; }
.ps-title { font-size: 36px; font-weight: 700; color: #0f172a; margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
.ps-sub { font-size: 16.5px; color: #64748b; margin: 14px 0 0; line-height: 1.55; max-width: 420px; }
.ps-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 34px;
  background: var(--blue); color: #fff; border-radius: 999px; padding: 17px 34px;
  font-size: 15.5px; font-weight: 700; text-decoration: none; transition: background 0.2s, box-shadow 0.2s;
}
.ps-cta:hover { background: var(--blue-3); box-shadow: 0 10px 24px rgba(31, 102, 255, 0.35); color: #fff; }
.ps-cta svg { width: 16px; height: 16px; }
.ps-note { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: #64748b; margin: 18px 0 0; }
.ps-note svg { width: 15px; height: 15px; flex: 0 0 15px; }

.ps-receipt { background: #f4f7ff; border-radius: 22px; padding: 34px; }
.ps-receipt-label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #94a3b8; margin-bottom: 18px; }
.ps-details { display: grid; grid-template-columns: 1fr; gap: 12px; }
.ps-detail {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; min-width: 0;
  border: 1px solid #e5e8f0; border-radius: 14px; background: #fff;
}
.ps-detail__icon {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.ps-detail__icon svg { width: 20px; height: 20px; }
.ps-detail__icon.is-green { background: #1fb76a; }
.ps-detail__icon.is-red { background: #ef4444; }
.ps-detail__icon.is-orange { background: #e76a23; }
.ps-detail__icon.is-purple { background: #8b5cf6; }
.ps-detail__body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ps-detail__body small { font-size: 12.5px; color: #8993a6; font-weight: 500; line-height: 1.1; white-space: nowrap; }
.ps-detail__body b { font-size: 16px; color: #0f172a; font-weight: 700; line-height: 1.15; white-space: nowrap; }

@media (max-width: 900px) {
  .ps-wrap { padding: 14px 14px 36px; align-items: flex-start; }
  .ps-card { grid-template-columns: 1fr; gap: 28px; padding: 32px 24px; }
  .ps-title { font-size: 26px; }
  .ps-icon { width: 64px; height: 64px; }
}
@media (max-width: 520px) {
  .ps-card { padding: 28px 18px; }
  .ps-receipt { padding: 14px; }
  .ps-detail { padding: 14px 14px; gap: 12px; }
  .ps-detail__body b { font-size: 15px; }
  .ps-cta { width: 100%; }
}

  

/* =================== APP ADDITIONS (not in the designer export) =================== */
/* Sticky footer: the export makes <body> a flex column; here the layout wrapper grows instead. */
.resume-builder-checkout-wrapper { display: flex; flex-direction: column; min-height: calc(100vh - 70px); }
.resume-builder-checkout-wrapper > .rbc { flex: 1 0 auto; width: 100%; }
.resume-builder-checkout-wrapper > .app-footer { margin-top: auto; }
.rbc--success .ps-wrap { min-height: 100%; }
/* Server-side refusal under the email field (already owns the package): message + sign-in link */
.co-field-error .co-email-link { color: var(--blue); font-weight: 700; text-decoration: underline; }
/* Bootstrap paints a:hover blue at (0,1,1); re-assert the export's colours on anchor buttons/links. */
.rbc a.co-cta:hover, .rbc a.co-cta:focus, .rbc a.ps-cta:hover, .rbc a.ps-cta:focus { color: #fff; }
.rbc a.co-back:hover, .rbc a.co-back:focus { color: var(--blue); text-decoration: none; }
