/* ================================================================
   NOTE: This is the copy the .NET app serves, via a <link> in
   Web/Views/Shared/_Layout.cshtml. Vite never sees wwwroot, so the FE
   keeps its own copy at Web.FE/src/site/multistep-form/multistep.css
   (imported from index.css) to style the FormBlock widget in the dev
   app and Storybook. Keep the two in sync — change one, change both.

   Multistep / Singlestep form — behavioural CSS only.
   Visual styling lives in the Tailwind utilities applied to JSX in
   Web.FE/src/components/bridge/sections/multistep/Multistep.tsx and
   Web.FE/src/components/bridge/widgets/multistep-form/MultistepForm.tsx.

   Rules here are the ones Tailwind utilities can't replicate
   cleanly: step pseudo-element icons, connector lines, and the
   .active / :not(.active) toggles JS depends on
   (Web.FE/src/site/multistep-form/navigation.ts).
   ================================================================ */

.form-block--wrapper form[method="post"] {
  padding: 0;
}

@media (max-width: 768px) {
  .form-block--wrapper form[method="post"] {
    max-width: calc(100vw - 20px);
  }
}

/* -------------------- Titles --------------------
   FormBlock used to render its own `.form-block--intro-content` heading AND show the
   `.form-block--header` that comes inside the injected form markup, so every form had
   two stacked titles. The widget now renders the shared <TitleAndDescription>
   component instead (matching every other widget, including its bgColor-driven
   colours), so the intro-content rules are gone and the inner header is hidden.

   `.form-block--header` is presentational only — it repeats the form's CMS name and
   description. Each field keeps its own <label>, so hiding it loses nothing
   accessible. FormBlock.tsx applies the same rule for the React path. */
.form-block--wrapper .form-block--header {
  display: none;
}

/* -------------------- Modal Form -------------------- */
.multistep-form--modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(40, 55, 70, 0.45);
  overflow: auto;
}

.multistep-form--modal[hidden] {
  display: none;
}

.multistep-form--modal__panel {
  position: relative;
  width: min(100%, 850px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #f5f5f5;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(40, 55, 70, 0.28);
}

/* Inner gutter is set on the form <section> in FormBlock.tsx (p-5 = 20px when
   isModal). Kept here only as a fallback so server-rendered modals without the
   React padding still get a sane 20px gutter. */
.multistep-form--modal-content {
  padding: 20px;
}

.multistep-form--modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #283746;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(40, 55, 70, 0.18);
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.multistep-form--modal__close:hover {
  background: #283746;
  color: #fff;
}

.multistep-form--modal__close:focus-visible {
  outline: 2px solid #283746;
  outline-offset: 2px;
}

/* Keep the title clear of the absolute close button (top-right). */
.multistep-form--modal-content > div:first-child {
  padding-right: 44px;
}

/* -------------------- Multistep Form -------------------- */
.multistep-form--box-container {
  max-width: 792px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .multistep-form--box-container {
    flex-direction: row;
    gap: 15px;
    justify-content: space-between;
  }
}

.multistep-form--steps-block {
  margin-bottom: 32px;
}

@media (min-width: 640px) {
  .multistep-form--steps-block {
    width: 221px;
    margin-bottom: 0;
  }
}

.multistep-form--steps-block ul {
  position: relative;
}

.multistep-form--steps-block ul li {
  position: relative;
  padding: 40px 10px 0;
  flex: 1;
}

@media (min-width: 640px) {
  .multistep-form--steps-block ul li {
    padding: 2px 0 2px 48px;
  }
}

.multistep-form--steps-block ul li::before {
  content: "";
  position: absolute;
  width: 32px;
  height: 32px;
  background: url("/images/icons/completed-check.svg") no-repeat center / 32px
    32px;
  left: 50%;
  margin-left: -16px;
  top: 0;
  z-index: 2;
}

@media (min-width: 640px) {
  .multistep-form--steps-block ul li::before {
    left: 0;
    margin-left: 0;
  }
}

/* Mobile: horizontal dashed segment sitting in the GAP between this icon and the
   NEXT visible icon — not running under either circle. Columns are equal-width
   (flex: 1) so the next centre is exactly one column to the right; the icons are
   32px wide (16px radius), so we inset each end of the line by 16px:
     left  = this centre + 16px  (this icon's right edge)
     right = next centre − 16px  → 150% − 16px, i.e. right inset of (−50% + 16px)
   This is robust no matter how many steps show or how the window reorders them. */
.multistep-form--steps-block ul li::after {
  content: "";
  position: absolute;
  top: 15px;
  left: calc(50% + 16px);
  right: calc(-50% + 16px);
  height: 0;
  border-top: 2px dashed var(--color-neutral-grey-500);
  z-index: 1;
}

/* Desktop: vertical dashed segment from below this icon all the way to
   the next icon. Bottom offset matches the JSX `sm:mb-16` (64px) gap.
   640px == Tailwind's `sm` breakpoint, which the JSX layout switches on. */
@media (min-width: 640px) {
  .multistep-form--steps-block ul li::after {
    top: 32px;
    bottom: -64px;
    left: 15px;
    right: auto;
    width: 0;
    height: auto;
    border-top: 0;
    border-left: 2px dashed var(--color-neutral-grey-500);
  }
}

/* No connector after the last step. */
.multistep-form--steps-block ul li:last-child::after {
  display: none;
}

/* Mobile sliding window shows up to 3 steps. Hide the connector on the visually
   LAST item of the window so the dashed line never runs into empty space. Which
   item is last depends on where the window sits:
     - middle  (active has a prev): last = next        → li.active + li
     - start   (active is first):   last = next-next   → li.active:first-child + li + li
     - end     (active is last):    last = active      → li.active:last-child
   In the start case the immediate `next` is NOT last, so its connector must stay
   visible — hence the :not(:first-child) guard on the middle rule. */
@media (max-width: 639px) {
  /* middle/end: connector after the immediate next, unless this is the start case */
  .multistep-form--steps-block ul li.active:not(:first-child) + li::after {
    display: none;
  }

  /* start: connector after the second-next (the 3rd visible icon) */
  .multistep-form--steps-block ul li.active:first-child + li + li::after {
    display: none;
  }

  /* end: active is the final step, nothing after it */
  .multistep-form--steps-block ul li.active:last-child::after {
    display: none;
  }
}

/* Step state icons. Connector stays dashed grey across all states. */
.multistep-form--steps-block ul li.prev::before {
  background-image: url("/images/icons/completed-check-form.svg");
}

.multistep-form--steps-block ul li.active::before {
  background-image: url("/images/icons/active-check.svg");
}

/* -------------------- Sidebar step label states --------------------
   The JSX in sections/multistep/Multistep.tsx sets these via Tailwind
   `[&.active]:` variants, but the same markup also arrives as an HTML string
   (server-rendered, injected with dangerouslySetInnerHTML) where Tailwind's
   scanner never sees the class names. Declaring them here covers both paths. */
.multistep-form--steps-block ul li {
  color: var(--color-neutral-grey-700);
}

.multistep-form--steps-block ul li.active,
.multistep-form--steps-block ul li.prev {
  color: var(--color-neutral-grey-800);
}

/* On the purple background the same labels need to be light to stay legible. */
[data-bg-color="primary"] .multistep-form--steps-block ul li {
  color: rgb(255 255 255 / 0.8);
}

[data-bg-color="primary"] .multistep-form--steps-block ul li.active,
[data-bg-color="primary"] .multistep-form--steps-block ul li.prev {
  color: #fff;
}

/* Step titles inside each panel ("Your Details") use text-primary-1 — too dark on the
   purple background. The widget title itself is handled by <TitleAndDescription>'s
   own colorType prop, so it needs no override here. */
[data-bg-color="primary"] .multistep-form--form-block__step .step__title {
  color: #fff;
}

/* The required-fields notice under each step title ("Fields marked with an asterisk
   (*) are required.") defaults to text-neutral-grey-700, which is unreadable on purple.

   Multistep.tsx already flips it to white when ITS OWN `bgColor` prop is "primary" —
   but that prop never arrives. _MultistepSection.cshtml builds the React props from
   MultistepSectionViewModel, which has no bgColor: the colour lives on the FormBlock
   WIDGET, and the section renders inside RenderNestedWidgetAsync, so there is no prop
   path from one to the other. The section therefore always falls back to "white".

   Keying off the `data-bg-color` attribute FormBlock.tsx sets on the wrapping <section>
   fixes both render paths at once, since the notice is always a descendant of it.
   Same reason the step title above is handled here rather than in the component. */
[data-bg-color="primary"] .step__required-fields-notice {
  color: rgb(255 255 255 / 0.8);
}

/* -------------------- Step content visibility (JS-driven) -------------------- */
.multistep-form--form-block__step:not(.active) {
  display: none;
  pointer-events: none;
}

.multi-step-form > .disclaimer {
  display: none;
}

.multi-step-form .multi-step-form__actions__submit:not(.active) {
  display: none;
}

.singlestep-form--form-block:not(.active) {
  display: none;
  pointer-events: none;
}

/* -------------------- Scroll anchor offset (sticky header) -------------------- */
[name="thank-you-message"],
[data-name="thank-you"],
.formwidget-submit-text,
.singlestep-form--form-block,
.multistep-form--form-block__step,
.multistep-form--form-block__step .step__title {
  scroll-margin-top: 120px;
}

.multistep-form--modal__panel [data-name="thank-you"],
.multistep-form--modal__panel .formwidget-submit-text,
.multistep-form--modal__panel .multistep-form--form-block__step,
.multistep-form--modal__panel .step__title {
  scroll-margin-top: 20px;
}

/* -------------------- Review section (server-rendered by review.ts) --------------------
   The review HTML is injected as innerHTML into [data-name="review-container"].
   We can't reliably style it via Tailwind arbitrary variants because of underscore
   escaping quirks, so the layout rules live here as plain CSS. */

.step__review-list {
  display: flex;
  flex-direction: column;
}

.step__review-list__item {
  border-top: 1px solid var(--color-neutral-grey-400);
  padding: 16px 0;
}

.step__review-list__item:first-child {
  border-top: 0;
  padding-top: 0;
}

.step__review-list__item .item__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
  font-weight: 700;
  color: var(--color-neutral-grey-800);
  margin: 0;
}

