/* ============================================================
   UAE VISA COST CALCULATOR  ·  FamilyVisa.ae
   Mobile-app BOTTOM-SHEET interface — finger-friendly redesign
   ------------------------------------------------------------
   • Self-contained, embeddable. All JS hooks (ids / classes /
     data-attrs / per-category accent vars) are preserved.
   • The calculator opens as a sheet that rises from the bottom
     with a grab-handle, sticky header and sticky thumb-reach CTA.
   ============================================================ */

/* ---------- DESIGN TOKENS (neutral palette + per-category accent) ---------- */
.pvc-overlay,
.pvc-calc {
  /* FamilyVisa.ae brand red — constant, used by the header lockup so the
     brand reads the same on every category screen */
  --pvc-brand:       #b81a2c;

  /* category accent — defaults to the brand red, overwritten at runtime by applyAccent() */
  --pvc-accent:      #b81a2c;
  --pvc-accent-2:    #e0394d;
  --pvc-accent-soft: #fbe7ea;
  --pvc-accent-ink:  #8f1322;

  /* neutral surfaces */
  --pvc-ink:    #0f1b2d;   /* primary text / headings   */
  --pvc-ink-2:  #58657a;   /* secondary text            */
  --pvc-ink-3:  #94a0b0;   /* tertiary / hints          */
  --pvc-sheet:  #ffffff;   /* sheet header surface      */
  --pvc-canvas: #f4f6fa;   /* scrolling content canvas  */
  --pvc-card:   #ffffff;   /* cards / rows              */
  --pvc-line:   #e9edf4;   /* hairline border           */
  --pvc-line-2: #dde3ec;   /* stronger hairline         */
  --pvc-fill:   #eef1f6;   /* neutral tint fill         */

  /* radii */
  --pvc-r-sheet: 30px;
  --pvc-r-card:  18px;
  --pvc-r-btn:   16px;
  --pvc-r-pill:  999px;

  /* misc */
  --pvc-navy: var(--pvc-ink);
  --pvc-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --pvc-ease: cubic-bezier(.22,1,.36,1);
  --pvc-ease-soft: cubic-bezier(.16,1,.3,1);
  --pvc-shadow-card: 0 1px 2px rgba(15,27,45,.04), 0 10px 24px -18px rgba(15,27,45,.30);
}

/* ============================================================
   1 · BOTTOM-SHEET SHELL
   ============================================================ */
