/**
 * D365 Customer Insights - Journeys marketing form skin.
 * Figma: Form themes 8017:27835 (Light / Dark / Brand / Grey), Input 8057:33246
 *
 * Loaded site-wide via layout.tsx. Scoped to `.embedded-scripts[data-d365-form]`.
 * Theme via `data-d365-theme` on the wrapper (parsed from CMS `data-theme`).
 *
 * Floating underline inputs / labels live here (CSS-only; no DOM enhancer).
 * Placeholders are hidden via ::placeholder; empty selects use :has(option[value=""]:checked).
 */

.embedded-scripts[data-d365-form] {
  /* Light (default) — Figma Theme LIGHT */
  --d365-form-bg: #ffffff;
  --d365-form-surface: #ffffff;
  --d365-form-elevated: #f5f5f6;
  --d365-form-fg: #000000;
  --d365-form-fg-muted: #27282a;
  --d365-form-fg-subtle: #a3a5a9;
  --d365-form-stroke: #d1d2d4;
  --d365-form-stroke-strong: #a3a5a9;
  --d365-form-brand: #0050ff;
  --d365-form-brand-hover: #0040cc;
  --d365-form-on-brand: #ffffff;
  /* Select caret — thicker stroke for visibility on brand/dark */
  --d365-form-select-caret-slot: 1.75rem;
  --d365-form-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 6L8 10.5 12.5 6' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  --color-surface-default: var(--d365-form-surface);
  --color-surface-elevated: var(--d365-form-elevated);
  --color-fg-default: var(--d365-form-fg);
  --color-fg-muted: var(--d365-form-fg-muted);
  --color-fg-subtle: var(--d365-form-fg-subtle);
  --color-stroke-default: var(--d365-form-stroke);
  --color-stroke-strong: var(--d365-form-stroke-strong);
  --color-brand-primary: var(--d365-form-brand);
  --color-brand-primary-hover: var(--d365-form-brand-hover);
  --color-fg-on-primary: var(--d365-form-on-brand);

  background-color: var(--d365-form-bg);
  padding: var(--spacing-space-5, 32px) var(--spacing-space-3, 16px);
  width: 100%;
}

/* --- Themes (Figma 8017:27835) — use data-d365-theme (not data-theme) --- */

