:root {
    /*
      Dark colours
    */
    --colour-black: #000000;
    --colour-dark-blue: #003caa;
    --colour-dark-grey: #747a80;

    /*
      Outline colours
    */
    --colour-outline-grey: #cfdbd5;

    /*
      Light colours
    */
    --colour-white: #ffffff;
    --colour-light-grey: #f1f5f5;
    --colour-light-blue: #00a0ff;
    --colour-green: #6ecc34;
    --colour-red: #ff0000;
    --colour-gold: #eac860;
    /*
      Announcements-Alerts colours
    */
    --colour-announcement-blue: #ccecff;
    --colour-announcement-pale-orange: #ffebd9;
    --colour-announcement-green: #d4efdb;
    --colour-announcement-red: #ffcfcd;

    /*
      Margin/padding/gap sizing
    */
    --spacing-xxx-large: 2rem;
    --spacing-xx-large: 1.75rem;
    --spacing-x-large: 1.5rem;
    --spacing-large: 1.25rem;
    --spacing-medium: 1rem;
    --spacing-small: 0.75rem;
    --spacing-x-small: 0.5rem;
    --spacing-xx-small: 0.3rem;

    /*
        Typography
      */
    --font-size-xx-large: 2rem;
    --font-size-x-large: 1.5rem;
    --font-size-large: 1.25rem;
    --font-size-medium: 1rem;
    --font-size-small: 0.875rem;
    --font-size-x-small: 0.75rem;
    --font-size-xx-small: 0.625rem;

    --font-weight-bold: 700;
    --font-weight-semibold: 600;
    --font-weight-regular: 400;
    --font-weight-light: 300;

    /* --header-height: 11svh;
  --footer-height: 7svh;
  --unavailable-space: calc(var(--header-height) + var(--footer-height));
  --available-space: calc(100svh - var(--unavailable-space) - 10px); */
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.align-center {
    align-items: center;
}
.space-between {
    justify-content: space-between;
}
.space-around {
    justify-content: space-around;
}
.align-self-center {
    align-self: center;
}

.gap_xx-large {
    gap: var(--spacing-xx-large);
}
.gap_x-large {
    gap: var(--spacing-x-large);
}
.gap_large {
    gap: var(--spacing-large);
}
.gap_medium {
    gap: var(--spacing-medium);
}
.gap_small {
    gap: var(--spacing-small);
}
.gap_x-small {
    gap: var(--spacing-x-small);
}
.gap_xx-small {
    gap: var(--spacing-xx-small);
}

/*
      Checkbox animation
  */
.checkbox-el {
    position: relative;
    margin-left: 4px;
    width: 25px;
    float: left;
    margin: 2px 10px 2px 1px;
    height: 25px;
    border-radius: 50%;
    vertical-align: middle;
    border: 2px solid var(--colour-outline-grey);
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    padding: 5px;
}
.checkbox-el[data-checked='true'] {
    border-color: var(--colour-green);
}

.checkbox-el input {
    width: 100%;
    height: 100%;
    position: absolute;
    top: -3px;
    left: -3px;
    z-index: 5;
    opacity: 0;
    cursor: pointer;
}

.checkbox-circle {
    position: relative;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    z-index: 1;
    transform: scale(0.5);
    transition: all 0.25s ease-in;
}

.checkbox-el input:checked + .checkbox-circle {
    background-color: var(--colour-green);

    transform: scale(1);
}

/*
    Site defaults
  */
.underline {
    border-bottom: 1px solid var(--colour-outline-grey);
}
/* .header {
  max-height: var(--header-height);
} */
/* .footer {
  height: var(--footer-height);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
} */

.remove-section-block-padding {
    --dxp-s-section-content-spacing-block-start: 0px;
    --dxp-s-section-content-spacing-block-end: 0px;
    --dxp-s-section-content-spacing-block-start-tablet: 0px;
    --dxp-s-section-content-spacing-block-end-tablet: 0px;
    --dxp-s-section-content-spacing-block-start-mobile: 0px;
    --dxp-s-section-content-spacing-block-end-mobile: 0px;
    margin-block: 0;
}

.branding-overrides {
    --text-colour: var(--colour-white);
    --slds-c-button-brand-text-color: var(--colour-white);
    --dxp-s-button-color-contrast: var(--text-colour);
    --dxp-g-brand-contrast: var(--colour-white);
    --slds-c-card-sizing-border: 0px;
    --dxp-s-form-element-label-color: var(--text-colour);
    --slds-g-color-border-base-1: transparent;
    --slds-c-card-shadow: none;
    --dxp-g-brand: var(--colour-light-blue);
}

/* c-mobile-wizard-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
} */
body {
    font-family:
        Manrope,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        Roboto,
        Oxygen,
        Ubuntu,
        Cantarell,
        'Open Sans',
        'Helvetica Neue',
        sans-serif;
    font-style: normal;
    line-height: normal;
    font-size: var(--font-size-small);
    margin: 0;
}
.content-section {
    height: var(--available-space);
    overflow-y: auto;
    /* -ms-overflow-style: none;
  scrollbar-width: none; */
}
.content-section-full {
    /* --footer-height: 0px;
  --header-height: 0px; */
    width: 100svw;
    height: 100svh;
}

/*Experimental*/
c-i-t-community-theme,
community_byo-scoped-header-and-footer {
    display: flex;
    flex-direction: column;
    height: 100svh;

    > section {
        flex-grow: 1;
        overflow-y: auto;
    }
    > main {
        flex-grow: 1;
        overflow-y: auto;
    }
    > footer {
        height: fit-content;
        & community_layout-section {
            height: fit-content;
        }
    }
}
/* Experimental*/

/* .content-section::-webkit-scrollbar {
  display: none;
} */
@media (min-width: 54em) {
    /* :root {
    --header-height: 5svh;
    --footer-height: 7svh;
  } */
}
@media (min-width: 64em) {
    /* :root {
    --footer-height: 0px;
    --header-height: 9svh;
  } */
    body {
        font-size: var(--font-size-medium);
    }
    .header {
        min-height: 5.5rem;
    }
}
/* ══════════════════════════════════════════════════════════════════════
   FLOW LWR STYLING — Head Markup  (scoped to flowruntime-flow)
   ══════════════════════════════════════════════════════════════════════
   CHANGE LOG (vs original):
   1. Every rule scoped under  flowruntime-flow  so styles stay inside
      flows and don't bleed into login, nav, or other portal components.
   2. :root tokens left global — they're inert unless referenced.
   3. Consolidated a few redundant selectors.
   4. Added  .slds-form-element__control:has(select):focus-within  which
      was missing the same focus treatment inputs/textareas got.
   5. Swapped the broad [class*='slds-form-element'] attribute selectors
      for the actual class — attribute selectors are slower and can match
      unrelated elements (e.g. slds-form-element_horizontal).
   6. Added :where() around the scoping selector to keep specificity the
      same as before — makes future overrides easier.  If you need to
      support older Safari (<17) or Chrome (<105), remove :where() and
      use the bare  flowruntime-flow  prefix instead.
   7. Minor: grouped related mobile overrides together.
   ══════════════════════════════════════════════════════════════════════ */

/* ── Design tokens (global — harmless, only used when referenced) ── */
:root {
    --brand-primary: #00a0ff;
    --brand-primary-dk: #0082cc;
    --brand-navy: #032d60;
    --text-default: #3e3e3c;
    --border-default: #e5e5e5;
    --border-input: #c9c9c9;
    --error: #ba0517;
    --radius-card: 0.5rem;
    --radius-btn: 0.35rem;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-focus: 0 0 0 3px rgba(0, 160, 255, 0.15);
}

/* ── Page / section title ──────────────────────────────────────────── */
:where(flowruntime-flow) .slds-section__title,
:where(flowruntime-flow) .flowruntimeFlowScreenSection h2 {
    font-size: 1.875rem !important;
    font-weight: 600 !important;
    color: var(--brand-navy) !important;
    padding-bottom: 0.75rem !important;
    border-bottom: 2px solid var(--brand-primary) !important;
    margin-bottom: 1.25rem !important;
}

@media (max-width: 480px) {
    :where(flowruntime-flow) .slds-section__title,
    :where(flowruntime-flow) .flowruntimeFlowScreenSection h2 {
        font-size: 1.375rem !important;
    }
}

/* ── General form element spacing ──────────────────────────────────── */
:where(flowruntime-flow) .slds-form-element {
    margin-bottom: 0.75rem !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: 100% !important;
}

/* ── Question labels ───────────────────────────────────────────────── */
:where(flowruntime-flow) .slds-form-element__label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.1rem !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    color: var(--text-default) !important;
    margin-bottom: 0.35rem !important;
    flex-wrap: nowrap !important;
}