.step__review-list__item .item__title a {
  margin-left: auto;
  cursor: pointer;
  font-size: var(--text-body-xs-size);
  line-height: var(--text-body-xs-line-height);
  font-weight: 600;
  color: var(--color-pink1);
  text-decoration: underline;
}

.step__review-list__item .item__title a:hover {
  text-decoration: none;
  color: var(--color-pink2);
}

.step__review-list__item .item__info {
  margin-top: 8px;
  font-size: var(--text-body-xs-size);
  line-height: 1.5;
  color: var(--color-neutral-grey-700);
}

/* On the purple background the greys above are unreadable — flip the review text to
   white, and lighten the row divider so it stays visible against the dark card.
   The Edit links keep their brand pink, which has sufficient contrast on purple. */
[data-bg-color="primary"] .step__review-list__item .item__title {
  color: #fff;
}

[data-bg-color="primary"] .step__review-list__item .item__info {
  color: rgb(255 255 255 / 0.8);
}

[data-bg-color="primary"] .step__review-list__item {
  border-top-color: rgb(255 255 255 / 0.2);
}

/* The consent paragraph next to the review checkbox is a plain <p>, so it inherits the
   body colour rather than a label colour — flip it too. */
[data-bg-color="primary"] .disclaimer {
  color: #fff;
}

/* -------------------- Thank-you step --------------------
   Shown after the form is submitted. Centered, generous spacing. */

[data-name="thank-you"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 16px;
  text-align: center;
}

[data-name="thank-you"] > div {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

[data-name="thank-you"] .step__title {
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line-height);
  font-weight: 700;
  color: var(--color-purple1);
  margin: 0;
}

/* Check icon — anchored on the container, not the title, so it shows above the
   message whether or not it carries a heading. The CMS "Thank you" message is
   rich text that may be a plain paragraph with no .step__title, in which case a
   title-anchored icon never fired. As a flex child it centers (align-items) and
   the container's 16px gap spaces it from the message. Mirrors the single-step
   .formwidget-submit-text icon so both confirmation states match. */
[data-name="thank-you"]::before {
  content: "";
  display: block;
  width: 64px;
  height: 64px;
  background: url("/images/icons/active-check.svg") no-repeat center / contain;
}

[data-name="thank-you"] p {
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
  color: var(--color-neutral-grey-800);
  margin: 0;
}

/* Same flip on the purple background — the purple title and dark grey body copy above
   are both unreadable there. */
[data-bg-color="primary"] [data-name="thank-you"] .step__title {
  color: #fff;
}

