/** Local country-flag subset renders flags even when the operating system lacks flag emoji. */
@font-face {
    font-family: 'SWS Country Flags';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/NotoColorEmojiFlags.woff2') format('woff2');
    unicode-range: U+1F1E6-1F1FF;
}

/** Release only the form-page container so the title banner can span the page like About and Team. */
.cms-page-view.cms-sws-safety-workwear-catalogue .page-main,
.cms-page-view.cms-product-demonstrations .page-main {
    max-width: none;
    padding: 0;
}

/** Dedicated-page layout stays separate from the shared HubSpot form branding. */
.sws-form-page {
    --sws-form-pink: #df228f;
    --sws-form-panel: #c21d7c;
    --sws-form-ink: #231f20;
    color: var(--sws-form-ink);
    font-family: 'Barlow', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    /** Contain third-party dropdown layers below the sticky site header. */
    isolation: isolate;
    margin: 0 0 64px;
}

.sws-form-page,
.sws-form-page * {
    box-sizing: border-box;
}

.sws-form-page h1,
.sws-form-page h2 {
    font-family: 'Barlow Semi Condensed', 'Barlow', Arial, sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

.sws-form-page__hero {
    background: var(--sws-form-pink);
    color: #fff;
    padding: 80px max(24px, calc((100% - 1232px) / 2));
    position: relative;
}

.sws-form-page__hero-image {
    height: 100%;
    inset: 0;
    object-fit: cover;
    object-position: center;
    position: absolute;
    width: 100%;
    z-index: 0;
}

.sws-form-page--catalogue .sws-form-page__hero-image {
    object-position: center 35%;
}

.sws-form-page__hero::before {
    background: linear-gradient(90deg, rgb(139 10 81 / 92%), rgb(174 13 103 / 78%));
    content: '';
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 1;
}

.sws-form-page__hero > :not(.sws-form-page__hero-image) {
    position: relative;
    z-index: 2;
}

.sws-form-page__hero h1 {
    color: #fff;
    font-size: clamp(32px, 4vw, 48px);
    margin: 0 0 20px;
}

.sws-form-page__eyebrow {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0 0 12px;
    text-transform: uppercase;
}

.sws-form-page__hero > p:not(.sws-form-page__eyebrow) {
    font-size: 20px;
    margin: 0 0 24px;
    max-width: 820px;
}

.sws-form-page a {
    color: #98145f;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sws-form-page a.sws-form-page__cta {
    background: var(--sws-form-ink);
    border-radius: 4px;
    color: #fff;
    display: inline-block;
    font-weight: 700;
    padding: 12px 24px;
    text-decoration: none;
}

.sws-form-page a.sws-form-page__cta:hover {
    background: #4a4145;
}

.sws-form-page__grid {
    align-items: start;
    display: grid;
    gap: 48px;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
    margin: 0 auto;
    max-width: 1280px;
    padding: 56px 24px 0;
    width: 100%;
}

.sws-form-page__content,
.sws-form-page__form-panel {
    min-width: 0;
}

.sws-form-page__content section + section {
    margin-top: 32px;
}

.sws-form-page__content h2 {
    color: var(--sws-form-ink);
    font-size: 28px;
    margin: 0 0 16px;
}

.sws-form-page__content p {
    margin: 0 0 18px;
}

.sws-form-page__content ul,
.sws-form-page__content ol {
    margin: 0 0 20px;
    padding-left: 24px;
}

.sws-form-page__content li + li {
    margin-top: 10px;
}

.sws-form-page__form-panel {
    background: var(--sws-form-panel);
    border-radius: 10px;
    color: #fff;
    padding: 32px 24px;
    scroll-margin-top: 32px;
}

.sws-form-page .sws-form-page__form-help {
    font-size: 14px;
    margin: 24px 0 0;
}

.sws-form-page__form-help a {
    color: #fff;
}

/** Documented HubSpot variables keep branding local while preserving native form behavior. */
.sws-hubspot-form {
    --hsf-global__font-family: 'Barlow', Arial, sans-serif;
    --hsf-global__font-size: 16px;
    --hsf-global__color: #fff;
    --hsf-heading__font-family: 'Barlow Semi Condensed', 'Barlow', Arial, sans-serif;
    --hsf-heading__color: #fff;
    --hsf-richtext__color: #fff;
    --hsf-field-label__color: #fff;
    --hsf-field-label-requiredindicator__color: #fff;
    --hsf-field-description__color: #fff;
    --hsf-field-footer__color: #fff;
    --hsf-erroralert__color: #fff;
    --hsf-field-input__color: #231f20;
    --hsf-field-input__background-color: #fff;
    --hsf-field-input__border-color: #e3dce0;
    --hsf-field-input__border-radius: 4px;
    --hsf-field-input__padding: 12px;
    --hsf-field-textarea__color: #231f20;
    --hsf-field-textarea__background-color: #fff;
    --hsf-field-textarea__border-radius: 4px;
    --hsf-field-textarea__padding: 12px;
    --hsf-background__padding: 0;
    --hsf-background__background-color: transparent;
    --hsf-row__horizontal-spacing: 20px;
    --hsf-row__vertical-spacing: 18px;
    --hsf-button__font-family: 'Barlow', Arial, sans-serif;
    --hsf-button__background-color: #231f20;
    --hsf-button__color: #fff;
    --hsf-button__border-radius: 4px;
    --hsf-button__padding: 12px 24px;
    line-height: 1.6;
    min-width: 0;
}

.sws-hubspot-form .hsfc-Step__Content > .hsfc-Row:first-child .hsfc-RichText > p:first-child {
    font-family: 'Barlow Semi Condensed', 'Barlow', Arial, sans-serif;
    font-weight: 700;
}

.sws-hubspot-form .hsfc-FieldLabel__RequiredIndicator {
    margin-inline-start: 4px;
}

.sws-hubspot-form input:not([type='hidden']):not([type='checkbox']):not([type='radio']),
.sws-hubspot-form select,
.sws-hubspot-form textarea {
    box-sizing: border-box;
    max-width: 100%;
    min-height: 44px;
}

.sws-hubspot-form button {
    font-weight: 700;
    min-height: 44px;
}

.sws-hubspot-form button:hover {
    --hsf-button__background-color: #4a4145;
}

.sws-form-page a:focus-visible {
    outline: 3px solid #231f20;
    outline-offset: 3px;
}

/** HubSpot's focus reset must not hide the keyboard focus indicator on the dark form panel. */
.sws-form-page .sws-hubspot-form input:focus-visible,
.sws-form-page .sws-hubspot-form select:focus-visible,
.sws-form-page .sws-hubspot-form textarea:focus-visible,
.sws-form-page .sws-hubspot-form button:focus-visible {
    outline: 3px solid #fff !important;
    outline-offset: 3px;
}

/** Country flags need input contrast and emoji fonts rather than the white form text style. */
.sws-hubspot-form .hsfc-PhoneInput__FlagAndCaret {
    color: var(--hsf-field-input__color, #231f20);
}

.sws-hubspot-form .hsfc-PhoneInput__FlagAndCaret__Flag,
.sws-hubspot-form .hsfc-PhoneInput .hsfc-DropdownOptions__List__ListItem {
    font-family: 'SWS Country Flags', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji',
        'Barlow', Arial, sans-serif;
}

/** Treat the country selector and number input as one focused phone control. */
.sws-form-page .sws-hubspot-form .hsfc-PhoneInput:focus-within {
    border-radius: 4px;
    outline: 3px solid #fff !important;
    outline-offset: 3px;
}

.sws-form-page .sws-hubspot-form .hsfc-PhoneInput > input:focus-visible,
.sws-form-page .sws-hubspot-form .hsfc-PhoneInput > .hsfc-PhoneInput__FlagAndCaret:focus-visible {
    outline: none !important;
}

@media (max-width: 1023px) {
    .sws-form-page__grid {
        gap: 28px;
        grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
    }
}

@media (max-width: 767px) {
    .sws-form-page__hero {
        padding: 48px 24px;
    }

    .sws-form-page__hero > p:not(.sws-form-page__eyebrow) {
        font-size: 18px;
    }

    .sws-form-page__grid {
        gap: 24px;
        grid-template-columns: minmax(0, 1fr);
        padding-top: 32px;
    }

    .sws-form-page__form-panel {
        padding: 28px 20px;
    }
}
