@import url("https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;500;700&display=swap");

/*
 * Lead form «lead_form_v1» (skill forms-design): the form page and the willowTree leadForm widget on a location page.
 * Colour priority: the form's constructor (--lead-form-*, partials/lead_form_colors.php) → the location site template
 * (CssGeneratorHelper root variables, present only on location pages) → Figma.
 */
.lead-form {
    --qb-primary: var(--lead-form-accent, var(--buy_button_bg_color, #383ea7));
    --qb-on-primary: var(--on_primary_color, #ffffff);
    --qb-primary-hover: color-mix(in srgb, var(--qb-primary) 85%, #000000);
    --qb-primary-press: color-mix(in srgb, var(--qb-primary) 75%, #000000);
    --qb-on-surface: var(--lead-form-text, var(--main_text_color, #070925));
    --qb-on-surface-64: color-mix(in srgb, var(--qb-on-surface) 64%, transparent);
    --qb-on-surface-48: color-mix(in srgb, var(--qb-on-surface) 48%, transparent);
    --qb-outline: var(--lead-form-border, var(--outline_color, #d7d7d7));
    --qb-field-bg: var(--lead-form-field-bg, #ffffff);
    /* Fallbacks as the Figma Log-in form (461:36996): Surface Container card on a Surface page */
    --qb-surface: var(--lead-form-content-bg, var(--surface_color, #f6f6f6));
    --qb-surface-container: var(--lead-form-bg, var(--surface_color, #ffffff));
    --qb-media-bg: var(--lead-form-media-bg, transparent);
    --qb-error: #de1f1f;

    display: flex;
    box-sizing: border-box;
    background: var(--qb-surface-container);
    color: var(--qb-on-surface);
    font-family: "Ubuntu", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

.lead-form *,
.lead-form *::before,
.lead-form *::after {
    box-sizing: border-box;
}

.lead-form--page {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 48px 32px;
}

.lead-form--block {
    padding: 78px 16px;
}

.lead-form-block {
    width: 100%;
    margin: 50px 0 0;
    padding: 0;
}

.lead-form__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    align-items: center;
    gap: 48px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
    border-radius: 24px;
    background: var(--qb-surface);
}

/* Without a banner: one column and a narrower card */
.lead-form__inner:not(:has(> .lead-form__media)) {
    grid-template-columns: minmax(0, 1fr);
    max-width: 720px;
}

.lead-form__media {
    overflow: hidden;
    border-radius: 16px;
    background: var(--qb-media-bg);
}

.lead-form__image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.lead-form__content {
    min-width: 0;
}

.lead-form__text {
    margin-bottom: 32px;
}

.lead-form__title {
    margin: 0;
    color: var(--qb-on-surface);
    font-family: inherit;
    font-size: 28px;
    font-weight: 700;
    line-height: 36px;
    text-transform: none;
    overflow-wrap: break-word;
}

.lead-form__subtitle {
    margin: 16px 0 0;
    color: var(--qb-on-surface-64);
    font-size: 18px;
    line-height: 28px;
}

/* Fields: Figma Input 55:249; spacing of the Log-in / Registration form (462:23248): 24px, 16px on mobile */
.lead-form .form-group {
    margin: 0 0 24px;
}

.lead-form .field-review-content {
    margin: 0;
}

.lead-form .control-label {
    display: block;
    margin: 0 0 4px;
    padding: 0;
    background: none;
    color: var(--qb-on-surface);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.lead-form .label-required .control-label::after {
    content: " *";
    color: var(--qb-error);
}

/* Custom fields of the form builder (CustomFieldsWidget) render inputs without .form-control */
.lead-form :is(.form-control, .form-group textarea, .form-group select, .form-group input:is([type="text"], [type="email"], [type="number"], [type="tel"], [type="date"], [type="url"])) {
    display: block;
    width: 100%;
    height: 56px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid var(--qb-outline);
    border-radius: 8px;
    box-shadow: none;
    background: var(--qb-field-bg);
    color: var(--qb-on-surface);
    font-family: inherit;
    font-size: 16px;
    line-height: 24px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.lead-form :is(textarea.form-control, .form-group textarea) {
    height: auto;
    min-height: 120px;
    padding: 16px;
    resize: vertical;
}

.lead-form :is(.form-control, .form-group textarea, .form-group select, .form-group input:is([type="text"], [type="email"], [type="number"], [type="tel"], [type="date"], [type="url"]))::placeholder {
    color: var(--qb-on-surface-48);
    opacity: 1;
}

.lead-form :is(.form-control, .form-group textarea, .form-group select, .form-group input:is([type="text"], [type="email"], [type="number"], [type="tel"], [type="date"], [type="url"])):hover {
    border-color: var(--qb-primary);
}

/* 3px focus border as border + inset shadow, so the text does not move */
.lead-form :is(.form-control, .form-group textarea, .form-group select, .form-group input:is([type="text"], [type="email"], [type="number"], [type="tel"], [type="date"], [type="url"])):focus {
    border-color: var(--qb-primary);
    outline: none;
    box-shadow: inset 0 0 0 2px var(--qb-primary);
}

.lead-form :is(.form-control, .form-group textarea, .form-group select, .form-group input:is([type="text"], [type="email"], [type="number"], [type="tel"], [type="date"], [type="url"])):disabled {
    border-color: var(--qb-outline);
    opacity: .4;
    cursor: not-allowed;
}

.lead-form .has-error :is(.form-control, textarea, select, input:not([type="checkbox"]):not([type="radio"])),
.lead-form .has-error :is(.form-control, textarea, select, input:not([type="checkbox"]):not([type="radio"])):hover,
.lead-form .has-error :is(.form-control, textarea, select, input:not([type="checkbox"]):not([type="radio"])):focus {
    padding-right: 56px;
    border-color: var(--qb-error);
    box-shadow: inset 0 0 0 2px var(--qb-error);
    background: var(--qb-field-bg) url("../../images/forms/alert.svg") no-repeat right 16px center / 24px 24px;
}

.lead-form .help-block {
    margin: 4px 0 0;
    color: var(--qb-error);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.lead-form .help-block:empty {
    display: none;
}

.lead-form input[type="checkbox"],
.lead-form input[type="radio"] {
    accent-color: var(--qb-primary);
}

/* Phone: intl-tel-input flag before the number */
.lead-form .iti {
    display: block;
    width: 100%;
}

.lead-form .iti__selected-flag {
    margin: 0;
    padding: 0 6px 0 16px;
    background: transparent;
}

.lead-form .iti--allow-dropdown input.form-control {
    padding-left: 60px;
}

/* The country list has its own background and does not inherit the block's */
.lead-form .iti__country-list {
    text-align: left;
    font-size: 14px;
}

.lead-form .accept-privacy {
    margin: 0 0 24px;
    color: var(--qb-on-surface-64);
    font-size: 14px;
    line-height: 20px;
}

/* Under the button (partials/lead_form_privacy), as the consent of the Log-in form: Body md, centred */
.lead-form .lead-form__submit ~ .accept-privacy {
    margin: 16px 0 0;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
}

.lead-form .accept-privacy a {
    color: var(--qb-primary);
    text-decoration: underline;
}

/* Google's notice for the hidden v3 badge (partials/lead_form_privacy): secondary, Body sm */
.lead-form .accept-privacy.lead-form__captcha-notice,
.lead-form .lead-form__submit ~ .accept-privacy.lead-form__captcha-notice {
    margin-top: 0;
    font-size: 12px;
    line-height: 16px;
}

/* 8px from the consent above it, which keeps its own bottom margin otherwise */
.lead-form .accept-privacy:has(+ .lead-form__captcha-notice),
.qb-embed .lead-form .accept-privacy:has(+ .lead-form__captcha-notice) {
    margin-bottom: 8px;
}

/* v2 checkbox (partials/lead_form_body): Google's fixed 304 × 78 widget, scaled down on narrow screens */
.lead-form .lead-form__captcha[hidden] {
    display: none;
}

.lead-form .lead-form__captcha-widget {
    min-height: 78px;
}

@media (max-width: 359px) {
    .lead-form .lead-form__captcha-widget {
        transform: scale(.88);
        transform-origin: 0 0;
    }
}

/* Button: Figma Button Primary Filled, full width as in the Log-in form (16px 32px, 56px) */
.lead-form__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 56px;
    padding: 16px 32px;
    border: 0;
    border-radius: 8px;
    background: var(--qb-primary);
    color: var(--qb-on-primary);
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    cursor: pointer;
    transition: background-color .2s ease;
}

.lead-form__button:hover {
    background: var(--qb-primary-hover);
}

.lead-form__button:active {
    background: var(--qb-primary-press);
}

.lead-form__button:focus-visible {
    outline: 3px solid var(--qb-primary);
    outline-offset: 2px;
}

.lead-form__button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* Without color-mix() the hover variables are invalid and the button would lose its background */
@supports not (color: color-mix(in srgb, #000000 50%, #ffffff)) {
    .lead-form__button:hover,
    .lead-form__button:active {
        background: var(--qb-primary);
        opacity: .85;
    }

    .lead-form :is(.form-control, .form-group textarea, .form-group select, .form-group input:is([type="text"], [type="email"], [type="number"], [type="tel"], [type="date"], [type="url"]))::placeholder {
        color: var(--qb-on-surface);
        opacity: .48;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lead-form :is(.form-control, .form-group textarea, .form-group select, .form-group input:is([type="text"], [type="email"], [type="number"], [type="tel"], [type="date"], [type="url"])),
    .lead-form__button {
        transition: none;
    }
}

@media (max-width: 1023px) {
    .lead-form__inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }
}

/* Phone: the card of the Log-in form Mobile (462:23653), padding and radius 16 (the embed modal has its own rules below) */
@media (max-width: 767px) {
    .lead-form--page {
        justify-content: flex-start;
        padding: 16px;
    }

    .lead-form--block {
        padding: 48px 16px;
    }

    .lead-form__inner {
        padding: 16px;
        border-radius: 16px;
    }

    .lead-form__text {
        margin-bottom: 16px;
    }

    .lead-form__title {
        font-size: 18px;
        line-height: 28px;
    }

    .lead-form__subtitle {
        margin-top: 8px;
        font-size: 16px;
        line-height: 24px;
    }

    .lead-form .form-group {
        margin-bottom: 16px;
    }
}

/*
 * Embed modal (frontend\components\FormEmbed marks the page with body.qb-embed): the form is the body of the Figma
 * Pop-up (581:47046) under the modal's own title row, which already shows the title. Padding 24px (16px below 480px,
 * where form-embed.js switches the title row to 16px too), 16px between blocks, Description in Body Lg,
 * the button Primary Lg on the right.
 */
.qb-embed .lead-form--page {
    justify-content: flex-start;
    min-height: 0;
    padding: 0 24px 24px;
    /* The whole iframe is the form block: the form's own block colour, else the Pop-up Surface */
    background: var(--lead-form-content-bg, #ffffff);
}

.qb-embed .lead-form--page .lead-form__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    max-width: none;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.qb-embed .lead-form__title {
    display: none;
}

.qb-embed .lead-form__text {
    margin-bottom: 16px;
}

.qb-embed .lead-form__text:not(:has(.lead-form__subtitle)) {
    display: none;
}

.qb-embed .lead-form__subtitle {
    margin: 0;
    color: var(--qb-on-surface);
    font-size: 18px;
    line-height: 28px;
}

.qb-embed .lead-form .form-group {
    margin-bottom: 16px;
}

.qb-embed .lead-form__submit {
    display: flex;
    justify-content: flex-end;
}

.qb-embed .lead-form__button {
    width: auto;
    min-height: 48px;
    padding: 12px 24px;
}

@media (max-width: 479px) {
    .qb-embed .lead-form--page {
        padding: 0 16px 16px;
    }

    .qb-embed .lead-form__subtitle {
        font-size: 16px;
        line-height: 24px;
    }
}