[data-bg-color="primary"] [data-name="thank-you"] p {
  color: rgb(255 255 255 / 0.8);
}

/* -------------------- Single-step submit message --------------------
   Single-step forms don't run the multistep JS. After submit, Kentico's AJAX
   replaces the <form> in place with `.formwidget-submit-text`, which stays inside
   the same FormBlock section (so the [data-bg-color] variant below still applies).
   This gives that raw message the same centered, check-icon treatment the multistep
   [data-name="thank-you"] step gets. The text comes from the form's submission
   display text in the CMS, so it may be a plain string (no heading) or rich text
   with a heading — the rules below cover both. */

.formwidget-submit-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 560px;
  margin-inline: auto;
  padding: 48px 16px;
  text-align: center;
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
  color: var(--color-neutral-grey-800);
}

/* Check icon sits above the message whether or not it carries a heading. */
.formwidget-submit-text::before {
  content: "";
  display: block;
  width: 64px;
  height: 64px;
  background: url("/images/icons/active-check.svg") no-repeat center / contain;
}

/* Heading, when the CMS message is rich text — brand H3, matching the multistep
   thank-you title. */
.formwidget-submit-text :is(h1, h2, h3, h4, .step__title) {
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line-height);
  font-weight: 700;
  color: var(--color-purple1);
  margin: 0;
}

.formwidget-submit-text p {
  margin: 0;
}

/* Same flip on the purple background as the thank-you step above. */
[data-bg-color="primary"] .formwidget-submit-text {
  color: rgb(255 255 255 / 0.8);
}

[data-bg-color="primary"] .formwidget-submit-text :is(h1, h2, h3, h4, .step__title) {
  color: #fff;
}

/* -------------------- Select trigger (combobox) focus ring --------------------
   shadcn's <Select> trigger uses a faint ring colour by default. Override with
   the brand pink (primary-4) so keyboard focus is clearly visible.

   Two cases:
   1) Plain in-form select (e.g. "What is your enquiry?") → paint ring on the
      trigger itself.
   2) Inside .complex-field--unit (e.g. "in kWh" / "in € / Euro") → the wrapper
      already provides the visible border/ring; trigger keeps its own ring too
      as a fallback in case :has() isn't supported. */

.form-block--wrapper [data-slot="select-trigger"]:focus-visible,
.form-block--wrapper [data-slot="select-trigger"]:focus,
.multistep-form--wrapper [data-slot="select-trigger"]:focus-visible,
.multistep-form--wrapper [data-slot="select-trigger"]:focus {
  outline: 2px solid var(--color-pink1) !important;
  outline-offset: 2px !important;
  border-color: var(--color-pink1) !important;
}

/* complex-field--unit: also light up the wrapper so the ring surrounds the
   whole composite control (number input + unit selector). */
.complex-field--unit:has(input:focus-visible),
.complex-field--unit:has(input:focus),
.complex-field--unit:has([data-slot="select-trigger"]:focus-visible),
.complex-field--unit:has([data-slot="select-trigger"]:focus) {
  border-color: var(--color-pink1);
  outline: 2px solid var(--color-pink1);
  outline-offset: 0;
}

/* Inner number input keeps its own ring stripped — wrapper provides the focus. */
.complex-field--unit input:focus-visible,
.complex-field--unit input:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

/* -------------------- Server-rendered submit button --------------------
   The submit button is a shadcn <Button variant="primary"> with class
   "multi-step-form__actions__submit". The variant defaults to size="default"
   (h-9 px-2.5) — smaller than the JSX Next/Back buttons. Force the same
   sizing as Button variant="primary" with size="none". */

.multi-step-form__actions__submit {
  height: auto !important;
  gap: 8px !important;
  padding: var(--spacing-semantic-button-padding-y-default, 16px)
    var(--spacing-semantic-button-padding-x-compact, 24px) !important;
  /* SubmitButton.tsx always adds mt-8; cancel it so the button aligns with the
     JSX Back button in the multistep actions row. */
  margin-top: 0 !important;
}

/* -------------------- Step card --------------------
   `.step__fields` wraps every row of a step so the step renders as ONE continuous card,
   matching the single-step form's `.ktc-default-section`, rather than one card per row.
   The step title sits above it and the nav buttons below, both outside the card.
   FormBlock.tsx applies the same via Tailwind for the React path; declared here for the
   server-rendered markup, where the scanner never sees those utilities. */
.form-block--wrapper .step__fields {
  display: flex;
  flex-direction: column;
  gap: 24px;
  /* Matches Tailwind's `rounded-md` on the single-step card, which resolves to
     calc(var(--radius) - 2px) — not a flat 8px. */
  border-radius: calc(var(--radius) - 2px);
  padding: 20px 16px;
}

/* Card background flips against the section bgColor for contrast — same values
   FormBlock.tsx uses for the single-step `.ktc-default-section`. */
[data-bg-color="white"] .step__fields {
  background-color: #e4e8ec;
}

[data-bg-color="grey"] .step__fields {
  background-color: #fff;
}

[data-bg-color="primary"] .step__fields {
  background-color: rgb(255 255 255 / 0.05);
}

/* -------------------- Rich text inside a field, on purple --------------------
   The Information form component (Web/Views/Shared/FormComponents/_Information.cshtml)
   renders its HtmlContent raw into the field's component wrapper — an unclassed <div>
   inside `.form-field`. Those block tags inherit the near-black body colour, which is
   unreadable against the purple section. FormBlock.tsx applies the same via Tailwind
   for the React path; declared here for server-rendered pages, where the scanner never
   sees those utilities.

   Scoped to `.form-field`, not `.editing-form-control-nested-control`: that class only
   exists in Kentico's form-builder preview, never on a live page. */
[data-bg-color="primary"] .form-field :is(p, ul, ol, li, strong, em, span),
[data-bg-color="primary"] .form-field :is(h1, h2, h3, h4, h5, h6) {
  color: #fff;
}

/* Links need to stay distinguishable from the white body copy. Same treatment
   TitleAndDescription uses on primary — the usual purple link colour would match
   the background here, so use the brand pink with an underline. */
[data-bg-color="primary"] .form-field a {
  color: var(--color-pink3);
  text-decoration: underline;
}

/* Walk back the controls: these sit on their own white fill and keep dark text. */
[data-bg-color="primary"] .form-field :is(input, select, textarea) {
  color: var(--color-neutral-grey-800);
}

