/* Interactive quote builder — client experience.
   State for the build-menu option rows is driven entirely by [aria-checked]
   so the Stimulus controller flips state with a single attribute. The accent
   colour comes from --qb-accent, set inline on the build-menu wrapper. */

.qb-option {
  cursor: pointer;
  border: 1.5px solid var(--xv-line);
  background: #fff;
}
.qb-option[aria-checked="true"] {
  border-color: var(--qb-accent);
  background: rgba(142, 184, 223, 0.13);
}
/* mandatory option — always selected, not togglable by the client */
.qb-option--locked {
  cursor: default;
}

.qb-option .qb-control {
  background: #fff;
  border: 1.5px solid #B9C0CC;
}
.qb-option[aria-checked="true"] .qb-control {
  background: var(--qb-accent);
  border-color: var(--qb-accent);
}

.qb-option .qb-check {
  display: none;
}
.qb-option[aria-checked="true"] .qb-check {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .qb-option {
    transition: border-color 0.15s, background 0.15s;
  }
}

/* --- Ongoing-care tier cards (single-select; the navy highlight follows the
   SELECTED tier — driven entirely by [aria-checked], same as .qb-option) --- */
.qb-tier {
  position: relative;
  border-radius: 12px;
  padding: 22px 20px;
  background: #fff;
  border: 1px solid var(--xv-line);
}
.qb-tier[role="button"] {
  cursor: pointer;
}
.qb-tier[aria-checked="true"] {
  background: #091435;
  border: 2px solid var(--qb-accent, #8EB8DF);
}
.qb-tier__name { color: #091435; }
.qb-tier__price { color: #091435; }
.qb-tier__mo { color: var(--fg-3); }
.qb-tier__blurb { color: var(--fg-2); }
.qb-tier__feat { color: #241F21; }
.qb-tier[aria-checked="true"] .qb-tier__name { color: #fff; }
.qb-tier[aria-checked="true"] .qb-tier__price { color: var(--qb-accent, #8EB8DF); }
.qb-tier[aria-checked="true"] .qb-tier__mo { color: rgba(255, 255, 255, 0.5); }
.qb-tier[aria-checked="true"] .qb-tier__blurb { color: rgba(255, 255, 255, 0.72); }
.qb-tier[aria-checked="true"] .qb-tier__feat { color: rgba(255, 255, 255, 0.92); }
.qb-tier .qb-tier__check {
  display: none;
}
.qb-tier[aria-checked="true"] .qb-tier__check {
  display: flex;
}
@media (prefers-reduced-motion: no-preference) {
  .qb-tier {
    transition: background 0.15s, border-color 0.15s;
  }
}

/* tier card grid: ~3 across, responsive, stacks on narrow + print */
.qb-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
@media (max-width: 640px) {
  .qb-tiers { grid-template-columns: 1fr; }
}
@media print {
  .qb-tiers { grid-template-columns: repeat(3, 1fr); }
  .qb-tier  { break-inside: avoid; }
}

/* static "Recommended" pill — marks the studio default, independent of selection */
.qb-tier__badge {
  position: absolute;
  top: -10px;
  left: 16px;
  font: 700 10px/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #091435;
  background: var(--qb-accent, #8EB8DF);
  padding: 5px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

/* selection check (top-right), shown only on the live-selected card */
.qb-tier__check {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--qb-accent, #8EB8DF);
}

/* --- Public configurable page chrome --- */
.qb-page {
  background: var(--xv-mist);
  min-height: 100vh;
}
.qb-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto 18px;
  padding: 0 4px;
}
.qb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 13.5px var(--font-body);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  text-decoration: none;
  border: 1.5px solid var(--xv-line);
  background: #fff;
  color: var(--xv-navy);
}
.qb-btn:hover {
  background: var(--xv-mist);
}
.qb-btn-primary {
  background: #091435;
  border-color: #091435;
  color: #fff;
}
.qb-btn-primary:hover {
  opacity: 0.92;
  background: #091435;
}
.qb-banner {
  max-width: 820px;
  margin: 0 auto 18px;
  padding: 16px 22px;
  border-radius: 12px;
  background: var(--xv-sky-soft, rgba(142, 184, 223, 0.13));
  border: 1px solid var(--xv-sky, #8EB8DF);
  color: var(--xv-navy);
  font: 500 14.5px/1.5 var(--font-body);
}
.qb-submit {
  max-width: 820px;
  margin: 18px auto 0;
  padding: 22px 0 8px;
}

/* --- Print / Save-PDF: just the document (hide page chrome + the website nav/footer) --- */
@media print {
  .qb-toolbar,
  .qb-submit,
  .qb-comments,
  .qb-banner,
  .xv-nav,
  .xv-footer {
    display: none !important;
  }
  .quote-document {
    box-shadow: none !important;
    border-radius: 0 !important;
    max-width: none !important;
  }
  body {
    background: #fff !important;
  }
  @page {
    size: A4;
    margin: 13mm;
  }
}

/* --- Monthly / Yearly billing toggle for the ongoing section ---
   .qb-mo-* shows in monthly mode (default), .qb-yr-* when the article carries
   data-billing-mode="yearly". `revert` keeps the element's own display (the
   price spans are inline, the total blocks are block). --- */
/* !important so the hide beats the cards' inline `display:flex` on .qb-mo-price */
.qb-yr-price { display: none !important; }
[data-billing-mode="yearly"] .qb-mo-price { display: none !important; }
[data-billing-mode="yearly"] .qb-yr-price { display: revert !important; }
.qb-yr-total { display: none !important; }
[data-billing-mode="yearly"] .qb-mo-total { display: none !important; }
[data-billing-mode="yearly"] .qb-yr-total { display: revert !important; }

.qb-billing-toggle {
  display: inline-flex;
  gap: 2px;
  margin-bottom: 22px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(142, 184, 223, 0.13);
  border: 1px solid var(--xv-line);
}
.qb-billing-opt {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 7px 16px;
  border-radius: 999px;
  font: 600 13px var(--font-body);
  color: var(--fg-2);
}
.qb-billing-opt--on { background: #091435; color: #fff; }
@media print { .qb-billing-toggle { display: none !important; } }