/* Required asterisk */
:where(flowruntime-flow) .slds-required {
    display: inline !important;
    color: var(--error) !important;
    font-size: 0.9em !important;
    font-weight: 600 !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    margin-right: 0.15rem !important;
    margin-left: 0 !important;
}

/* ── Help / hint text (default grey) ───────────────────────────────── */
:where(flowruntime-flow) .slds-form-element__help {
    font-size: 0.8125rem !important;
    color: #706e6b !important;
    margin-top: 0.3rem !important;
}

/* ── Error states — only SF-driven, never on page load ─────────────── */

:where(flowruntime-flow) .slds-has-error .slds-form-element__control,
:where(flowruntime-flow)
    .slds-form-element.slds-has-error
    .slds-form-element__control,
:where(flowruntime-flow) [data-has-error] .slds-form-element__control {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 3px rgba(186, 5, 23, 0.1) !important;
}

/* Input itself never shows its own red border — card handles it */
:where(flowruntime-flow) .slds-has-error .slds-input,
:where(flowruntime-flow) .slds-has-error input {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Error help text — before Next is clicked */
:where(flowruntime-flow) .slds-has-error .slds-form-element__help,
:where(flowruntime-flow)
    .slds-form-element.slds-has-error
    .slds-form-element__help,
:where(flowruntime-flow) [data-has-error] .slds-form-element__help {
    color: var(--error) !important;
}

/* Error help text — after Next is clicked (flow runtime class) */
:where(flowruntime-flow) .flowruntime-input-error,
:where(flowruntime-flow) .flowruntime-input-error.slds-form-element__help {
    color: var(--error) !important;
    font-size: 0.8125rem !important;
    margin-top: 0.3rem !important;
}

/* ── Hide SF's injected ERROR icons — leave functional icons alone ──
   Strategy: use direct-child (>) so we only target icons sitting at
   the top level of .slds-form-element__control (= error icons).
   Datepicker arrows, combobox chevrons etc. are nested deeper inside
   popup containers and won't be matched.
   ──────────────────────────────────────────────────────────────────── */

/* When input has content → hide top-level icons in the control wrapper */
:where(flowruntime-flow)
    .slds-form-element__control:has(input:not(:placeholder-shown))
    > .slds-input__icon,
:where(flowruntime-flow)
    .slds-form-element__control:has(input:not(:placeholder-shown))
    > .slds-input__icon-group,
:where(flowruntime-flow)
    .slds-form-element__control:has(input:not(:placeholder-shown))
    > lightning-icon,
:where(flowruntime-flow)
    .slds-form-element__control:has(input:not(:placeholder-shown))
    > lightning-primitive-icon {
    display: none !important;
}

/* When input is focused → also hide */
:where(flowruntime-flow)
    .slds-form-element__control:has(input:focus)
    > .slds-input__icon,
:where(flowruntime-flow)
    .slds-form-element__control:has(input:focus)
    > .slds-input__icon-group,
:where(flowruntime-flow)
    .slds-form-element__control:has(input:focus)
    > lightning-icon,
:where(flowruntime-flow)
    .slds-form-element__control:has(input:focus)
    > lightning-primitive-icon {
    display: none !important;
}

/* Always hide the explicit error icon class at top level */
:where(flowruntime-flow) .slds-form-element__control > .slds-icon-text-error {
    display: none !important;
}

/* Suppress all browser native validation UI (these are global — fine,
   they only target pseudo-elements that don't affect layout) */
input::-webkit-validation-bubble,
input::-webkit-validation-bubble-message,
input::-webkit-validation-bubble-arrow,
input::-webkit-validation-bubble-arrow-clipper,
input::-webkit-validation-bubble-icon,
input::-ms-clear,
input::-ms-reveal {
    display: none !important;
}

:where(flowruntime-flow) input:invalid,
:where(flowruntime-flow) select:invalid {
    box-shadow: none !important;
    outline: none !important;
}

/* ── Card wrapper — inputs and textareas ───────────────────────────── */
:where(flowruntime-flow)
    .slds-form-element__control:has(
        input:not([type='radio']):not([type='checkbox'])
    ),
:where(flowruntime-flow) .slds-form-element__control:has(textarea) {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    border: 1px solid var(--border-default) !important;
    border-radius: var(--radius-card) !important;
    padding: 0 !important;
    box-shadow: var(--shadow-card) !important;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease !important;
}

/* Textarea wrapper needs vertical padding */
:where(flowruntime-flow) .slds-form-element__control:has(textarea) {
    align-items: flex-start !important;
    padding: 0.5rem 0.75rem !important;
}

/* Focus ring on input/textarea cards */
:where(flowruntime-flow)
    .slds-form-element__control:focus-within:has(
        input:not([type='radio']):not([type='checkbox'])
    ),
:where(flowruntime-flow)
    .slds-form-element__control:focus-within:has(textarea) {
    border-color: var(--brand-primary) !important;
    box-shadow: var(--shadow-focus) !important;
}

/* ── Text inputs ───────────────────────────────────────────────────── */
:where(flowruntime-flow) .slds-input,
:where(flowruntime-flow)
    .slds-form-element
    input:not([type='radio']):not([type='checkbox']) {
    height: 2.5rem !important;
    min-height: 2.5rem !important;
    width: 100% !important;
    font-size: 1rem !important;
    padding: 0 0.75rem !important;
    line-height: 2.5rem !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    color: var(--text-default) !important;
}

:where(flowruntime-flow) .slds-input:focus,
:where(flowruntime-flow)
    .slds-form-element
    input:not([type='radio']):not([type='checkbox']):focus {
    outline: none !important;
    box-shadow: none !important;
}

/* ── Textarea ──────────────────────────────────────────────────────── */
:where(flowruntime-flow) .slds-textarea,
:where(flowruntime-flow) .slds-form-element textarea {
    font-size: 1rem !important;
    min-height: 5rem !important;
    width: 100% !important;
    border: none !important;
    background: transparent !important;
    padding: 0.25rem 0 !important;
    resize: vertical !important;
    color: var(--text-default) !important;
    line-height: 1.5 !important;
}

/* ── Picklist / Select ─────────────────────────────────────────────── */
:where(flowruntime-flow) .slds-form-element__control:has(select) {
    width: 100% !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    border: 1px solid var(--border-default) !important;
    border-radius: var(--radius-card) !important;
    padding: 0 !important;
    box-shadow: var(--shadow-card) !important;
    overflow: hidden !important;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease !important;
}

:where(flowruntime-flow) .slds-form-element__control:focus-within:has(select) {
    border-color: var(--brand-primary) !important;
    box-shadow: var(--shadow-focus) !important;
}

:where(flowruntime-flow) .slds-select,
:where(flowruntime-flow) .slds-form-element select {
    width: 100% !important;
    height: 2.5rem !important;
    font-size: 1rem !important;
    color: var(--text-default) !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    padding: 0 0.75rem !important;
    cursor: pointer !important;
    box-shadow: none !important;
}

:where(flowruntime-flow) .slds-select option,
:where(flowruntime-flow) .slds-form-element select option {
    font-size: 1rem !important;
    padding: 0.35rem 0.75rem !important;
}

/* ── Radio buttons ─────────────────────────────────────────────────── */
:where(flowruntime-flow) .slds-radio {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0.4rem !important;
}

:where(flowruntime-flow) .slds-radio__label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem !important;
    cursor: pointer !important;
}