/* Validation messages keep the alert red — white would drop the error cue. */
[data-bg-color="primary"] .form-field .field-validation-error {
  color: var(--color-alert-red500);
}

/* Rows are layout only — the card above owns radius/background/padding. */
.form-block--wrapper .step__grid-row {
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-radius: 0;
  background: none;
  padding: 0;
}

@media (min-width: 640px) {
  .form-block--wrapper .step__grid-row {
    flex-direction: row;
  }
}

/* Cells share the row equally (`flex: 1`) and stack their fields with 24px between
   them. `min-width: 0` lets a cell shrink below its content's intrinsic width, which
   flex items otherwise refuse to do — without it a long placeholder keeps the cell
   wider than its half and the inputs stop lining up.

   NOTE: this can't live in FormBlock.tsx as a `[&_.step\_\_grid-row\_\_cell]:` variant.
   Tailwind's escaped-underscore arbitrary variants don't produce a matching selector
   for these BEM names (verified: zero rules matched), which is why the inputs rendered
   at half width. Same reason the nav buttons are styled here. */
.form-block--wrapper .step__grid-row__cell {
  display: flex;
  flex: 1 1 0%;
  min-width: 0;
  flex-direction: column;
  gap: 24px;
}

/* Inputs fill their cell. The cell is the column, so 100% here means "full width of
   whatever column this field sits in" — full row for a 1-column row, half for two. */
.form-block--wrapper .step__grid-row__cell .form-field,
.form-block--wrapper .step__grid-row__cell .form-field > div {
  width: 100%;
}

/* Nav buttons sit outside the card; align them with the card's background edge. */
.form-block--wrapper .multistep-form--form-block__step__actions {
  padding-left: 0;
  padding-right: 0;
}

/* -------------------- Step nav buttons (Next / Back / Submit) --------------------
   When the step markup comes from the JSX in sections/multistep/Multistep.tsx these
   are styled by Tailwind utilities on the elements themselves. When the SAME markup
   arrives as a server-rendered HTML string (injected via dangerouslySetInnerHTML)
   only the BEM class names survive — Tailwind's scanner never sees utilities inside
   an HTML string, so nothing is generated for them.

   FormBlock.tsx tries to cover this with `[&_.primary\_button]:…` arbitrary
   variants, but the escaped underscore doesn't produce a matching selector, so the
   buttons render completely unstyled. Declaring them here is the reliable path and
   matches how the review list is handled above. */

.form-block--wrapper .primary_button,
.form-block--wrapper .button--pink-brdr,
.form-block--wrapper .multi-step-form__actions__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Matches Tailwind's `rounded-sm` on the single-step submit button, which resolves
     to calc(var(--radius) - 4px) — not the raw --radius-sm token. */
  border-radius: calc(var(--radius) - 4px);
  padding: var(--spacing-semantic-button-padding-y-default, 16px)
    var(--spacing-semantic-button-padding-x-compact, 24px);
  font-size: var(--text-button-size, 16px);
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

/* Only the outline (Back) variant carries a border; the filled buttons must have none,
   or the ::before overlay bleeds through the border box and draws a pink hairline that
   the single-step submit button doesn't have. */
.form-block--wrapper .primary_button,
.form-block--wrapper .multi-step-form__actions__submit {
  border: 0;
}

.form-block--wrapper .button--pink-brdr {
  border: 1px solid transparent;
}

/* Primary (Next / Submit) — filled brand pink.
   Hover matches the `btn-primary` utility in Web.FE/src/index.css, which the
   single-step submit button uses: a 20% black overlay painted by a ::before that
   fades in over 0.3s, rather than a flat background swap. Replicated here so the
   server-rendered Next/Back/Submit buttons hover identically to the JSX ones. */
.form-block--wrapper .primary_button,
.form-block--wrapper .multi-step-form__actions__submit {
  position: relative;
  overflow: hidden;
  z-index: 0;
  background-color: var(--color-primary-4);
  color: #fff;
}

.form-block--wrapper .primary_button::before,
.form-block--wrapper .multi-step-form__actions__submit::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  background:
    linear-gradient(
      0deg,
      color-mix(in oklch, var(--color-neutral-black) 20%, transparent) 0%,
      color-mix(in oklch, var(--color-neutral-black) 20%, transparent) 100%
    ),
    var(--color-primary-4);
}

.form-block--wrapper .primary_button:hover::before,
.form-block--wrapper .multi-step-form__actions__submit:hover::before {
  opacity: 1;
}

/* Secondary (Back) — pink outline that fills on hover, then takes the same overlay. */
.form-block--wrapper .button--pink-brdr {
  position: relative;
  overflow: hidden;
  z-index: 0;
  background-color: transparent;
  border-color: var(--color-primary-4);
  color: var(--color-primary-4);
}

.form-block--wrapper .button--pink-brdr:hover {
  background-color: var(--color-primary-4);
  border-color: transparent;
  color: #fff;
}

.form-block--wrapper .primary_button:focus-visible,
.form-block--wrapper .button--pink-brdr:focus-visible,
.form-block--wrapper .multi-step-form__actions__submit:focus-visible {
  outline: 2px solid var(--color-primary-4);
  outline-offset: 2px;
}

/* -------------------- Invalid field border --------------------
   The `[&_input[aria-invalid='true']]` variant in FormBlock.tsx loses the
   specificity race against the long `[&_input:not(…):not(…)]` border rule, so an
   invalid field keeps its neutral grey border and the error message is the only cue.
   Colour alone is never the sole signal here (the message and aria-invalid carry it),
   but the border should still turn red as designed. */
.form-block--wrapper
  input[aria-invalid="true"]:not([data-slot="input-group-control"]),
.form-block--wrapper select[aria-invalid="true"],
.form-block--wrapper textarea[aria-invalid="true"] {
  border-width: 2px;
  border-color: var(--color-alert-red500);
}