.pvc-overlay {
  position: fixed; inset: 0; z-index: 999999; display: none;
  font-family: var(--pvc-font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.pvc-overlay.pvc-open { display: block; }
.pvc-overlay * { box-sizing: border-box; }

.pvc-overlay-backdrop {
  position: absolute; inset: 0;
  background: rgba(8,16,28,.5);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  animation: pvcBackdrop .35s ease both;
}
@keyframes pvcBackdrop { from { opacity: 0; } to { opacity: 1; } }

/* The sheet itself: anchored to the bottom, rounded top, rises up */
.pvc-overlay-panel {
  position: absolute; left: 0; right: 0; bottom: 0; top: auto;
  margin: 0 auto; width: 100%; max-width: 540px;
  height: 90vh; height: 90dvh;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--pvc-canvas); color: var(--pvc-ink);
  border-radius: var(--pvc-r-sheet) var(--pvc-r-sheet) 0 0;
  box-shadow: 0 -10px 50px rgba(8,16,28,.28);
  animation: pvcSheetUp .46s var(--pvc-ease-soft) both;
  transition: transform .34s var(--pvc-ease), opacity .2s ease;
  will-change: transform;
}
@keyframes pvcSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* the scrolling region — everything below the fixed header lives here */
.pvc-sheet-scroll {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
/* hide native scrollbar for a cleaner app feel (still scrollable) */
.pvc-sheet-scroll::-webkit-scrollbar { width: 0; height: 0; }
.pvc-sheet-scroll { scrollbar-width: none; }

/* ---------- Fixed header (does not scroll): grabber + brand + close ---------- */
.pvc-sheet-head {
  flex: 0 0 auto; position: relative; z-index: 40;
  padding: 9px 12px 8px;
  background: color-mix(in srgb, var(--pvc-canvas) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid transparent;
  cursor: grab; user-select: none; -webkit-user-select: none;
  touch-action: pan-x;
}
.pvc-sheet-head:active { cursor: grabbing; }
.pvc-grabber {
  width: 42px; height: 5px; border-radius: var(--pvc-r-pill);
  background: var(--pvc-ink-3); opacity: .42;
  margin: 0 auto 8px;
}
.pvc-sheet-bar { position: relative; display: flex; align-items: center; justify-content: center; min-height: 40px; }
.pvc-overlay-back  { position: absolute; left: 0;  top: 50%; transform: translateY(-50%); display: flex; }
.pvc-overlay-close { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: flex; }
.pvc-overlay.pvc-hide-back .pvc-overlay-back { display: none; }

/* brand lockup — just the FamilyVisa.ae wordmark, centred */
.pvc-brand {
  display: inline-flex; align-items: center;
  max-width: calc(100% - 100px); pointer-events: none; user-select: none;
}
.pvc-brand-name { font-size: 1.06rem; font-weight: 800; letter-spacing: -.02em; color: var(--pvc-ink); white-space: nowrap; }
.pvc-brand-tld { color: var(--pvc-brand); }


/* official UAE dirham glyph — inline SVG, inherits surrounding text colour & size.
   (The U+20C3 character itself has no font support until Unicode 18.0 ships on
   devices, so it is rendered as a vector to display correctly everywhere today.) */
.pvc-dh {
  display: inline-block; height: .9em; width: auto;
  vertical-align: -.11em; margin-right: .04em;
  flex-shrink: 0;
}
.pvc-overlay-back button,
.pvc-overlay-close button {
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: var(--pvc-fill); color: var(--pvc-ink);
  display: flex; align-items: center; justify-content: center;
  line-height: 1; cursor: pointer; padding: 0;
  font-family: inherit;
  transition: background .16s ease, transform .12s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.pvc-overlay-back  button { font-size: 1.55rem; padding-bottom: 3px; }
.pvc-overlay-close button { font-size: 1.1rem; }
.pvc-overlay-back button:hover,
.pvc-overlay-close button:hover { background: var(--pvc-line-2); }
.pvc-overlay-back button:active,
.pvc-overlay-close button:active { transform: scale(.9); }

/* resume prompt is intentionally disabled (always start fresh on open) */
.pvc-resume, #pvcResumePrompt { display: none !important; }

/* ============================================================
   2 · CALCULATOR CONTAINER
   ============================================================ */
.pvc-calc {
  font-family: var(--pvc-font); color: var(--pvc-ink);
  background: transparent;
  flex: 1 0 auto; display: flex; flex-direction: column;
  padding: 0 0 max(22px, env(safe-area-inset-bottom));
  letter-spacing: -.01em;
}
.pvc-calc * { box-sizing: border-box; }

/* loading */
.pvc-calc .pvc-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1 0 auto; padding: 48px 24px; text-align: center;
}
.pvc-calc .pvc-spinner {
  width: 38px; height: 38px; border: 3px solid var(--pvc-line-2);
  border-top-color: var(--pvc-accent); border-radius: 50%;
  animation: pvcSpin .8s linear infinite; margin-bottom: 14px;
}
@keyframes pvcSpin { to { transform: rotate(360deg); } }
.pvc-calc .pvc-loading p { font-size: .92rem; color: var(--pvc-ink-3); font-weight: 500; }

.pvc-calc .pvc-body { display: none; }
.pvc-calc.pvc-ready .pvc-body { display: flex; flex-direction: column; flex: 1 0 auto; }
.pvc-calc.pvc-ready .pvc-loading { display: none; }

/* unused legacy bands — kept hidden so old hooks never show */
.pvc-calc .pvc-source { display: none; }
.pvc-calc .pvc-hero,
.pvc-calc .pvc-hero.pvc-hero-collapsed { display: none !important; }
.pvc-calc .pvc-stepcount { display: none !important; }

/* ---------- progress: slim segmented accent bar ---------- */
.pvc-calc .pvc-progress {
  display: flex; gap: 5px; padding: 16px 22px 2px;
}
.pvc-calc .pvc-step-dot {
  flex: 1; height: 4px; border-radius: var(--pvc-r-pill);
  background: var(--pvc-line-2);
  transition: background .35s var(--pvc-ease), transform .35s var(--pvc-ease);
}
.pvc-calc .pvc-step-dot.pvc-active { background: var(--pvc-accent); }
.pvc-calc .pvc-step-dot.pvc-done   { background: var(--pvc-accent); opacity: .45; }

/* ============================================================
   3 · SCREENS · QUESTIONS · OPTION CARDS
   ============================================================ */
.pvc-calc .pvc-screen { display: none; padding: 0 20px; }
.pvc-calc .pvc-screen.pvc-show { display: flex; flex-direction: column; flex: 1 0 auto; animation: pvcScreenIn .34s var(--pvc-ease) both; }
@keyframes pvcScreenIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.pvc-calc .pvc-question {
  font-size: 1.62rem; font-weight: 800; line-height: 1.18;
  letter-spacing: -.03em; color: var(--pvc-ink); margin: 16px 0 6px;
}
.pvc-calc .pvc-subtext {
  font-size: .92rem; color: var(--pvc-ink-2); line-height: 1.5;
  margin: 0 0 20px; max-width: 42ch;
}

/* category eyebrow pill removed — leaner, lower-text form */

/* option list = distinct, finger-friendly cards */
.pvc-calc .pvc-options { display: grid; gap: 11px; }
.pvc-calc .pvc-option {
  display: flex; align-items: center; gap: 14px;
  min-height: 72px; padding: 14px 16px;
  background: var(--pvc-card);
  border: 1.5px solid var(--pvc-line);
  border-radius: var(--pvc-r-card);
  box-shadow: var(--pvc-shadow-card);
  cursor: pointer; position: relative; overflow: hidden;
  transition: border-color .2s ease, background .2s ease,
              box-shadow .2s ease, transform .15s var(--pvc-ease);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.pvc-calc .pvc-option:hover { transform: translateY(-2px); }
.pvc-calc .pvc-option:active { transform: translateY(0) scale(.99); }
.pvc-calc .pvc-option:hover { border-color: var(--pvc-accent); }
.pvc-calc .pvc-option.pvc-selected {
  border-color: var(--pvc-accent);
  background: color-mix(in srgb, var(--pvc-accent-soft) 60%, var(--pvc-card));
  box-shadow: 0 1px 2px rgba(15,27,45,.04), 0 14px 30px -18px var(--pvc-accent);
}

/* leading icon chip */
.pvc-calc .pvc-opt-icon {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px;
  background: var(--pvc-accent-soft);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, transform .2s var(--pvc-ease);
}
.pvc-calc .pvc-opt-icon svg {
  width: 23px; height: 23px; stroke: var(--pvc-accent); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .2s ease;
}
.pvc-calc .pvc-option.pvc-selected .pvc-opt-icon { transform: scale(1.04); background: var(--pvc-accent); }
.pvc-calc .pvc-option.pvc-selected .pvc-opt-icon svg { stroke: #fff; }

/* radio dot is replaced by trailing indicator */
.pvc-calc .pvc-radio { display: none !important; }

.pvc-calc .pvc-option-text { flex: 1; min-width: 0; }
.pvc-calc .pvc-option-title { font-size: 1.01rem; font-weight: 700; color: var(--pvc-ink); letter-spacing: -.01em; }
.pvc-calc .pvc-option-sub { font-size: .8rem; color: var(--pvc-ink-2); margin-top: 2px; line-height: 1.4; font-weight: 500; }
.pvc-calc .pvc-option-price {
  font-size: .92rem; font-weight: 800; color: var(--pvc-accent);
  white-space: nowrap; font-feature-settings: "tnum" 1; flex-shrink: 0;
}

/* trailing select indicator */
.pvc-calc .pvc-option::after {
  content: ""; flex-shrink: 0; margin-left: 2px;
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--pvc-line-2);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s ease, border-color .18s ease;
}
.pvc-calc .pvc-option.pvc-selected::after {
  content: "✓";
  border-color: var(--pvc-accent); background: var(--pvc-accent);
  color: #fff; font-size: .78rem; font-weight: 900; line-height: 1;
  animation: pvcPop .25s var(--pvc-ease);
}
@keyframes pvcPop { from { transform: scale(0); } to { transform: scale(1); } }

/* first-screen category options each carry their OWN theme colour */
.pvc-calc .pvc-option[data-cat-accent]:hover { border-color: var(--pvc-cat); }
.pvc-calc .pvc-option[data-cat-accent].pvc-selected {
  border-color: var(--pvc-cat);
  background: color-mix(in srgb, var(--pvc-cat-soft) 60%, var(--pvc-card));
  box-shadow: 0 1px 2px rgba(15,27,45,.04), 0 14px 30px -18px var(--pvc-cat);
}
.pvc-calc .pvc-option[data-cat-accent].pvc-selected .pvc-opt-icon { background: var(--pvc-cat) !important; }
.pvc-calc .pvc-option[data-cat-accent].pvc-selected .pvc-opt-icon svg { stroke: #fff !important; }
.pvc-calc .pvc-option[data-cat-accent].pvc-selected::after { border-color: var(--pvc-cat); background: var(--pvc-cat); }

/* subtle staggered reveal of cards on each screen */
.pvc-calc .pvc-screen.pvc-show .pvc-options .pvc-option { animation: pvcCardIn .4s var(--pvc-ease) both; }
.pvc-calc .pvc-screen.pvc-show .pvc-options .pvc-option:nth-child(1){ animation-delay:.04s; }
.pvc-calc .pvc-screen.pvc-show .pvc-options .pvc-option:nth-child(2){ animation-delay:.09s; }
.pvc-calc .pvc-screen.pvc-show .pvc-options .pvc-option:nth-child(3){ animation-delay:.14s; }
.pvc-calc .pvc-screen.pvc-show .pvc-options .pvc-option:nth-child(4){ animation-delay:.19s; }
.pvc-calc .pvc-screen.pvc-show .pvc-options .pvc-option:nth-child(5){ animation-delay:.24s; }
@keyframes pvcCardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================
   4 · COUNTER / STEPPER ROWS
   ============================================================ */
.pvc-calc .pvc-counter-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 72px; padding: 14px 16px; margin-bottom: 11px;
  background: var(--pvc-card);
  border: 1.5px solid var(--pvc-line);
  border-radius: var(--pvc-r-card);
  box-shadow: var(--pvc-shadow-card);
}
.pvc-calc .pvc-counter-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pvc-calc .pvc-counter-icon {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px;
  background: var(--pvc-accent-soft);
  display: flex; align-items: center; justify-content: center;
}
.pvc-calc .pvc-counter-icon svg {
  width: 22px; height: 22px; stroke: var(--pvc-accent); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.pvc-calc .pvc-counter-label { font-size: 1.01rem; font-weight: 700; color: var(--pvc-ink); }
.pvc-calc .pvc-counter-sub { font-size: .79rem; color: var(--pvc-ink-2); margin-top: 2px; font-weight: 500; }

.pvc-calc .pvc-stepper {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
  background: var(--pvc-fill); border-radius: var(--pvc-r-pill); padding: 4px;
}
.pvc-calc .pvc-step-btn {
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: #fff; color: var(--pvc-accent);
  font-size: 1.4rem; font-weight: 600; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit; box-shadow: 0 1px 3px rgba(15,27,45,.12);
  transition: background .15s ease, transform .12s ease, color .15s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  -webkit-user-select: none; user-select: none;
}
.pvc-calc .pvc-step-btn:hover { background: var(--pvc-accent); color: #fff; }
.pvc-calc .pvc-step-btn:active { transform: scale(.88); }
.pvc-calc .pvc-step-val {
  font-size: 1.15rem; font-weight: 800; min-width: 30px; text-align: center;
  color: var(--pvc-ink); font-feature-settings: "tnum" 1;
}

/* ============================================================
   5 · PRIMARY ACTION  (sticky, thumb-reachable bottom bar)
   ============================================================ */
.pvc-calc .pvc-nav {
  display: flex; gap: 10px;
  position: sticky; bottom: 0; z-index: 30;
  margin: auto -20px 0; padding: 14px 20px max(14px, env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--pvc-canvas) 84%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border-top: 1px solid var(--pvc-line);
}
.pvc-calc .pvc-btn {
  flex: 1; padding: 16px; min-height: 56px;
  font-size: 1.04rem; font-weight: 800; letter-spacing: -.01em; text-align: center;
  border: none; border-radius: var(--pvc-r-btn); cursor: pointer; font-family: inherit;
  transition: transform .14s var(--pvc-ease), box-shadow .2s ease, opacity .2s ease, filter .2s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.pvc-calc .pvc-btn-back { display: none; }          /* header chevron handles "back" */
.pvc-calc .pvc-btn-next {
  background: linear-gradient(135deg, var(--pvc-accent) 0%, var(--pvc-accent-2) 100%);
  color: #fff; box-shadow: 0 10px 24px -10px var(--pvc-accent);
}
.pvc-calc .pvc-btn-next:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px var(--pvc-accent); }
.pvc-calc .pvc-btn-next:active { transform: translateY(0) scale(.985); }
.pvc-calc .pvc-btn-next:disabled { opacity: .4; filter: grayscale(.3); cursor: not-allowed; transform: none; box-shadow: none; }

/* ============================================================
   6 · RESULT SCREEN
   ============================================================ */
.pvc-calc .pvc-result-head { text-align: left; padding: 4px 0 0; margin-bottom: 16px; }
.pvc-calc .pvc-check {
  width: 52px; height: 52px; border-radius: 16px; margin: 0 0 14px;
  background: linear-gradient(135deg, var(--pvc-accent) 0%, var(--pvc-accent-2) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -10px var(--pvc-accent);
  animation: pvcCheckPop .45s var(--pvc-ease) both;
}
@keyframes pvcCheckPop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.pvc-calc .pvc-check svg { width: 26px; height: 26px; stroke: #fff; fill: none; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.pvc-calc .pvc-result-head h3 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.03em; color: var(--pvc-ink); line-height: 1.18; }
.pvc-calc .pvc-result-head p { font-size: .9rem; color: var(--pvc-ink-2); margin-top: 4px; line-height: 1.45; }

/* summary section cards */
.pvc-calc .pvc-sum { margin-bottom: 12px; }
.pvc-calc .pvc-sum-row {
  background: var(--pvc-card); border: 1.5px solid var(--pvc-line);
  border-radius: var(--pvc-r-card); box-shadow: var(--pvc-shadow-card);
  overflow: hidden; margin-bottom: 10px;
}
/* section header (title + total) sits on top; the line items list sits below it */
.pvc-calc .pvc-sum-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 16px 11px; flex-wrap: wrap; }
.pvc-calc .pvc-sum-row.pvc-sum-flat .pvc-sum-head { padding: 15px 16px; flex-wrap: nowrap; }
.pvc-calc .pvc-sum-head + .pvc-sum-items { border-top: 1px solid var(--pvc-line); }
.pvc-calc .pvc-sum-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 16px 13px; flex-wrap: wrap; }              /* legacy */
.pvc-calc .pvc-sum-row.pvc-sum-flat .pvc-sum-foot { padding: 15px 16px; flex-wrap: nowrap; }                                                                       /* legacy */
.pvc-calc .pvc-sum-items-top + .pvc-sum-foot { border-top: 1px solid var(--pvc-line); padding-top: 11px; }                                                          /* legacy */
.pvc-calc .pvc-sum-title { font-size: 1rem; font-weight: 800; color: var(--pvc-ink); letter-spacing: -.01em; flex: 1 1 auto; min-width: 0; }
.pvc-calc .pvc-sum-amt { font-size: 1rem; font-weight: 800; color: var(--pvc-ink); flex-shrink: 0; text-align: right; white-space: nowrap; font-feature-settings: "tnum" 1; }
.pvc-calc .pvc-sum-amt .pvc-sum-amt-n { white-space: nowrap; }
.pvc-calc .pvc-sum-flat .pvc-sum-amt { font-size: 1rem; white-space: nowrap; }
.pvc-calc .pvc-sum-amt.pvc-sum-na { color: var(--pvc-ink-3); font-weight: 700; font-size: .86rem; }
.pvc-calc .pvc-sum-na-note { padding: 0 16px 12px; font-size: .78rem; color: var(--pvc-ink-2); line-height: 1.5; }
.pvc-calc .pvc-sum-detail { padding: 0 16px 12px; font-size: .8rem; color: var(--pvc-ink-2); display: flex; justify-content: space-between; gap: 12px; }
.pvc-calc .pvc-sum-detail .pvc-sum-d-val { white-space: nowrap; font-weight: 600; color: var(--pvc-ink); font-feature-settings: "tnum" 1; }
.pvc-calc .pvc-sum-per { color: var(--pvc-ink-3); font-weight: 600; font-size: .78rem; margin-left: 2px; }
.pvc-calc .pvc-sum-perline { color: var(--pvc-accent); font-weight: 700; }
.pvc-calc .pvc-sum-items { padding: 9px 16px 12px; }
.pvc-calc .pvc-sum-items-top { padding: 12px 16px 9px; }
.pvc-calc .pvc-sum-item { display: flex; justify-content: space-between; gap: 12px; font-size: .84rem; padding: 4px 0; color: var(--pvc-ink-2); }
.pvc-calc .pvc-sum-item .pvc-sum-i-name { padding-right: 12px; }
.pvc-calc .pvc-sum-item .pvc-sum-i-val { white-space: nowrap; font-weight: 600; color: var(--pvc-ink); font-feature-settings: "tnum" 1; }
.pvc-calc .pvc-sum-item.pvc-sum-i-sub { border-top: 1px dashed var(--pvc-line-2); margin-top: 4px; padding-top: 8px; }
.pvc-calc .pvc-sum-item.pvc-sum-i-sub .pvc-sum-i-name { color: var(--pvc-ink); font-weight: 700; }
.pvc-calc .pvc-sum-item.pvc-sum-i-sub .pvc-sum-i-val { color: var(--pvc-ink); font-weight: 800; }
.pvc-calc .pvc-sum-foot-pp .pvc-pp-break { font-weight: 600; }
.pvc-calc .pvc-pp-unit { background: var(--pvc-accent-soft); color: var(--pvc-accent-ink); padding: 2px 8px; border-radius: 8px; font-weight: 800; white-space: nowrap; font-feature-settings: "tnum" 1; }

/* recap card — flows directly into the gold total beneath it (one connected unit) */
.pvc-calc .pvc-recap {
  background: var(--pvc-card); border: 1.5px solid var(--pvc-line); border-bottom: 0;
  border-radius: var(--pvc-r-card) var(--pvc-r-card) 0 0; box-shadow: var(--pvc-shadow-card);
  padding: 4px 18px 8px; margin-bottom: 0; overflow: hidden;
}
.pvc-calc .pvc-recap-title { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--pvc-ink-3); padding: 15px 0 7px; }
.pvc-calc .pvc-recap-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 0; border-top: 1px solid var(--pvc-line); font-size: .94rem; }
.pvc-calc .pvc-recap-name { color: var(--pvc-ink); font-weight: 600; min-width: 0; }
.pvc-calc .pvc-recap-mult { color: var(--pvc-ink-3); font-weight: 500; font-size: .82rem; white-space: nowrap; margin-left: 3px; font-feature-settings: "tnum" 1; }
.pvc-calc .pvc-recap-val { color: var(--pvc-ink); font-weight: 800; white-space: nowrap; flex-shrink: 0; font-feature-settings: "tnum" 1; }

/* grand total — bold accent card (becomes the footer of the recap when one is present) */
.pvc-calc .pvc-grand {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--pvc-accent-ink) 0%, var(--pvc-accent) 72%, var(--pvc-accent-2) 100%);
  border-radius: var(--pvc-r-card); padding: 17px 18px 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  color: #fff; box-shadow: 0 8px 22px -14px var(--pvc-accent); margin: 0;
}
.pvc-calc .pvc-recap + .pvc-grand { border-radius: 0 0 var(--pvc-r-card) var(--pvc-r-card); margin-top: 0; }
.pvc-calc .pvc-grand::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,0) 45%); pointer-events: none; }
.pvc-calc .pvc-grand::after { content: ""; position: absolute; right: -28px; top: -36px; width: 104px; height: 104px; border-radius: 50%; background: radial-gradient(circle at 32% 32%, rgba(255,255,255,.16), rgba(255,255,255,0) 70%); }
.pvc-calc .pvc-grand > div:first-child { min-width: 0; flex: 1; z-index: 1; }
.pvc-calc .pvc-grand-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; opacity: .9; font-weight: 800; }
.pvc-calc .pvc-grand-sub { font-size: .82rem; font-weight: 600; margin-top: 4px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pvc-calc .pvc-grand-amt { font-size: 1.72rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; text-align: right; flex-shrink: 0; z-index: 1; font-feature-settings: "tnum" 1; }
.pvc-calc .pvc-grand-amt span { font-size: .82rem; font-weight: 600; opacity: .82; }
.pvc-calc .pvc-grand-amt .pvc-dh { height: .82em; vertical-align: -.06em; opacity: .94; }
@media (max-width: 380px) { .pvc-calc .pvc-grand-amt { font-size: 1.45rem; } }

/* legacy breakdown / total (used by some flows) */
.pvc-calc .pvc-breakdown { background: var(--pvc-card); border: 1.5px solid var(--pvc-line); border-radius: var(--pvc-r-card); box-shadow: var(--pvc-shadow-card); overflow: hidden; margin-bottom: 12px; }
.pvc-calc .pvc-group-head { background: transparent; color: var(--pvc-ink-3); border-bottom: none; padding: 16px 16px 6px; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.pvc-calc .pvc-line { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-size: .88rem; border-top: 1px solid var(--pvc-line); }
.pvc-calc .pvc-breakdown .pvc-group-head:first-child { padding-top: 13px; }
.pvc-calc .pvc-line-name { color: var(--pvc-ink-2); padding-right: 12px; }
.pvc-calc .pvc-line-val { font-weight: 700; color: var(--pvc-ink); white-space: nowrap; font-feature-settings: "tnum" 1; }
.pvc-calc .pvc-line.pvc-subtotal { background: var(--pvc-fill); }
.pvc-calc .pvc-line.pvc-subtotal .pvc-line-name { color: var(--pvc-ink); font-weight: 700; }
.pvc-calc .pvc-line.pvc-subtotal .pvc-line-val { color: var(--pvc-ink); font-weight: 800; }
.pvc-calc .pvc-total {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--pvc-accent-ink) 0%, var(--pvc-accent) 70%, var(--pvc-accent-2) 100%);
  border-radius: var(--pvc-r-card); padding: 20px 22px; margin-top: 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  color: #fff; box-shadow: 0 16px 36px -16px var(--pvc-accent);
}
.pvc-calc .pvc-total::after { content: ""; position: absolute; right: -22px; top: -32px; width: 104px; height: 104px; border-radius: 50%; background: rgba(255,255,255,.14); }
.pvc-calc .pvc-total > div:first-child { min-width: 0; flex: 1; z-index: 1; }
.pvc-calc .pvc-total-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; opacity: .85; font-weight: 800; }
.pvc-calc .pvc-total-sub { font-size: .88rem; font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pvc-calc .pvc-total-amount { font-size: 1.8rem; font-weight: 800; letter-spacing: -.035em; text-align: right; flex-shrink: 0; z-index: 1; font-feature-settings: "tnum" 1; }
.pvc-calc .pvc-total-amount span { font-size: .82rem; font-weight: 600; opacity: .8; }
@media (max-width: 380px) { .pvc-calc .pvc-total-amount { font-size: 1.5rem; } }

/* actions area: divider, then buttons, then the Google-review credential */
.pvc-calc .pvc-cta-divider { height: 1px; background: var(--pvc-line); margin: 22px 2px 6px; }
.pvc-calc .pvc-trust {
  margin-top: 18px; padding: 0 10px;
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.pvc-calc .pvc-trust .pvc-g-icon { width: 16px; height: 16px; flex-shrink: 0; }
.pvc-calc .pvc-trust .pvc-stars { color: #f5a623; letter-spacing: 1px; font-size: .92rem; }
.pvc-calc .pvc-trust b { color: var(--pvc-ink); font-weight: 800; font-size: .9rem; }
.pvc-calc .pvc-trust-count { color: var(--pvc-ink-2); font-weight: 600; font-size: .88rem; }

/* ============================================================
   7 · ACTION BUTTONS ON RESULT  (WhatsApp / share / compare / restart)
   ============================================================ */
.pvc-calc .pvc-cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 12px; padding: 16px; min-height: 56px;
  background: linear-gradient(135deg, #25D366 0%, #1ebe57 100%); color: #fff;
  font-size: 1rem; font-weight: 800; letter-spacing: -.01em; text-align: center; text-decoration: none;
  border: none; border-radius: var(--pvc-r-btn); cursor: pointer;
  box-shadow: 0 12px 28px -12px rgba(37,211,102,.7);
  transition: transform .14s var(--pvc-ease), box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.pvc-calc .pvc-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(37,211,102,.7); }
.pvc-calc .pvc-cta:active { transform: translateY(0) scale(.985); }
.pvc-calc .pvc-cta svg { width: 22px; height: 22px; flex-shrink: 0; }

.pvc-calc .pvc-copy {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; margin-top: 10px; padding: 16px; min-height: 56px;
  background: var(--pvc-ink); color: #fff;
  font-size: 1rem; font-weight: 800; letter-spacing: -.01em; text-align: center;
  border: none; border-radius: var(--pvc-r-btn); cursor: pointer; font-family: inherit;
  box-shadow: 0 10px 24px -14px rgba(15,27,45,.6);
  transition: transform .14s var(--pvc-ease), box-shadow .2s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.pvc-calc .pvc-copy:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(15,27,45,.6); }
.pvc-calc .pvc-copy:active { transform: translateY(0) scale(.985); }
.pvc-calc .pvc-copy.pvc-copied { background: var(--pvc-accent-ink); }
.pvc-calc .pvc-copy-hint { text-align: center; font-size: .72rem; color: var(--pvc-ink-3); margin-top: 6px; line-height: 1.4; padding: 0 12px; }

.pvc-calc .pvc-compare-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 9px; padding: 15px; min-height: 50px;
  background: var(--pvc-card); color: var(--pvc-accent);
  font-size: .96rem; font-weight: 700; text-align: center;
  border: 1.5px solid var(--pvc-line); border-radius: var(--pvc-r-btn); cursor: pointer; font-family: inherit;
  transition: background .15s ease, transform .12s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.pvc-calc .pvc-compare-btn:hover { border-color: var(--pvc-accent); transform: translateY(-1px); }
.pvc-calc .pvc-compare-wrap { display: none; margin-top: 12px; }
.pvc-calc .pvc-compare-wrap.pvc-show { display: block; animation: pvcScreenIn .35s var(--pvc-ease); }
.pvc-calc .pvc-cmp { width: 100%; border-collapse: collapse; border: 1.5px solid var(--pvc-line); border-radius: var(--pvc-r-card); overflow: hidden; background: var(--pvc-card); }
.pvc-calc .pvc-cmp thead th { background: var(--pvc-fill); color: var(--pvc-ink-2); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 11px 12px; text-align: right; }
.pvc-calc .pvc-cmp thead th:first-child { text-align: left; }
.pvc-calc .pvc-cmp td { font-size: .84rem; padding: 10px 12px; border-top: 1px solid var(--pvc-line); text-align: right; color: var(--pvc-ink); font-feature-settings: "tnum" 1; }
.pvc-calc .pvc-cmp td:first-child { text-align: left; color: var(--pvc-ink-2); font-feature-settings: normal; }
.pvc-calc .pvc-cmp tr.pvc-cmp-total td { font-weight: 800; background: var(--pvc-fill); color: var(--pvc-ink); border-top: 2px solid var(--pvc-line-2); }
.pvc-calc .pvc-cmp .pvc-cmp-diy { color: #15803d; font-weight: 800; }
.pvc-calc .pvc-cmp-save { margin-top: 10px; padding: 12px 14px; background: #e7f5ec; border-radius: var(--pvc-r-card); font-size: .84rem; color: #0c5128; line-height: 1.5; }
.pvc-calc .pvc-cmp-save strong { color: #0c5128; font-weight: 800; }


.pvc-calc .pvc-note,
.pvc-calc .pvc-disclaimer {
  margin-top: 12px; padding: 13px 15px;
  background: var(--pvc-accent-soft); color: var(--pvc-ink);
  border-radius: var(--pvc-r-card); font-size: .8rem; line-height: 1.55;
}
.pvc-calc .pvc-note strong { color: var(--pvc-accent-ink); font-weight: 800; }
.pvc-calc .pvc-disclaimer {
  margin-top: 20px; padding: 14px 10px 0; background: none; border-radius: 0;
  border-top: 1px solid var(--pvc-line);
  color: var(--pvc-ink-3); font-size: .72rem; line-height: 1.5; text-align: center;
}
.pvc-calc .pvc-disclaimer strong { color: var(--pvc-ink-2); }

/* ============================================================
   8 · LAUNCH CARD  (optional trigger on the host page)
   ============================================================ */
.pvc-launch {
  --pvc-r-card: 22px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  max-width: 480px; margin: 0 auto; padding: 20px 22px; cursor: pointer;
  background: linear-gradient(135deg, #b81a2c 0%, #e0394d 100%); color: #fff;
  border-radius: var(--pvc-r-card); display: flex; align-items: center; gap: 16px;
  box-shadow: 0 16px 38px -12px rgba(184,26,44,.5);
  transition: transform .16s cubic-bezier(.22,1,.36,1), box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  user-select: none; -webkit-user-select: none; position: relative; overflow: hidden;
}
.pvc-launch * { box-sizing: border-box; }
.pvc-launch::after { content: ""; position: absolute; right: -30px; top: -42px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.14); }
.pvc-launch:hover { transform: translateY(-3px); box-shadow: 0 22px 44px -12px rgba(184,26,44,.55); }
.pvc-launch:active { transform: translateY(0) scale(.99); }
.pvc-launch-icon { width: 54px; height: 54px; flex-shrink: 0; border-radius: 16px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); z-index: 1; }
.pvc-launch-icon svg { width: 28px; height: 28px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pvc-launch-text { flex: 1; min-width: 0; z-index: 1; }
.pvc-launch-title { font-size: 1.16rem; font-weight: 800; letter-spacing: -.02em; }
.pvc-launch-sub { font-size: .82rem; opacity: .92; margin-top: 3px; font-weight: 500; }
.pvc-launch-arrow { font-size: 1.5rem; font-weight: 700; color: #fff; flex-shrink: 0; z-index: 1; transition: transform .2s var(--pvc-ease); }
.pvc-launch:hover .pvc-launch-arrow { transform: translateX(4px); }

/* ============================================================
   9 · RESPONSIVE + MOTION PREFERENCES
   ============================================================ */
@media (min-width: 600px) {
  /* on desktop the sheet still rises from the bottom, just width-capped & centered */
  .pvc-overlay-panel { height: 90vh; height: 90dvh; box-shadow: 0 30px 80px rgba(8,16,28,.4); }
}
@media (max-width: 380px) {
  .pvc-calc .pvc-question { font-size: 1.42rem; }
  .pvc-calc .pvc-result-head h3 { font-size: 1.38rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pvc-overlay-panel,
  .pvc-overlay-backdrop,
  .pvc-calc .pvc-screen.pvc-show,
  .pvc-calc .pvc-screen.pvc-show .pvc-options .pvc-option,
  .pvc-calc .pvc-check,
  .pvc-calc .pvc-option.pvc-selected::after { animation: none !important; }
  .pvc-overlay-panel, .pvc-calc * { transition-duration: .01ms !important; }
}