:where(flowruntime-flow) .slds-radio_faux {
    display: inline-flex !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    border: 2px solid var(--border-input) !important;
    background: #fff !important;
    transition:
        border-color 0.15s ease,
        background-color 0.15s ease !important;
    margin: 0 !important;
}

:where(flowruntime-flow)
    .slds-radio
    [type='radio']:checked
    + .slds-radio__label
    .slds-radio_faux,
:where(flowruntime-flow) .slds-radio_faux[data-checked] {
    border-color: var(--brand-primary) !important;
    background-color: var(--brand-primary) !important;
    box-shadow: inset 0 0 0 3px #fff !important;
}

:where(flowruntime-flow) .slds-radio__label .slds-form-element__label {
    font-size: 1rem !important;
    font-weight: 400 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

/* ── Checkboxes ────────────────────────────────────────────────────── */
:where(flowruntime-flow) .slds-checkbox {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0.4rem !important;
}

:where(flowruntime-flow) .slds-checkbox__label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem !important;
    cursor: pointer !important;
}

:where(flowruntime-flow) .slds-checkbox_faux {
    display: inline-flex !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 3px !important;
    border: 2px solid var(--border-input) !important;
    background: #fff !important;
    transition:
        border-color 0.15s ease,
        background-color 0.15s ease !important;
    margin: 0 !important;
}