/* ================================================================
   RADIO BUTTONS + DROPDOWN — Kentico parity with the FE
   ================================================================
   The React components DO mount on Kentico pages (verified in DevTools: the
   dropdown is a real `<button data-slot="select-trigger" role="combobox">`).
   The problem is the Tailwind utility layer in FormBlock.tsx, which was written
   for Kentico's OLD native markup and now fights the Base UI DOM:

   1) Radios: the FE and Kentico render DIFFERENT DOM
      The FE dev app / Storybook mock uses Kentico's old NATIVE markup
      (`.ktc-radio` + `<input type="radio">`), so line 58 of FormBlock.tsx —
      `[&_input[type='radio']]:size-8 accent-primary-4` — makes the browser draw
      a 32px pink radio. That is the look in the FE screenshots.

      On real Kentico pages the React component mounts instead, and Base UI's
      <Radio> renders TWO elements: the styled control
      (`[data-slot="radio-group-item"]`) AND a visually hidden native
      `<input type="radio">` carrying the form value, hidden via an inline
      `clip-path: inset(50%); width: 1px; height: 1px; margin: -1px`.
      `size-8` beats that inline 1px sizing and un-hides the input, so a
      browser-default (blue) radio is painted over the styled circle — the
      Kentico screenshots. The styled circle itself stayed unstyled because
      those Tailwind utilities never targeted `[data-slot='radio-group-item']`.

      Fix: keep the hidden input hidden, and style the Base UI elements to
      reproduce the FE's 32px pink appearance.

   2) `[&_select]:...` never matches the dropdown
      Base UI's <Select> renders a <button>, not a <select>, so all the
      full-width/56px field styling was skipped and the trigger kept its own
      component classes (`w-fit`, `h-9`) — the small shrink-wrapped
      "Please select" button.

   Fixing this in Tailwind proved unreliable (arbitrary variants with `:not()`
   and escaped names don't generate the selectors we need), so parity is
   restored here in plain CSS. These rules must therefore WIN over the utility
   classes on the wrapper, hence `!important` — the same approach the submit
   button and focus-ring rules above already use.

   Targets mirror components/ui/radio-group.tsx and components/ui/select.tsx.
   ================================================================ */

/* -------------------- Hidden native value-carrier --------------------
   Re-assert Base UI's own hiding so no utility can resurrect it. Must stay
   focusable-in-DOM (not display:none) or the form value is lost. */
.form-block--wrapper [data-slot="radio-group-item"] + input[type="radio"],
.form-block--wrapper input[type="radio"][aria-hidden="true"],
.form-block--wrapper input[type="checkbox"][aria-hidden="true"],
.multistep-form--wrapper [data-slot="radio-group-item"] + input[type="radio"],
.multistep-form--wrapper input[type="radio"][aria-hidden="true"],
.multistep-form--wrapper input[type="checkbox"][aria-hidden="true"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
  appearance: none !important;
  accent-color: auto !important;
}

/* -------------------- Radio circle --------------------
   Reproduces the FE appearance, which comes from the utilities on line 58 of
   FormBlock.tsx: `size-8` (8 x --spacing 0.25rem = 32px) + `accent-primary-4`
   (--color-pink1). On the FE those apply to a NATIVE radio, so the browser draws
   a 32px control with a pink fill and a large pink centre dot.

   Base UI gives us elements instead of a native control, so the same look is
   rebuilt explicitly:
     unchecked -> 32px white circle, grey border
     checked   -> pink border + pink ring, with a 16px pink dot inset from a
                  white gap (matching the accent-color rendering) */
.form-block--wrapper [data-slot="radio-group-item"],
.multistep-form--wrapper [data-slot="radio-group-item"] {
  position: relative !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 2px solid var(--color-neutral-grey-500) !important;
  border-radius: 9999px !important;
  background-color: #fff !important;
  box-shadow: none !important;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

/* Checked: pink ring, white gap, pink centre — background stays white so the
   gap reads, the dot is drawn by the indicator span below. */
.form-block--wrapper [data-slot="radio-group-item"][data-checked],
.multistep-form--wrapper [data-slot="radio-group-item"][data-checked] {
  border-color: var(--color-pink1) !important;
  background-color: #fff !important;
}

/* -------------------- The dot --------------------
   Trying to re-position the component's own dot does NOT work reliably. That
   span carries `absolute top-1/2 left-1/2 size-2 -translate-x-1/2
   -translate-y-1/2`, and its wrapper carries a fixed `size-4` box — so the dot
   is positioned against a 16px box pinned in the corner of our 32px circle.
   Overriding that needs every one of position/top/left/transform/size to land on
   both elements, and any one of them losing leaves the dot off-centre (which is
   exactly what happened).

   So don't fight it: hide the component's indicator entirely and draw the dot as
   a ::before on the control. One element, one rule, centred by the control's own
   flex — nothing left to override. */
.form-block--wrapper [data-slot="radio-group-indicator"],
.multistep-form--wrapper [data-slot="radio-group-indicator"] {
  display: none !important;
}

/* Invisible hit-area pseudo (`after:-inset-x-3 after:-inset-y-2`) is not needed
   at 32px and can overlay the dot — drop it. */
.form-block--wrapper [data-slot="radio-group-item"]::after,
.multistep-form--wrapper [data-slot="radio-group-item"]::after {
  content: none !important;
}

/* 16px pink dot, centred by the control's flex. Only drawn when checked. */
.form-block--wrapper [data-slot="radio-group-item"]::before,
.multistep-form--wrapper [data-slot="radio-group-item"]::before {
  content: "" !important;
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  border-radius: 9999px !important;
  background-color: var(--color-pink1) !important;
  opacity: 0 !important;
  transition: opacity 0.15s ease;
}

.form-block--wrapper [data-slot="radio-group-item"][data-checked]::before,
.multistep-form--wrapper [data-slot="radio-group-item"][data-checked]::before {
  opacity: 1 !important;
}

/* Focus ring on the styled control (the hidden input never receives focus). */
.form-block--wrapper [data-slot="radio-group-item"]:focus-visible,
.multistep-form--wrapper [data-slot="radio-group-item"]:focus-visible {
  outline: 2px solid var(--color-pink1) !important;
  outline-offset: 2px !important;
}

/* Option list stacks vertically, left-aligned, 12px apart — matching the
   `.ktc-radio-list` utilities (flex-col / items-start / gap-3) on the FE. */
.form-block--wrapper [data-slot="radio-group"],
.multistep-form--wrapper [data-slot="radio-group"] {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  width: 100%;
}

/* Each option row: control + label inline, 12px apart (`.ktc-radio` on the FE).
   The React path wraps every option in a plain div, so target the group's
   direct children. */
.form-block--wrapper [data-slot="radio-group"] > div,
.multistep-form--wrapper [data-slot="radio-group"] > div {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
}

/* Label — Paragraph Extra Small (14px / 400), inline, no bottom margin.
   Mirrors `[&_.ktc-radio_label]` and `[&_input[type='radio']+label]`, whose
   block-label rule would otherwise push the text onto its own line. */
.form-block--wrapper [data-slot="radio-group"] label,
.multistep-form--wrapper [data-slot="radio-group"] label {
  display: inline !important;
  margin-bottom: 0 !important;
  font-size: 14px !important;
  line-height: 20px !important;
  font-weight: 400 !important;
  cursor: pointer;
}

/* -------------------- Native radio fallback --------------------
   Kentico's form-builder editor preview (and any `.ktc-radio` markup that isn't
   routed through React) still emits a real `<input type="radio">`. The FE styles
   that path with `size-8` + `accent-primary-4`; mirror it so both paths match.
   `:not([aria-hidden="true"])` keeps this off Base UI's hidden value-carrier. */
.form-block--wrapper .ktc-radio input[type="radio"]:not([aria-hidden="true"]),
.multistep-form--wrapper
  .ktc-radio
  input[type="radio"]:not([aria-hidden="true"]) {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--color-pink1);
  cursor: pointer;
}