.embedded-scripts[data-d365-form][data-d365-theme="dark"] {
  --d365-form-bg: #000000;
  --d365-form-surface: #000000;
  --d365-form-elevated: #141415;
  --d365-form-fg: #f5f5f6;
  --d365-form-fg-muted: #e8e9ea;
  --d365-form-fg-subtle: #63666a;
  --d365-form-stroke: #3b3d3f;
  --d365-form-stroke-strong: #63666a;
  --d365-form-brand: #0050ff;
  --d365-form-brand-hover: #0040cc;
  --d365-form-on-brand: #ffffff;
  --d365-form-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 6L8 10.5 12.5 6' stroke='%23f5f5f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.embedded-scripts[data-d365-form][data-d365-theme="brand"] {
  --d365-form-bg: #0050ff;
  --d365-form-surface: #0050ff;
  --d365-form-elevated: #0050ff;
  --d365-form-fg: #ffffff;
  --d365-form-fg-muted: #ccdcff;
  --d365-form-fg-subtle: #6690ff;
  --d365-form-stroke: #f5f5f6;
  --d365-form-stroke-strong: #ffffff;
  --d365-form-brand: #ffffff;
  --d365-form-brand-hover: #e8e9ea;
  --d365-form-on-brand: #0050ff;
  --d365-form-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 6L8 10.5 12.5 6' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.embedded-scripts[data-d365-form][data-d365-theme="grey"],
.embedded-scripts[data-d365-form][data-d365-theme="gray"] {
  --d365-form-bg: #f5f5f6;
  --d365-form-surface: #f5f5f6;
  --d365-form-elevated: #ffffff;
  --d365-form-fg: #000000;
  --d365-form-fg-muted: #27282a;
  --d365-form-fg-subtle: #a3a5a9;
  --d365-form-stroke: #d1d2d4;
  --d365-form-stroke-strong: #a3a5a9;
  --d365-form-brand: #0050ff;
  --d365-form-brand-hover: #0040cc;
  --d365-form-on-brand: #ffffff;
}

/* Form Embed outcome theme — fg tokens for success RTE (modal panel + inline host).
 * Brand keeps site --color-brand-primary for panel fill; only remap foreground here.
 * Inline brand/dark inherit page fg so success text stays readable on the page surface. */
.form-embed-modal-panel,
.form-embed[data-d365-theme="light"],
.form-embed[data-d365-theme="grey"],
.form-embed[data-d365-theme="gray"] {
  --color-fg-default: #000000;
  --color-fg-muted: #27282a;
  --color-fg-subtle: #a3a5a9;
}

.form-embed-modal-panel[data-d365-theme="dark"] {
  --color-fg-default: #f5f5f6;
  --color-fg-muted: #e8e9ea;
  --color-fg-subtle: #63666a;
}

.form-embed-modal-panel[data-d365-theme="brand"] {
  --color-fg-default: #ffffff;
  --color-fg-muted: #ccdcff;
  --color-fg-subtle: #6690ff;
}

.form-embed-modal-panel[data-d365-theme="grey"],
.form-embed-modal-panel[data-d365-theme="gray"] {
  --color-fg-default: #000000;
  --color-fg-muted: #27282a;
  --color-fg-subtle: #a3a5a9;
}

/* Success / failure RTE — theme foreground + global body/heading scale */
.form-embed-message-panel.richtext {
  color: var(--color-fg-default);
}

.form-embed-message-panel.richtext
  :where(p, h1, h2, h3, h4, h5, h6, li, span, strong, b, em, i, a, u) {
  color: var(--color-fg-default) !important;
  text-align: center;
}

.form-embed-message-panel.richtext :where(small, figcaption) {
  color: var(--color-fg-muted) !important;
  text-align: center;
}

.form-embed-message-panel.richtext p {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--font-weight-body-normal);
  line-height: var(--id-type-richtext-body-line-height, 1.55);
}

.form-embed-message-panel.richtext h2,
.form-embed-message-panel.richtext h3 {
  font-family: var(--font-heading-anton, Anton, sans-serif) !important;
  margin-bottom: var(--spacing-space-2, 8px) !important;
}

.form-embed-message-panel.richtext p + p {
  margin-top: var(--spacing-space-3, 12px);
}

.embedded-scripts[data-d365-form] .marketingForm,
.embedded-scripts[data-d365-form] form,
.embedded-scripts[data-d365-form] > div {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.embedded-scripts[data-d365-form] [data-layout="true"] {
  background-color: transparent !important;
  border: none !important;
  margin: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  width: 100% !important;
}

/* --- Header --- */

.embedded-scripts[data-d365-form] h1,
.embedded-scripts[data-d365-form] h2,
.embedded-scripts[data-d365-form] h3,
.embedded-scripts[data-d365-form] .marketingForm h1,
.embedded-scripts[data-d365-form] .marketingForm h2,
.embedded-scripts[data-d365-form] .marketingForm h3,
.embedded-scripts[data-d365-form] .lp-form-header h1,
.embedded-scripts[data-d365-form] .lp-form-header h2 {
  color: var(--color-fg-default, #000) !important;
  font-family: var(--font-heading-anton, Anton, sans-serif) !important;
  font-size: var(--text-h3, 36px) !important;
  font-weight: 700 !important;
  letter-spacing: 0.68px !important;
  line-height: 1.15 !important;
  margin: 0 !important;
  margin-bottom: var(--spacing-space-2, 8px) !important;
  text-transform: uppercase !important;
  width: 100%;
  text-align: left !important;
}

.embedded-scripts[data-d365-form] h1 + form,
.embedded-scripts[data-d365-form] h2 + form,
.embedded-scripts[data-d365-form] h3 + form,
.embedded-scripts[data-d365-form] .marketingForm h1 + form,
.embedded-scripts[data-d365-form] .marketingForm h2 + form,
.embedded-scripts[data-d365-form] .marketingForm h3 + form {
  margin-top: 16px !important;
}

.embedded-scripts[data-d365-form] p,
.embedded-scripts[data-d365-form] .marketingForm h2,
.embedded-scripts[data-d365-form] .lp-form-description,
.embedded-scripts[data-d365-form] .lp-form-header p,
.embedded-scripts[data-d365-form] .marketingForm p {
  color: var(--color-fg-muted, #27282a) !important;
  font-family: var(--font-body, Montserrat, sans-serif) !important;
  font-size: var(--text-body, 18px) !important;
  font-weight: 400 !important;
  letter-spacing: -0.36px !important;
  line-height: 1.6 !important;
  margin-top: 0 !important;
  width: 100%;
  text-align: left !important;
}

.embedded-scripts[data-d365-form] h3 + p,
.embedded-scripts[data-d365-form] h2 + p,
.embedded-scripts[data-d365-form] h1 + p {
  margin-bottom: 32px !important;
}

/*
 * --- Floating underline fields ---
 * Idle/raised labels use :placeholder-shown / :focus-within;
 * empty selects use :has(option…:checked) — use :checked (current selection),
 * not [selected] (default HTML attribute that often remains on the placeholder).
 */

.embedded-scripts[data-d365-form]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  ):not([data-hide="hide"]):not([data-hide="true"]):not(:has(input[type="checkbox"])):not(
    :has(input[type="radio"])
  ):not(:has(textarea)) {
  display: block !important;
  margin-top: 0 !important;
  margin-inline: 0 !important;
  max-width: none !important;
  min-height: 42px !important;
  overflow: visible !important;
  padding: 0 !important;
  position: relative !important;
  width: 100% !important;
  z-index: 0 !important;
}

.embedded-scripts[data-d365-form] .textFormFieldBlock,
.embedded-scripts[data-d365-form] .optionSetFormFieldBlock,
.embedded-scripts[data-d365-form] .lookupFormFieldBlock,
.embedded-scripts[data-d365-form] .dateTimeFormFieldBlock,
.embedded-scripts[data-d365-form] .phoneFormFieldBlock {
  margin-bottom: var(--spacing-space-4, 24px) !important;
}

.embedded-scripts[data-d365-form] #g-recaptcha{
  margin: 0 !important;
}

.embedded-scripts[data-d365-form] .phoneFormFieldBlock > .phoneCountryCode {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  min-height: 42px !important;
  outline: none !important;
  overflow: visible !important;
  padding: 0 !important;
  position: relative !important;
  width: 100% !important;
  z-index: 0 !important;
}

.embedded-scripts[data-d365-form]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  ):not(:has(input[type="checkbox"])):not(:has(input[type="radio"])):not(:has(textarea))
  :is(
    input:not([type="checkbox"]):not([type="radio"]),
    select
  ) {
  appearance: none !important;
  background-color: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--d365-form-stroke-strong, #a3a5a9) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  color: var(--d365-form-fg, #000) !important;
  -webkit-text-fill-color: var(--d365-form-fg, #000) !important;
  caret-color: var(--d365-form-fg, #000) !important;
  display: block !important;
  font-family: var(--font-body, Montserrat, sans-serif) !important;
  font-size: var(--text-body-sm, 16px) !important;
  font-weight: 500 !important;
  height: 42px !important;
  letter-spacing: -0.32px !important;
  line-height: 1.6 !important;
  margin: 0 !important;
  min-height: 42px !important;
  padding: var(--spacing-space-2, 8px) var(--spacing-space-2, 8px)
    var(--spacing-space-2, 8px) 0 !important;
  width: 100% !important;
}

/* Select caret — opaque ::after plate covers any residual native arrow;
 * select padding-right keeps the closed value clear of the caret. */
.embedded-scripts[data-d365-form]
  [class*="FormFieldBlock"]:has(select):not(:has(input[type="checkbox"])):not(
    :has(input[type="radio"])
  )::after,
.embedded-scripts[data-d365-form] .phoneFormFieldBlock > .phoneCountryCode:has(select)::after {
  background-color: var(--d365-form-bg) !important;
  background-image: var(--d365-form-select-chevron) !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 16px 16px !important;
  bottom: 1px !important;
  content: "" !important;
  display: block !important;
  pointer-events: none !important;
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  width: var(--d365-form-select-caret-slot) !important;
  z-index: 2 !important;
}

.embedded-scripts[data-d365-form]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  ):not(:has(input[type="checkbox"])):not(:has(input[type="radio"])):not(:has(textarea))
  select,
.embedded-scripts[data-d365-form] [class*="FormFieldBlock"] select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-color: transparent !important;
  background-image: none !important;
  box-sizing: border-box !important;
  max-width: 100% !important;
  overflow: hidden !important;
  padding-right: var(--d365-form-select-caret-slot) !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  width: 100% !important;
}

.embedded-scripts[data-d365-form] [class*="FormFieldBlock"] select::-ms-expand {
  display: none !important;
}

.embedded-scripts[data-d365-form]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  ):not(:has(input[type="checkbox"])):not(:has(input[type="radio"])):not(:has(textarea))
  :is(
    input:not([type="checkbox"]):not([type="radio"]),
    select
  ):focus {
  border-bottom-color: var(--d365-form-stroke-strong, #a3a5a9) !important;
  box-shadow: none !important;
  outline: none !important;
}

/*
 * Browser autofill paints its own bg/text (Chrome yellow/blue, etc.) and can make
 * values unreadable on themed forms. Force our theme colors instead — autofill
 * itself cannot be fully disabled, only restyled.
 */
.embedded-scripts[data-d365-form]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  )
  :is(input, textarea):-webkit-autofill,