:where(flowruntime-flow)
    .slds-checkbox
    [type='checkbox']:checked
    + .slds-checkbox__label
    .slds-checkbox_faux,
:where(flowruntime-flow) .slds-checkbox_faux[data-checked] {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='%23fff' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 10px !important;
}

:where(flowruntime-flow) .slds-checkbox__label .slds-form-element__label {
    font-size: 1rem !important;
    font-weight: 400 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

/* ── Combobox / Lookup ─────────────────────────────────────────────── */
:where(flowruntime-flow) .slds-combobox__form-element {
    background: #ffffff !important;
    border: 1px solid var(--border-default) !important;
    border-radius: var(--radius-card) !important;
    box-shadow: var(--shadow-card) !important;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease !important;
}

:where(flowruntime-flow) .slds-combobox__form-element:focus-within {
    border-color: var(--brand-primary) !important;
    box-shadow: var(--shadow-focus) !important;
}

:where(flowruntime-flow) .slds-combobox__form-element input {
    font-size: 1rem !important;
    color: var(--text-default) !important;
}

/* ── Flow nav buttons ──────────────────────────────────────────────── */
:where(flowruntime-flow) .slds-button {
    font-size: 0.9375rem !important;
    font-weight: 500 !important;
    border-radius: var(--radius-btn) !important;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease !important;
}

:where(flowruntime-flow) .slds-button.slds-button_brand {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #ffffff !important;
}

:where(flowruntime-flow) .slds-button.slds-button_brand:hover,
:where(flowruntime-flow) .slds-button.slds-button_brand:focus {
    background-color: var(--brand-primary-dk) !important;
    border-color: var(--brand-primary-dk) !important;
    color: #ffffff !important;
    box-shadow: var(--shadow-focus) !important;
}

:where(flowruntime-flow) .slds-button.slds-button_neutral {
    background-color: #ffffff !important;
    border-color: var(--border-input) !important;
    color: var(--text-default) !important;
}

:where(flowruntime-flow) .slds-button.slds-button_neutral:hover,
:where(flowruntime-flow) .slds-button.slds-button_neutral:focus {
    background-color: #f3f3f3 !important;
    border-color: #adadad !important;
    color: var(--text-default) !important;
}

/* ── Mobile ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    :where(flowruntime-flow) .slds-form-element__label {
        font-size: 0.875rem !important;
    }

    :where(flowruntime-flow) .slds-input,
    :where(flowruntime-flow) .slds-select,
    :where(flowruntime-flow) .slds-textarea,
    :where(flowruntime-flow)
        .slds-form-element
        input:not([type='radio']):not([type='checkbox']),
    :where(flowruntime-flow) .slds-form-element select,
    :where(flowruntime-flow) .slds-form-element textarea {
        font-size: 0.9375rem !important;
    }

    :where(flowruntime-flow) .slds-button.slds-button_brand,
    :where(flowruntime-flow) .slds-button.slds-button_neutral {
        width: 100% !important;
        justify-content: center !important;
    }
}