/* ================================================================
   CHECKBOXES — Kentico parity with the FE
   ================================================================
   Same root cause as the radios above. The FE dev app / Storybook mock uses
   Kentico's old NATIVE markup (`.ktc-checkbox` + `<input type="checkbox">`), so
   the utilities in FormBlock.tsx — `[&_input[type='checkbox']]:size-8
   accent-primary-4` plus the `.ktc-checkbox` flex/gap and label rules — make the
   browser draw a 32px pink checkbox. That is the look in the FE screenshots.

   On real Kentico pages _ExtendedCheckBox.cshtml takes its react-component
   branch, so CheckBox.tsx mounts and Base UI's <Checkbox> renders:
     <div role="group" data-slot="field">             (Field orientation=horizontal)
       <button role="checkbox" data-slot="checkbox">  (the styled control)
         <span data-slot="checkbox-indicator">        (the tick)
       <label data-slot="field-label">
   plus a visually hidden native <input type="checkbox"> carrying the value.

   So none of those utilities land: there is no `.ktc-checkbox` element, and
   `[&_input[type='checkbox']]` matches only the hidden value-carrier. The
   value-carrier is already re-hidden above; what was missing is any styling for
   the real control, which kept its component defaults (`size-4`,
   `border-input`) — a small, pale checkbox instead of the FE's 32px pink one.

   Rebuilt explicitly, as with the radios:
     unchecked -> 32px white box, 2px grey border, 4px radius
     checked   -> pink border + pink fill, white tick
   Targets mirror components/ui/checkbox.tsx and components/ui/field.tsx. */
.form-block--wrapper [data-slot="checkbox"],
.multistep-form--wrapper [data-slot="checkbox"] {
  position: relative !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 2px solid var(--color-neutral-grey-500) !important;
  border-radius: 4px !important;
  background-color: #fff !important;
  box-shadow: none !important;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

/* Checked: solid pink box, matching `accent-primary-4` on a native checkbox. */
.form-block--wrapper [data-slot="checkbox"][data-checked],
.multistep-form--wrapper [data-slot="checkbox"][data-checked] {
  border-color: var(--color-pink1) !important;
  background-color: var(--color-pink1) !important;
}

/* Invisible hit-area pseudo (`after:-inset-x-3 after:-inset-y-2`) is not needed
   at 32px and can swallow clicks on neighbouring rows — drop it, as for radios. */
.form-block--wrapper [data-slot="checkbox"]::after,
.multistep-form--wrapper [data-slot="checkbox"]::after {
  content: none !important;
}

/* The tick. Unlike the radio dot this one is safe to keep: the indicator is a
   plain grid child with no absolute positioning, so the control's own flex
   centres it. Only the colour and size need asserting — the component ships
   `[&>svg]:size-3.5` (14px), too small inside a 32px box. */
.form-block--wrapper [data-slot="checkbox-indicator"],
.multistep-form--wrapper [data-slot="checkbox-indicator"] {
  display: grid !important;
  place-content: center !important;
  color: #fff !important;
}

.form-block--wrapper [data-slot="checkbox-indicator"] svg,
.multistep-form--wrapper [data-slot="checkbox-indicator"] svg {
  width: 20px !important;
  height: 20px !important;
}

/* Focus ring on the styled control (the hidden input never receives focus). */
.form-block--wrapper [data-slot="checkbox"]:focus-visible,
.multistep-form--wrapper [data-slot="checkbox"]:focus-visible {
  outline: 2px solid var(--color-pink1) !important;
  outline-offset: 2px !important;
}

/* Invalid state — mirror the 2px red border the FE gives other invalid fields,
   and keep the component's own destructive ring off. */
.form-block--wrapper [data-slot="checkbox"][aria-invalid="true"],
.multistep-form--wrapper [data-slot="checkbox"][aria-invalid="true"] {
  border-color: var(--color-alert-red500) !important;
  box-shadow: none !important;
}

/* Row layout: control + label inline, 12px apart, top-aligned so a wrapping
   label reads against the box. Mirrors `[&_.ktc-checkbox]:flex items-center
   gap-3` on the FE; `align-items: flex-start` (rather than center) is the one
   deliberate difference — consent text here routinely wraps to two lines. */
.form-block--wrapper [data-slot="field"]:has(> [data-slot="checkbox"]),
.multistep-form--wrapper [data-slot="field"]:has(> [data-slot="checkbox"]) {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  width: 100%;
}

/* Label — Paragraph Extra Small (14px / 400), no bottom margin, and allowed to
   take the remaining width so long consent text wraps beside the box rather
   than under it. Mirrors `[&_.ktc-checkbox_label]` on the FE, overriding the
   generic `[&_label]:block text-body` rule that would otherwise apply. */
.form-block--wrapper
  [data-slot="field"]:has(> [data-slot="checkbox"])
  [data-slot="field-label"],
.multistep-form--wrapper
  [data-slot="field"]:has(> [data-slot="checkbox"])
  [data-slot="field-label"] {
  display: block !important;
  flex: 1 1 auto !important;
  width: auto !important;
  margin-bottom: 0 !important;
  font-size: 14px !important;
  line-height: 20px !important;
  font-weight: 400 !important;
  cursor: pointer;
}

/* The label's inner <p> (the text arrives as HTML via dangerouslySetInnerHTML)
   must not re-introduce paragraph spacing inside the row. */
.form-block--wrapper
  [data-slot="field"]:has(> [data-slot="checkbox"])
  [data-slot="field-label"]
  p:last-child,
.multistep-form--wrapper
  [data-slot="field"]:has(> [data-slot="checkbox"])
  [data-slot="field-label"]
  p:last-child {
  margin-bottom: 0 !important;
}

/* -------------------- Native checkbox fallback --------------------
   Kentico's form-builder editor preview emits `<span class="ktc-checkbox">` with
   a real `<input type="checkbox">` (see _ExtendedCheckBox.cshtml's
   IsInFormBuilder branch), as does any markup not routed through React. The FE
   styles that path with `size-8` + `accent-primary-4`; mirror it so the editor
   preview and the live page agree.
   `:not([aria-hidden="true"])` keeps this off Base UI's hidden value-carrier. */
.form-block--wrapper
  .ktc-checkbox
  input[type="checkbox"]:not([aria-hidden="true"]),
.multistep-form--wrapper
  .ktc-checkbox
  input[type="checkbox"]:not([aria-hidden="true"]) {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--color-pink1);
  cursor: pointer;
}