.embedded-scripts[data-d365-form]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  )
  :is(input, textarea):-webkit-autofill:hover,
.embedded-scripts[data-d365-form]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  )
  :is(input, textarea):-webkit-autofill:focus,
.embedded-scripts[data-d365-form]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  )
  :is(input, textarea):-webkit-autofill:active,
.embedded-scripts[data-d365-form]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  )
  :is(input, textarea):autofill,
.embedded-scripts[data-d365-form]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  )
  :is(input, textarea):autofill:hover,
.embedded-scripts[data-d365-form]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  )
  :is(input, textarea):autofill:focus {
  background-color: transparent !important;
  background-image: none !important;
  /* Inset “paint” over the browser autofill wash */
  -webkit-box-shadow: 0 0 0 1000px var(--d365-form-bg, #ffffff) inset !important;
  box-shadow: 0 0 0 1000px var(--d365-form-bg, #ffffff) inset !important;
  -webkit-text-fill-color: var(--d365-form-fg, #000000) !important;
  color: var(--d365-form-fg, #000000) !important;
  caret-color: var(--d365-form-fg, #000000) !important;
  /* Prevent Chrome from re-applying its fill on the next paint */
  transition: background-color 99999s ease-out 0s !important;
}

.embedded-scripts[data-d365-form] .textFormFieldBlock:has(textarea) textarea:-webkit-autofill,
.embedded-scripts[data-d365-form] .textFormFieldBlock:has(textarea) textarea:-webkit-autofill:hover,
.embedded-scripts[data-d365-form] .textFormFieldBlock:has(textarea) textarea:-webkit-autofill:focus,
.embedded-scripts[data-d365-form] .textFormFieldBlock:has(textarea) textarea:autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--d365-form-elevated, #f5f5f6) inset !important;
  box-shadow: 0 0 0 1000px var(--d365-form-elevated, #f5f5f6) inset !important;
  -webkit-text-fill-color: var(--d365-form-fg-muted, #27282a) !important;
  color: var(--d365-form-fg-muted, #27282a) !important;
  caret-color: var(--d365-form-fg-muted, #27282a) !important;
}

/* Hide D365/HTML placeholders — floating labels are the visible cue */
.embedded-scripts[data-d365-form]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  )
  :is(input)::placeholder {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  opacity: 0 !important;
}

.embedded-scripts[data-d365-form]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  )
  :is(input)::-moz-placeholder {
  color: transparent !important;
  opacity: 0 !important;
}

/* Label — raised (active) by default */
.embedded-scripts[data-d365-form]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  ):not(:has(input[type="checkbox"])):not(:has(input[type="radio"])):not(:has(textarea))
  :is(label, .lp-ellipsis) {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  font-family: var(--font-label, Inter, sans-serif) !important;
  font-size: var(--text-label-sm, 12px) !important;
  font-weight: 600 !important;
  inset-inline-start: 0 !important;
  letter-spacing: 1.2px !important;
  line-height: 1.1 !important;
  overflow: visible !important;
  pointer-events: none !important;
  position: absolute !important;
  text-transform: uppercase !important;
  top: var(--spacing-space-2, 8px) !important;
  transform: translateY(-1.5rem) !important;
  transform-origin: 0 0 !important;
  transition: transform 0.3s ease, font-size 0.3s ease, color 0.3s ease,
    letter-spacing 0.3s ease, font-weight 0.3s ease !important;
  white-space: normal !important;
  z-index: 1 !important;
}

/* Label — idle (empty + not focused, or select inactive) */
.embedded-scripts[data-d365-form]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  ):not(:has(input[type="checkbox"])):not(:has(input[type="radio"])):not(:has(textarea)):not(
    :focus-within
  ):has(input:placeholder-shown:not([type="checkbox"]):not([type="radio"]))
  :is(label, .lp-ellipsis),
.embedded-scripts[data-d365-form]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  ):not(:focus-within):has(
    select option[hidden]:checked,
    select option[disabled]:checked,
    select option[value=""]:checked,
    select option:not([value]):checked,
    select:required:invalid
  )
  :is(label, .lp-ellipsis) {
  color: #a3a5a9 !important;
  -webkit-text-fill-color: #a3a5a9 !important;
  font-family: var(--font-body, Montserrat, sans-serif) !important;
  font-size: var(--text-body-sm, 16px) !important;
  font-weight: 500 !important;
  letter-spacing: -0.32px !important;
  line-height: 1.6 !important;
  max-width: calc(100% - var(--d365-form-select-caret-slot, 1.75rem)) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-transform: none !important;
  transform: translateY(0) !important;
  white-space: nowrap !important;
}

/* Dark theme field text + labels */
.embedded-scripts[data-d365-form][data-d365-theme="dark"]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  ):not(:has(input[type="checkbox"])):not(:has(input[type="radio"])):not(:has(textarea))
  :is(
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    label,
    .lp-ellipsis
  ) {
  color: #f5f5f6 !important;
  -webkit-text-fill-color: #f5f5f6 !important;
  caret-color: #f5f5f6 !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="dark"]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  ):not(:has(input[type="checkbox"])):not(:has(input[type="radio"])):not(:has(textarea)):not(
    :focus-within
  ):has(input:placeholder-shown:not([type="checkbox"]):not([type="radio"]))
  :is(label, .lp-ellipsis),
.embedded-scripts[data-d365-form][data-d365-theme="dark"]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  ):not(:focus-within):has(
    select option[hidden]:checked,
    select option[disabled]:checked,
    select option[value=""]:checked,
    select option:not([value]):checked,
    select:required:invalid
  )
  :is(label, .lp-ellipsis) {
  color: #63666a !important;
  -webkit-text-fill-color: #63666a !important;
}

/*
 * Native <option> list — closed-field select color must not bleed into the popup
 * (dark/brand were light-on-light / unreadable). Prefer OS dark popup via color-scheme
 * and force readable option colors where the browser allows styling.
 */
.embedded-scripts[data-d365-form] select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: none !important;
  color-scheme: light;
}