/* `.ktc-checkbox` itself is a <span> on the editor path, so it needs the flex
   row explicitly — the FE utility does this via `[&_.ktc-checkbox]:flex`. */
.form-block--wrapper .ktc-checkbox,
.multistep-form--wrapper .ktc-checkbox {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
}

.form-block--wrapper .ktc-checkbox label,
.multistep-form--wrapper .ktc-checkbox label {
  display: block;
  flex: 1 1 auto;
  margin-bottom: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  cursor: pointer;
}

/* -------------------- Dropdown (native select) --------------------
   DropDown.tsx renders a plain <select> (see the note in that file: the Base UI
   <Select> rendered a <button role="combobox"> that none of the field styling
   reached, and it needed JS to open at all).

   Give it the same box as the text inputs — full width, 56px, 4px radius,
   16px/20px padding — and draw our own chevron, since 
   removes the OS arrow. The data URI keeps this file self-contained: wwwroot is
   served as-is, with no bundler to resolve an import. */
.form-block--wrapper select:not([data-slot]),
.multistep-form--wrapper select:not([data-slot]) {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 16px 48px 16px 20px;
  border: 1px solid var(--color-neutral-grey-500);
  border-radius: 4px;
  background-color: #fff;
  font-family: inherit;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--color-neutral-grey-800);
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 fill=%27none%27 stroke=%27%23707070%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M6 9l6 6 6-6%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 20px 20px;
}

/* Placeholder ("Please select") is the empty-value option. Grey it only while it
   is the selected one — inside the open list every option must stay readable. */
.form-block--wrapper select:not([data-slot]):has(option[value=""]:checked),
.multistep-form--wrapper select:not([data-slot]):has(option[value=""]:checked) {
  color: var(--color-neutral-grey-700);
}

.form-block--wrapper select:not([data-slot]) option,
.multistep-form--wrapper select:not([data-slot]) option {
  color: var(--color-neutral-grey-800);
}

/* Focus ring matches every other field (2px pink). */
.form-block--wrapper select:not([data-slot]):focus-visible,
.multistep-form--wrapper select:not([data-slot]):focus-visible {
  outline: 2px solid var(--color-pink1);
  outline-offset: 0;
  border-color: var(--color-pink1);
}

.form-block--wrapper select:not([data-slot]):disabled,
.multistep-form--wrapper select:not([data-slot]):disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* -------------------- Unit selector trigger --------------------
   UnitsSelector.tsx still uses the Base UI <Select> INSIDE .complex-field--unit,
   where the wrapper is the visual field, so its trigger stays borderless and
   inline. Scoped to that wrapper only — no other select-trigger remains in the
   form now that DropDown is native. */
.form-block--wrapper .complex-field--unit [data-slot="select-trigger"],
.multistep-form--wrapper .complex-field--unit [data-slot="select-trigger"] {
  width: auto !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: transparent !important;
  padding: 0 16px !important;
}

/* ================================================================
   CARD RADIOS — `.styled-radio--v2`
   ================================================================
   Kentico emits an opt-in wrapper class on a radio field when the editor picks
   the icon-card layout (see SupplierSelect.tsx, variant="Icons", which builds
   the same `.styled-radio--v2` shell for the React path). The markup inside is
   the ordinary radio DOM:

     <div class="styled-radio--v2">
       <div class="editing-form-control-nested-control">
         <span class="ktc-radio ktc-radio-list">
           <span class="ktc-radio">
             <input type="radio" class="form-control" id=… name=… value=…>
             <label for=…><img src=… width="44" alt="">Dual fuel</label>
           </span>
           …
       <input style="display:none" readonly class="form-control" name=…>

   So this is a LAYOUT option, not new markup: the same options render as
   selectable cards — native control visually hidden, the `<label>` promoted to
   the whole card surface with the icon above centred text, and a pink border +
   tint marking the checked one.

   These rules must beat the generic radio utilities in FormBlock.tsx (which set
   `size-8` on every `input[type=radio]` and make `.ktc-radio` a left-aligned
   row), hence `!important` — the same approach the rest of this file already
   uses for Kentico parity.
   ================================================================ */

/* Option list: cards flow in a row and wrap. The generic `.ktc-radio-list`
   utilities force flex-column / align-start, so every axis is re-asserted. */
.form-block--wrapper .styled-radio--v2 .ktc-radio-list,
.multistep-form--wrapper .styled-radio--v2 .ktc-radio-list {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 16px !important;
  width: 100%;
}

/* Each option is a card. The wrapper span carries no visuals — the <label>
   inside is the full-bleed clickable surface — so the span only sizes it.
   `flex: 1 1 160px` lets 2-4 options share the row and drop to fewer per row on
   narrow viewports without a media query. */
.form-block--wrapper .styled-radio--v2 .ktc-radio-list > .ktc-radio,
.multistep-form--wrapper .styled-radio--v2 .ktc-radio-list > .ktc-radio {
  display: block !important;
  position: relative;
  flex: 1 1 160px;
  min-width: 140px;
  max-width: 100%;
  gap: 0 !important;
}

/* Hide the native control WITHOUT removing it from the a11y tree — it still
   receives focus and carries the value; the card paints the focus ring for it.
   `display:none` / `visibility:hidden` would make the group unreachable by
   keyboard. */
.form-block--wrapper .styled-radio--v2 .ktc-radio input[type="radio"],
.multistep-form--wrapper .styled-radio--v2 .ktc-radio input[type="radio"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* The card surface: icon above, label text centred beneath. The whole card is
   the click target, so the WCAG 2.5.5 minimum is met by more than the 32px the
   plain radios rely on. */
.form-block--wrapper .styled-radio--v2 .ktc-radio label,
.multistep-form--wrapper .styled-radio--v2 .ktc-radio label {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px;
  box-sizing: border-box;
  height: 100%;
  min-height: 44px;
  margin: 0 !important;
  padding: 20px 16px;
  border: 2px solid var(--color-neutral-grey-500);
  border-radius: 8px;
  background-color: #fff;
  text-align: center;
  font-size: 16px !important;
  line-height: 24px !important;
  font-weight: 600 !important;
  color: var(--color-neutral-grey-800) !important;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

/* Icon sits above the text at its authored width (Kentico emits width="44"). */
.form-block--wrapper .styled-radio--v2 .ktc-radio label img,
.multistep-form--wrapper .styled-radio--v2 .ktc-radio label img {
  display: block;
  flex: 0 0 auto;
  width: 44px;
  height: auto;
  margin: 0;
}

.form-block--wrapper .styled-radio--v2 .ktc-radio label:hover,
.multistep-form--wrapper .styled-radio--v2 .ktc-radio label:hover {
  border-color: var(--color-pink1);
}

/* Checked state — pink border plus a tint, so selection is not carried by a
   single hairline alone. */
.form-block--wrapper
  .styled-radio--v2
  .ktc-radio
  input[type="radio"]:checked
  + label,
.multistep-form--wrapper
  .styled-radio--v2
  .ktc-radio
  input[type="radio"]:checked
  + label {
  border-color: var(--color-pink1);
  background-color: color-mix(in srgb, var(--color-pink1) 6%, #fff);
}

/* Keyboard focus — the control is visually hidden, so the ring is drawn on the
   card it labels. */
.form-block--wrapper
  .styled-radio--v2
  .ktc-radio
  input[type="radio"]:focus-visible
  + label,
.multistep-form--wrapper
  .styled-radio--v2
  .ktc-radio
  input[type="radio"]:focus-visible
  + label {
  outline: 2px solid var(--color-pink1);
  outline-offset: 2px;
}

/* -------------------- Base UI (React) path --------------------
   On real Kentico pages the radio field can mount RadioButtons.tsx instead of
   emitting native markup (the same split documented for the plain radios
   above). Base UI renders `[data-slot="radio-group"]` > div >
   `[data-slot="radio-group-item"]` + hidden input + label, so the earlier rules
   in this file style it as a 32px circle. Inside `.styled-radio--v2` that
   circle is suppressed and the row is rebuilt as the same card. */
.form-block--wrapper .styled-radio--v2 [data-slot="radio-group"],
.multistep-form--wrapper .styled-radio--v2 [data-slot="radio-group"] {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
  gap: 16px !important;
}

.form-block--wrapper .styled-radio--v2 [data-slot="radio-group"] > div,
.multistep-form--wrapper .styled-radio--v2 [data-slot="radio-group"] > div {
  position: relative;
  flex: 1 1 160px;
  min-width: 140px;
  gap: 0 !important;
}

/* The styled circle is redundant once the card itself shows selection. */
.form-block--wrapper .styled-radio--v2 [data-slot="radio-group-item"],
.multistep-form--wrapper .styled-radio--v2 [data-slot="radio-group-item"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
}

.form-block--wrapper .styled-radio--v2 [data-slot="radio-group"] label,
.multistep-form--wrapper .styled-radio--v2 [data-slot="radio-group"] label {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 44px;
  margin: 0 !important;
  padding: 20px 16px;
  border: 2px solid var(--color-neutral-grey-500);
  border-radius: 8px;
  background-color: #fff;
  text-align: center;
  font-size: 16px !important;
  line-height: 24px !important;
  font-weight: 600 !important;
  cursor: pointer;
}

.form-block--wrapper .styled-radio--v2 [data-slot="radio-group"] label img,
.multistep-form--wrapper .styled-radio--v2 [data-slot="radio-group"] label img {
  display: block;
  width: 44px;
  height: auto;
}

.form-block--wrapper .styled-radio--v2 [data-slot="radio-group"] label:hover,
.multistep-form--wrapper
  .styled-radio--v2
  [data-slot="radio-group"]
  label:hover {
  border-color: var(--color-pink1);
}

/* Base UI marks the selected control with `[data-checked]`; the card is not its
   sibling in a way `+` can reach, so select it from the option wrapper with
   `:has()`. */
.form-block--wrapper
  .styled-radio--v2
  [data-slot="radio-group"]
  > div:has([data-slot="radio-group-item"][data-checked])
  label,
.multistep-form--wrapper
  .styled-radio--v2
  [data-slot="radio-group"]
  > div:has([data-slot="radio-group-item"][data-checked])
  label {
  border-color: var(--color-pink1);
  background-color: color-mix(in srgb, var(--color-pink1) 6%, #fff);
}

.form-block--wrapper
  .styled-radio--v2
  [data-slot="radio-group"]
  > div:has([data-slot="radio-group-item"]:focus-visible)
  label,
.multistep-form--wrapper
  .styled-radio--v2
  [data-slot="radio-group"]
  > div:has([data-slot="radio-group-item"]:focus-visible)
  label {
  outline: 2px solid var(--color-pink1);
  outline-offset: 2px;
}

/* Base UI's focus-ring rule earlier in this file draws an outline on the now
   1px-clipped circle — suppress it so only the card ring shows. */
.form-block--wrapper
  .styled-radio--v2
  [data-slot="radio-group-item"]:focus-visible,
.multistep-form--wrapper
  .styled-radio--v2
  [data-slot="radio-group-item"]:focus-visible {
  outline: none !important;
}

/* On the primary (purple) background the wrapper turns every label white
   (`formChildStylesPrimaryBg` in FormBlock.tsx). The cards are white-filled, so
   restore dark text or it vanishes. */
.form-block--wrapper[data-bg-color="primary"] .styled-radio--v2 .ktc-radio label,
.form-block--wrapper[data-bg-color="primary"]
  .styled-radio--v2
  [data-slot="radio-group"]
  label,
.multistep-form--wrapper[data-bg-color="primary"]
  .styled-radio--v2
  .ktc-radio
  label,
.multistep-form--wrapper[data-bg-color="primary"]
  .styled-radio--v2
  [data-slot="radio-group"]
  label {
  color: var(--color-neutral-grey-800) !important;
}