.embedded-scripts[data-d365-form] select::-ms-expand {
  display: none !important;
}

.embedded-scripts[data-d365-form] select option {
  background-color: #ffffff !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="dark"] select {
  color-scheme: dark;
}

.embedded-scripts[data-d365-form][data-d365-theme="dark"] select option {
  background-color: #141415 !important;
  color: #f5f5f6 !important;
  -webkit-text-fill-color: #f5f5f6 !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="brand"] select {
  color-scheme: dark;
}

.embedded-scripts[data-d365-form][data-d365-theme="brand"] select option {
  background-color: #003099 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Brand theme field text + labels */
.embedded-scripts[data-d365-form][data-d365-theme="brand"]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  ):not(:has(input[type="checkbox"])):not(:has(input[type="radio"])):not(:has(textarea))
  :is(
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    label,
    .lp-ellipsis
  ) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="brand"]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  ):not(:has(input[type="checkbox"])):not(:has(input[type="radio"])):not(:has(textarea)):not(
    :focus-within
  ):has(input:placeholder-shown:not([type="checkbox"]):not([type="radio"]))
  :is(label, .lp-ellipsis),
.embedded-scripts[data-d365-form][data-d365-theme="brand"]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  ):not(:focus-within):has(
    select option[hidden]:checked,
    select option[disabled]:checked,
    select option[value=""]:checked,
    select option:not([value]):checked,
    select:required:invalid
  )
  :is(label, .lp-ellipsis) {
  color: #6690ff !important;
  -webkit-text-fill-color: #6690ff !important;
}

/*
 * Select placeholder CSS fallback. D365 uses
 * <option value disabled hidden selected>Placeholder text</option> — browsers often still
 * paint that label on the closed select. Primary fix: clearD365SelectPlaceholders.ts
 * blanks the option text; these rules remain as a belt-and-suspenders.
 * Match current selection via :checked (not [selected], which sticks on the placeholder).
 */
.embedded-scripts[data-d365-form]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  )
  select:has(
    option[hidden]:checked,
    option[disabled]:checked,
    option[value=""]:checked,
    option:not([value]):checked
  ),
.embedded-scripts[data-d365-form][data-d365-theme]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  )
  select:has(
    option[hidden]:checked,
    option[disabled]:checked,
    option[value=""]:checked,
    option:not([value]):checked
  ) {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

.embedded-scripts[data-d365-form]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  )
  select
  option:is([hidden], [disabled][value=""], [value=""]:checked, :not([value]):checked),
.embedded-scripts[data-d365-form][data-d365-theme]
  :is(
    .textFormFieldBlock,
    .phoneFormFieldBlock,
    .dateTimeFormFieldBlock,
    .optionSetFormFieldBlock,
    .lookupFormFieldBlock
  )
  select
  option:is([hidden], [disabled][value=""], [value=""]:checked, :not([value]):checked) {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

/*
 * Column width from D365 `data-container-width` (e.g. 50 → 50%, 100 → 100%).
 * Override D365’s default `flex: 0 0 280px` so % widths can actually apply.
 * Mobile: always full width. md+: typed attr() when supported; common width fallbacks.
 */
.embedded-scripts[data-d365-form] .columnContainer,
.embedded-scripts[data-d365-form] .columnContainer * {
  text-align: left !important;
  padding: 0 !important;
}

.embedded-scripts[data-d365-form] .emptyContainer {
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 0 !important;
}

.embedded-scripts[data-d365-form] .columnContainer[data-container-width] {
  box-sizing: border-box !important;
  flex-basis: 100% !important;
  flex-grow: 0 !important;
  flex-shrink: 1 !important;
  max-width: 100% !important;
  min-width: 0 !important;
  width: 100% !important;
}

@media (max-width: 767px) {
  .embedded-scripts[data-d365-form] .wrap-section .innerSection, 
  .embedded-scripts[data-d365-form] .columns-equal-class.wrap-section {
    flex-direction: column;
    gap: 0px !important;
  }
}

@media (min-width: 768px) {
  .embedded-scripts[data-d365-form] .columnContainer[data-container-width="25"] {
    flex-basis: 25% !important;
    width: 25% !important;
  }

  .embedded-scripts[data-d365-form] .columnContainer[data-container-width="33"] {
    flex-basis: 33.333% !important;
    width: 33.333% !important;
  }

  .embedded-scripts[data-d365-form] .columnContainer[data-container-width="50"] {
    flex-basis: 50% !important;
    width: 50% !important;
  }

  .embedded-scripts[data-d365-form] .columnContainer[data-container-width="66"] {
    flex-basis: 66.666% !important;
    width: 66.666% !important;
  }

  .embedded-scripts[data-d365-form] .columnContainer[data-container-width="75"] {
    flex-basis: 75% !important;
    width: 75% !important;
  }

  .embedded-scripts[data-d365-form] .columnContainer[data-container-width="100"],
  .embedded-scripts[data-d365-form] .columnContainer[data-container-width="100%"] {
    flex-basis: 100% !important;
    width: 100% !important;
  }

  .embedded-scripts[data-d365-form] {
    padding: var(--spacing-space-5, 32px) var(--spacing-space-5, 32px) !important;
  }
}

/*
 * --- Phone ---
 * Figma Form (8228:53675): plain underline phone field — no visible country prefix.
 * D365 still presets data-countrycode (e.g. +1) for submit; hide the label UI only.
 */

.embedded-scripts[data-d365-form] .phoneFormFieldBlock .phoneCountryCodeLabel {
  display: none !important;
}

.embedded-scripts[data-d365-form] .phoneFormFieldBlock .phoneCountryCode [data-lastpass-icon-root] {
  display: none !important;
}

/* --- Textarea (static label, elevated surface) --- */

.embedded-scripts[data-d365-form] .textFormFieldBlock:has(textarea) {
  display: block !important;
  flex-direction: column;
  gap: var(--spacing-space-2, 8px);
  margin-inline: 0 !important;
  padding: 0 !important;
  margin-top: 8px !important;
  margin-bottom: var(--spacing-space-5, 32px) !important;
}

.embedded-scripts[data-d365-form] .textFormFieldBlock:has(textarea) > .lp-ellipsis,
.embedded-scripts[data-d365-form] .textFormFieldBlock:has(textarea) > label {
  color: var(--color-fg-default, #000) !important;
  font-family: var(--font-label, Inter, sans-serif) !important;
  font-size: var(--text-label-sm, 12px) !important;
  font-weight: 600 !important;
  letter-spacing: 1.2px !important;
  line-height: 1.1 !important;
  margin: 0 !important;
  overflow: hidden;
  position: static;
  text-overflow: ellipsis;
  text-transform: uppercase !important;
  white-space: nowrap;
  width: 100%;
}

.embedded-scripts[data-d365-form] .textFormFieldBlock:has(textarea) > label {
  margin-bottom: 8px !important;
  display: block !important;
}

/*
 * Textarea border — Figma Form themes 8017:27835 (Input 8208:53666):
 * always 4px solid brand-primary (light/grey/dark → #0050ff; brand theme → #fff).
 */
.embedded-scripts[data-d365-form] .textFormFieldBlock textarea,
.embedded-scripts[data-d365-form] textarea.lp-form-fieldInput {
  background-color: var(--color-surface-elevated, #f5f5f6) !important;
  border: 4px solid var(--color-brand-primary, #0050ff) !important;
  border-radius: 0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  box-sizing: border-box;
  color: var(--color-fg-muted, #27282a) !important;
  font-family: var(--font-body, Montserrat, sans-serif) !important;
  font-size: var(--text-body-sm, 16px) !important;
  font-weight: 400 !important;
  letter-spacing: -0.32px !important;
  line-height: 1.6 !important;
  min-height: 115px !important;
  padding: var(--spacing-space-2, 8px) var(--spacing-space-3, 12px) !important;
  resize: vertical;
  width: 100% !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="light"] .textFormFieldBlock textarea,
.embedded-scripts[data-d365-form][data-d365-theme="light"] textarea.lp-form-fieldInput,
.embedded-scripts[data-d365-form]:not([data-d365-theme]) .textFormFieldBlock textarea,
.embedded-scripts[data-d365-form]:not([data-d365-theme]) textarea.lp-form-fieldInput {
  border-color: #0050ff !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="dark"] .textFormFieldBlock textarea,
.embedded-scripts[data-d365-form][data-d365-theme="dark"] textarea.lp-form-fieldInput {
  border-color: #0050ff !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="brand"] .textFormFieldBlock textarea,
.embedded-scripts[data-d365-form][data-d365-theme="brand"] textarea.lp-form-fieldInput {
  border-color: #ffffff !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="grey"] .textFormFieldBlock textarea,
.embedded-scripts[data-d365-form][data-d365-theme="grey"] textarea.lp-form-fieldInput,
.embedded-scripts[data-d365-form][data-d365-theme="gray"] .textFormFieldBlock textarea,
.embedded-scripts[data-d365-form][data-d365-theme="gray"] textarea.lp-form-fieldInput {
  border-color: #0050ff !important;
}

.embedded-scripts[data-d365-form] .textFormFieldBlock textarea:focus,
.embedded-scripts[data-d365-form] textarea.lp-form-fieldInput:focus {
  border: 4px solid var(--color-brand-primary, #0050ff) !important;
  outline: none !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="brand"] .textFormFieldBlock textarea:focus,
.embedded-scripts[data-d365-form][data-d365-theme="brand"] textarea.lp-form-fieldInput:focus {
  border-color: #ffffff !important;
}

/*
 * --- Checkboxes ---
 * Figma Checkbox 6222:2612 + Form themes (Brand node 8228:53829):
 * 16px, 4px radius, 1px stroke, xs shadow; label gap 8px; stack gap 16px.
 * Unchecked: surface + stroke-default. Checked: brand fill + check icon.
 */
.embedded-scripts[data-d365-form] .twoOptionFormFieldBlock:has(input[type="checkbox"]),
.embedded-scripts[data-d365-form] .textFormFieldBlock:has(input[type="checkbox"]) {
  align-items: flex-start !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 8px;
  margin-top: 0 !important;
  margin-inline: 0 !important;
  margin-bottom: var(--spacing-space-3, 16px) !important;
  min-height: 0;
  padding: 0 !important;
}

.embedded-scripts[data-d365-form] .twoOptionFormFieldBlock:has(input[type="checkbox"]):last-child {
  margin-bottom: 0 !important;
}

/*
 * --- Radios ---
 * Title (`.block-label`) on its own row; options in `.radiobuttons` underneath.
 */
.embedded-scripts[data-d365-form] .twoOptionFormFieldBlock:has(input[type="radio"]),
.embedded-scripts[data-d365-form] .textFormFieldBlock:has(input[type="radio"]) {
  align-items: stretch !important;
  display: flex !important;
  flex-direction: column !important;
  gap: var(--spacing-space-2, 8px);
  margin-top: 0 !important;
  margin-inline: 0 !important;
  margin-bottom: var(--spacing-space-3, 16px) !important;
  min-height: 0;
  padding: 0 !important;
}

.embedded-scripts[data-d365-form] .twoOptionFormFieldBlock:has(input[type="radio"]):last-child {
  margin-bottom: 0 !important;
}

.embedded-scripts[data-d365-form] .twoOptionFormFieldBlock > .block-label,
.embedded-scripts[data-d365-form] .textFormFieldBlock:has(input[type="radio"]) > .block-label {
  color: var(--color-fg-default, #000) !important;
  display: block !important;
  flex: none !important;
  font-family: var(--font-label, Inter, sans-serif) !important;
  font-size: var(--text-label-sm, 12px) !important;
  font-weight: 600 !important;
  letter-spacing: 1.2px !important;
  line-height: 1.1 !important;
  margin: 0 !important;
  text-transform: uppercase !important;
  width: 100% !important;
}

.embedded-scripts[data-d365-form] .radiobuttons {
  display: flex !important;
  flex-direction: column !important;
  gap: var(--spacing-space-2, 8px) !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

.embedded-scripts[data-d365-form] .radiobuttons > div {
  align-items: flex-start !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.embedded-scripts[data-d365-form] .twoOptionFormFieldBlock input[type="checkbox"],
.embedded-scripts[data-d365-form] .textFormFieldBlock input[type="checkbox"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  align-self: flex-start !important;
  background-color: #ffffff !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 14px 14px !important;
  border: 1px solid #d1d2d4 !important;
  border-radius: 4px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  cursor: pointer;
  flex-shrink: 0;
  height: 16px !important;
  margin: 3px 0 0 !important;
  min-height: 16px !important;
  min-width: 16px !important;
  vertical-align: top !important;
  width: 16px !important;
}

.embedded-scripts[data-d365-form] .twoOptionFormFieldBlock input[type="radio"],
.embedded-scripts[data-d365-form] .textFormFieldBlock input[type="radio"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  align-self: flex-start !important;
  background-color: #ffffff !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  border: 1px solid #d1d2d4 !important;
  border-radius: 9999px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  cursor: pointer;
  flex-shrink: 0;
  height: 16px !important;
  margin: 3px 0 0 !important;
  min-height: 16px !important;
  min-width: 16px !important;
  vertical-align: top !important;
  width: 16px !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="light"]
  :is(.twoOptionFormFieldBlock, .textFormFieldBlock)
  :is(input[type="checkbox"], input[type="radio"]),
.embedded-scripts[data-d365-form]:not([data-d365-theme])
  :is(.twoOptionFormFieldBlock, .textFormFieldBlock)
  :is(input[type="checkbox"], input[type="radio"]) {
  background-color: #ffffff !important;
  border-color: #d1d2d4 !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="dark"]
  :is(.twoOptionFormFieldBlock, .textFormFieldBlock)
  :is(input[type="checkbox"], input[type="radio"]) {
  background-color: #000000 !important;
  border-color: #3b3d3f !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="brand"]
  :is(.twoOptionFormFieldBlock, .textFormFieldBlock)
  :is(input[type="checkbox"], input[type="radio"]) {
  background-color: #0050ff !important;
  border-color: #f5f5f6 !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="grey"]
  :is(.twoOptionFormFieldBlock, .textFormFieldBlock)
  :is(input[type="checkbox"], input[type="radio"]),
.embedded-scripts[data-d365-form][data-d365-theme="gray"]
  :is(.twoOptionFormFieldBlock, .textFormFieldBlock)
  :is(input[type="checkbox"], input[type="radio"]) {
  background-color: #f5f5f6 !important;
  border-color: #d1d2d4 !important;
}

.embedded-scripts[data-d365-form]
  :is(.twoOptionFormFieldBlock, .textFormFieldBlock)
  input[type="checkbox"]:checked {
  background-color: #0050ff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") !important;
  border-color: #0050ff !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="brand"]
  :is(.twoOptionFormFieldBlock, .textFormFieldBlock)
  input[type="checkbox"]:checked {
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230050ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") !important;
  border-color: #ffffff !important;
}

.embedded-scripts[data-d365-form]
  :is(.twoOptionFormFieldBlock, .textFormFieldBlock)
  input[type="radio"]:checked {
  background-color: #0050ff !important;
  background-image: radial-gradient(circle, #ffffff 35%, transparent 36%) !important;
  border-color: #0050ff !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="brand"]
  :is(.twoOptionFormFieldBlock, .textFormFieldBlock)
  input[type="radio"]:checked {
  background-color: #ffffff !important;
  background-image: radial-gradient(circle, #0050ff 35%, transparent 36%) !important;
  border-color: #ffffff !important;
}

.embedded-scripts[data-d365-form]
  :is(.twoOptionFormFieldBlock, .textFormFieldBlock)
  :is(input[type="checkbox"], input[type="radio"]):focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 80, 255, 0.1) !important;
  outline: none !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="brand"]
  :is(.twoOptionFormFieldBlock, .textFormFieldBlock)
  :is(input[type="checkbox"], input[type="radio"]):focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25) !important;
}

.embedded-scripts[data-d365-form]
  :is(.twoOptionFormFieldBlock, .textFormFieldBlock)
  :is(input[type="checkbox"], input[type="radio"]):disabled {
  cursor: not-allowed;
  opacity: 0.5 !important;
}

.embedded-scripts[data-d365-form] .twoOptionFormFieldBlock:has(input[type="checkbox"]) label,
.embedded-scripts[data-d365-form] .twoOptionFormFieldBlock:has(input[type="checkbox"]) .lp-ellipsis,
.embedded-scripts[data-d365-form] .textFormFieldBlock:has(input[type="checkbox"]) label,
.embedded-scripts[data-d365-form] .textFormFieldBlock:has(input[type="checkbox"]) .lp-ellipsis,
.embedded-scripts[data-d365-form] .radiobuttons label {
  color: var(--color-fg-default, #000) !important;
  -webkit-text-fill-color: var(--color-fg-default, #000) !important;
  flex: 1;
  font-family: var(--font-body, Montserrat, sans-serif) !important;
  font-size: var(--text-body-sm, 16px) !important;
  font-weight: 500 !important;
  letter-spacing: -0.32px !important;
  line-height: 1.6 !important;
  margin: 0 !important;
  max-width: none !important;
  overflow: visible !important;
  position: static !important;
  text-overflow: unset !important;
  text-transform: none !important;
  transform: none !important;
  white-space: normal !important;
}

/* --- Submit --- */

.embedded-scripts[data-d365-form] div[data-editorblocktype="SubmitButton"] {
  display: flex !important;
  justify-content: flex-end !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: right !important;
  width: 100% !important;
}

.embedded-scripts[data-d365-form] div[data-editorblocktype="Text"],
.embedded-scripts[data-d365-form] div[data-editorblocktype="text"] {
  margin: 0 !important;
}

/* D365 text blocks often wrap copy in <span> with inline colors — match .marketingForm p. */
.embedded-scripts[data-d365-form] div[data-editorblocktype="Text"] p span,
.embedded-scripts[data-d365-form] div[data-editorblocktype="text"] p span {
  color: var(--color-fg-muted, #27282a) !important;
}

.embedded-scripts[data-d365-form] .lp-form-button,
.embedded-scripts[data-d365-form] button[type="submit"],
.embedded-scripts[data-d365-form] input[type="submit"] {
  align-items: center;
  align-self: flex-end;
  background-color: var(--color-brand-primary, #0050ff) !important;
  border: none !important;
  border-radius: var(--radius-full, 9999px) !important;
  color: var(--color-fg-on-primary, #fff) !important;
  cursor: pointer;
  display: inline-flex !important;
  font-family: var(--font-label, Inter, sans-serif) !important;
  font-size: var(--text-label-lg, 16px) !important;
  font-weight: 500 !important;
  gap: var(--spacing-space-1, 4px);
  justify-content: center;
  letter-spacing: 0 !important;
  line-height: 1.1 !important;
  margin-top: 0 !important;
  min-height: 44px !important;
  padding: var(--spacing-space-2, 8px) var(--spacing-space-4, 24px) !important;
  text-transform: uppercase !important;
  transition: background-color 0.2s ease;
  width: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.embedded-scripts[data-d365-form] .lp-form-button:hover,
.embedded-scripts[data-d365-form] button[type="submit"]:hover,
.embedded-scripts[data-d365-form] input[type="submit"]:hover {
  background-color: var(--color-brand-primary-hover, #0040cc) !important;
}

.embedded-scripts[data-d365-form] .lp-form-button:focus-visible,
.embedded-scripts[data-d365-form] button[type="submit"]:focus-visible,
.embedded-scripts[data-d365-form] input[type="submit"]:focus-visible {
  outline: 2px solid var(--color-stroke-focus, #0050ff) !important;
  outline-offset: 2px;
}

/* Submit arrow (CSS ::after — matches ButtonBlock hover nudge) */
.embedded-scripts[data-d365-form] .lp-form-button::after,
.embedded-scripts[data-d365-form] button[type="submit"]::after {
  background-color: currentColor;
  content: "";
  display: inline-block;
  flex-shrink: 0;
  height: 1.5rem;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E")
    center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E")
    center / contain no-repeat;
  transform: translateX(0);
  transition: transform 0.3s ease-out;
  width: 1.5rem;
}

@media (min-width: 1024px) {
  .embedded-scripts[data-d365-form] .lp-form-button::after,
  .embedded-scripts[data-d365-form] button[type="submit"]::after {
    transform: translateX(0.25rem);
  }

  .embedded-scripts[data-d365-form] {
    padding: var(--spacing-space-5, 32px) var(--spacing-space-5, 32px) !important;
  }
}

@media (min-width: 1280px) {
  .embedded-scripts[data-d365-form] {
    padding: var(--spacing-space-5, 32px) var(--spacing-space-3, px) !important;
  }
}

.embedded-scripts[data-d365-form]
  :is(.lp-form-button, button[type="submit"]):not([aria-disabled="true"]):hover::after {
  transform: translateX(0.25rem);
}

@media (min-width: 1024px) {
  .embedded-scripts[data-d365-form]
    :is(.lp-form-button, button[type="submit"]):not([aria-disabled="true"]):hover::after {
    transform: translateX(0.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .embedded-scripts[data-d365-form] .lp-form-button::after,
  .embedded-scripts[data-d365-form] button[type="submit"]::after {
    transition: none;
  }

  .embedded-scripts[data-d365-form]
    :is(.lp-form-button, button[type="submit"]):not([aria-disabled="true"]):hover::after {
    transform: translateX(0);
  }

  @media (min-width: 1024px) {
    .embedded-scripts[data-d365-form]
      :is(.lp-form-button, button[type="submit"]):not([aria-disabled="true"]):hover::after {
      transform: translateX(0.25rem);
    }
  }
}

.embedded-scripts[data-d365-form] .innerSection.wrap-section,
.embedded-scripts[data-d365-form] .columns-equal-class.wrap-section {
  max-width: 100% !important;
  gap: 24px;
}

.embedded-scripts[data-d365-form][data-d365-theme="light"] .wrap-section {
  background-color: #ffffff !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="dark"] .wrap-section {
  background-color: #000000 !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="brand"] .wrap-section {
  background-color: #0050ff !important;
}

.embedded-scripts[data-d365-form][data-d365-theme="grey"] .wrap-section,
.embedded-scripts[data-d365-form][data-d365-theme="gray"] .wrap-section {
  background-color: #f5f5f6 !important;
}

/*
 * Form embed modal shell (Figma 8228:53675) — panel owns padding/background;
 * nested form skin should not double-pad or paint a second surface.
 */
.form-embed-modal-panel .embedded-scripts[data-d365-form] {
  background-color: transparent;
  padding: 0;
  text-align: left !important;
}

/* Modal: drop extra top padding on the first form section. */
.form-embed-modal-panel
  .embedded-scripts[data-d365-form]
  .marketingForm
  > div
  > .wrap-section:first-child {
  padding-top: 0 !important;
}

.form-embed-modal-panel[data-d365-theme="dark"] .form-embed-modal-close,
.form-embed-modal-panel[data-d365-theme="brand"] .form-embed-modal-close {
  color: #ffffff;
}

.form-embed-modal-panel[data-d365-theme="dark"] .form-embed-modal-close:focus-visible,
.form-embed-modal-panel[data-d365-theme="brand"] .form-embed-modal-close:focus-visible {
  outline-color: #ffffff;
}

/*
 * D365 “Hide field” (UTM, etc.): data-hide + inline display:none loses to
 * display:block !important on FormFieldBlocks — exclude above and force hide.
 */
.embedded-scripts[data-d365-form] [data-hide="hide"],
.embedded-scripts[data-d365-form] [data-hide="true"] {
  display: none !important;
}

.form-embed-modal-body .embedded-scripts[data-d365-form] {
  padding: 0 !important;
}
