/* =========================================
   QUOTE AND APPOINTMENT BOOKING
   ========================================= */

main#quote.quote {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: calc(
        100svh - var(--header-height, 120px) -
        var(--admin-bar-height, 0px)
    );
    margin: 0;
    padding: 32px clamp(24px, 4vw, 72px);
    background: #fff;
    color: #171717;
}

#quote,
#quote * {
    box-sizing: border-box;
}

#quote [hidden] {
    display: none !important;
}

#quote .quote__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    align-items: center;
    gap: clamp(32px, 4vw, 64px);
    width: 100%;
    max-width: 1600px;
    min-width: 0;
    margin-inline: auto;
}

#quote .quote__inner > * {
    min-width: 0;
}

/* Introduction */

#quote .quote__intro {
    min-width: 0;
    padding-top: 0;
}

#quote h2 {
    margin: 0 0 24px;
    font-size: clamp(38px, 3.8vw, 60px);
    font-weight: 600;
    line-height: 1.16;
    letter-spacing: -0.05em;
}

#quote .quote__highlight {
    text-decoration-line: underline;
    text-decoration-color: var(--colour-yellow, #ffd000);
    text-decoration-thickness: 4px;
    text-underline-offset: 0.14em;
    text-decoration-skip-ink: auto;
}

#quote .quote__intro > p {
    max-width: 430px;
    margin: 0 0 16px;
    color: #626262;
    font-size: 15px;
    line-height: 1.75;
}

#quote .quote__intro > .quote__note {
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid #dedede;
    font-size: 13px;
    line-height: 1.7;
}

/* Form panel */

#quote .quote__panel {
    min-width: 0;
    padding: 26px;
    border: 1px solid #e2e2dc;
    border-top: 3px solid var(--colour-yellow, #ffd000);
    border-radius: 3px;
    background: #f7f7f4;
}

#quote .quote-form {
    width: 100%;
    min-width: 0;
    margin: 0;
}

#quote .quote-form__step {
    min-width: 0;
    margin: 0;
}

#quote .quote-form__step + .quote-form__step {
    margin-top: 28px;
}

#quote .quote-form.is-enhanced .quote-form__step {
    margin-top: 0;
}

#quote .quote-form__step-title {
    margin: 0 0 20px;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.035em;
}

#quote .quote-form__step-title:focus {
    outline-offset: 5px;
}

/* Progress */

#quote .quote__progress {
    margin-bottom: 22px;
}

#quote .quote__progress-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: #626262;
    font-size: 12px;
    line-height: 1.5;
}

#quote .quote__progress-heading > span:first-child {
    color: #171717;
    font-weight: 650;
}

#quote .quote__progress-bar {
    height: 3px;
    overflow: hidden;
    background: #deded7;
}

#quote .quote__progress-bar > span {
    display: block;
    width: 25%;
    height: 100%;
    background: #b28c00;
    transition: width 180ms ease;
}

/* Questions */

#quote .quote-question {
    min-width: 0;
    min-inline-size: 0;
    margin: 0 0 20px;
    padding: 0;
    border: 0;
}

#quote .quote-question legend {
    width: 100%;
    max-width: 100%;
    margin-bottom: 12px;
    padding: 0;
    color: #171717;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    white-space: normal;
}

#quote .quote-question__hint {
    margin: 0 0 12px;
    color: #626262;
    font-size: 12px;
    line-height: 1.6;
}

/* Option cards */

#quote .quote-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}

#quote .quote-option {
    position: relative;
    display: block;
    min-width: 0;
    margin: 0;
    cursor: pointer;
}

#quote .quote-option > input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
}

#quote .quote-option__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 44px;
    height: 100%;
    padding: 10px 12px;
    border: 1px solid #d7d7d0;
    border-radius: 3px;
    background: #fff;
    overflow-wrap: anywhere;
    transition:
        border-color 150ms ease,
        background-color 150ms ease;
}

#quote .quote-option__title {
    color: #171717;
    font-size: 13px;
    font-weight: 550;
    line-height: 1.45;
}

#quote .quote-option__description {
    display: block;
    margin-top: 3px;
    color: #626262;
    font-size: 12px;
    line-height: 1.45;
}

#quote .quote-option > input:checked + .quote-option__body {
    border-color: #9b7900;
    background: #fff8d9;
    box-shadow: inset 0 0 0 1px #9b7900;
}

#quote .quote-option > input:focus-visible + .quote-option__body {
    outline: 3px solid #1267d5;
    outline-offset: 3px;
}

/* Contact fields */

#quote .quote-form__contact-intro {
    margin: 0 0 18px;
    color: #626262;
    font-size: 14px;
    line-height: 1.65;
}

#quote .quote-form__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

#quote .quote-field {
    min-width: 0;
}

#quote .quote-field--full {
    grid-column: 1 / -1;
}

#quote .quote-field > label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

#quote .quote-field > label > span {
    margin-left: 5px;
    color: #626262;
    font-size: 12px;
    font-weight: 400;
}

#quote .quote-field input,
#quote .quote-field textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 46px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #cfcfc8;
    border-radius: 3px;
    background: #fff;
    color: #171717;
    font: inherit;
    font-size: 16px;
    line-height: 1.5;
}

#quote .quote-field textarea {
    height: 76px;
    min-height: 76px;
    resize: vertical;
}

#quote .quote-field input[aria-invalid="true"],
#quote .quote-field textarea[aria-invalid="true"] {
    border-color: #a12525;
}

#quote .quote-form__privacy {
    margin: 16px 0 0;
    color: #626262;
    font-size: 12px;
    line-height: 1.6;
}

#quote .quote-form__privacy a {
    text-underline-offset: 3px;
}

/* Appointment picker */

#quote .quote-field input[type="date"] {
    min-height: 48px;
    color-scheme: light;
    cursor: pointer;
}

#quote .quote-field input[type="date"]::-webkit-calendar-picker-indicator {
    padding: 6px;
    cursor: pointer;
}

#quote .booking-times {
    margin-top: 20px;
    margin-bottom: 0;
}

#quote .booking-times .quote-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
}

#quote .booking-times .quote-option__body {
    min-height: 46px;
    text-align: center;
}

#quote .booking-refresh {
    min-height: 44px;
    margin-top: 6px;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: #171717;
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 5px;
    cursor: pointer;
}

#quote .booking-refresh:disabled {
    opacity: 0.55;
    cursor: wait;
}

#quote .booking-time-note {
    margin: 14px 0 0;
    color: #626262;
    font-size: 12px;
    line-height: 1.6;
}

#quote .booking-selection {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-left: 3px solid var(--colour-yellow, #ffd000);
    background: #fff;
    color: #171717;
    font-size: 13px;
    line-height: 1.6;
}

#quote .booking-selection:empty {
    display: none;
}

/* Errors */

#quote .quote-form__field-error {
    margin: 8px 0 0;
    color: #a12525;
    font-size: 13px;
    line-height: 1.5;
}

#quote .quote-form__notice {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid #d3a3a3;
    border-radius: 3px;
    background: #fff4f4;
    color: #822020;
    font-size: 14px;
    line-height: 1.6;
}

/* Navigation buttons */

#quote .quote-form__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 20px;
}

#quote .quote-form__actions .button {
    min-height: 48px;
    padding: 12px 22px;
}

#quote .quote-form__back {
    min-height: 44px;
    margin-right: auto;
    padding: 10px 4px;
    border: 0;
    background: transparent;
    color: #171717;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 5px;
    cursor: pointer;
}

#quote .quote-form__actions button:disabled {
    opacity: 0.55;
    cursor: wait;
}

/* Hidden spam field */

#quote .quote-form__trap {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Confirmation */

#quote .quote-success {
    overflow-wrap: anywhere;
}

#quote .quote-success h3 {
    margin: 0 0 20px;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.035em;
}

#quote .quote-success p {
    margin: 0 0 16px;
    color: #626262;
    font-size: 15px;
    line-height: 1.7;
}

#quote .quote-success .booking-confirmed-date {
    color: #171717;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.5;
}

#quote .quote-success__reference {
    padding-block: 16px;
    border-top: 1px solid #dedede;
    border-bottom: 1px solid #dedede;
}

#quote .quote-success__reference strong {
    color: #171717;
}

/* =========================================
   COMPACT DESKTOP STEPS
   ========================================= */

@media (min-width: 1100px) {
    /* Three questions side by side on step one. */

    #quote .quote-form.is-enhanced
    [data-step-name="Your garage"] {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: start;
        gap: 0 16px;
    }

    #quote [data-step-name="Your garage"]
    .quote-form__step-title {
        grid-column: 1 / -1;
    }

    #quote [data-step-name="Your garage"]
    .quote-question {
        margin-bottom: 0;
    }

    #quote [data-step-name="Your garage"]
    .quote-options {
        grid-template-columns: minmax(0, 1fr);
    }

    #quote [data-step-name="Your garage"]
    .quote-question legend {
        min-height: 46px;
    }

    /* Timeline and budget alongside each other. */

    #quote .quote-form.is-enhanced
    [data-step-name="Your plans & budget"] {
        display: grid;
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
        align-items: start;
        gap: 0 20px;
    }

    #quote [data-step-name="Your plans & budget"]
    .quote-form__step-title {
        grid-column: 1 / -1;
    }

    #quote [data-step-name="Your plans & budget"]
    .quote-question {
        margin-bottom: 0;
    }

    #quote [data-step-name="Your plans & budget"]
    .quote-options {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* =========================================
   TABLET
   ========================================= */

@media (max-width: 1099px) {
    #quote .quote__inner {
        grid-template-columns: minmax(0, 1fr);
        max-width: 800px;
        gap: 28px;
    }

    #quote .quote__intro > p {
        max-width: 680px;
    }

    #quote h2 {
        margin-bottom: 18px;
        font-size: 42px;
    }

    #quote .quote__intro > .quote__note {
        margin-top: 16px;
        padding-top: 14px;
    }
}

/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 767px) {
    main#quote.quote {
        padding: 36px 24px;
    }

    #quote .quote__inner {
        gap: 24px;
    }

    #quote h2 {
        font-size: clamp(35px, 7vw, 44px);
    }

    #quote .quote__highlight {
        text-decoration-thickness: 3px;
    }

    #quote .quote__intro > p {
        font-size: 15px;
        line-height: 1.75;
    }

    #quote .quote__panel {
        padding: 22px 16px;
    }

    #quote .quote__progress {
        margin-bottom: 20px;
    }

    #quote .quote-form__step-title {
        margin-bottom: 20px;
        font-size: 25px;
    }

    #quote .quote-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    #quote .quote-option__body {
        min-height: 48px;
        padding: 10px;
    }

    #quote .quote-option__title {
        font-size: 13px;
    }

    #quote .quote-question {
        margin-bottom: 22px;
    }

    #quote .quote-question legend {
        font-size: 15px;
    }

    #quote .quote-form__fields {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    #quote .quote-form__actions {
        flex-wrap: wrap;
    }

    #quote .quote-form__actions .button {
        flex: 1;
        min-width: 0;
        white-space: normal;
    }

    #quote .booking-times .quote-option__body {
        min-height: 48px;
        padding: 12px 8px;
    }
}

@media (max-width: 359px) {
    main#quote.quote {
        padding-inline: 18px;
    }

    #quote .quote__panel {
        padding-inline: 14px;
    }

    #quote .quote-options {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Interaction preferences */

@media (hover: hover) and (pointer: fine) {
    #quote .quote-option:hover .quote-option__body {
        border-color: #9b7900;
    }
}

@media (prefers-reduced-motion: reduce) {
    #quote .quote-option__body,
    #quote .quote__progress-bar > span {
        transition: none;
    }
}
/* Centred introduction with form underneath */

#quote .quote__inner {
    grid-template-columns: minmax(0, 1fr);
    max-width: 960px;
    gap: 32px;
}

#quote .quote__intro {
    width: 100%;
    max-width: 760px;
    margin-inline: auto;
    padding: 0;
    text-align: center;
}

#quote h2 {
    margin-bottom: 22px;
    font-size: clamp(38px, 4.2vw, 60px);
}

#quote .quote__intro > p {
    max-width: 680px;
    margin: 0 auto 16px;
    font-size: 16px;
    line-height: 1.75;
}

#quote .quote__intro > .quote__note {
    max-width: 640px;
    margin: 20px auto 0;
    padding-top: 16px;
    font-size: 13px;
}

#quote .quote__panel {
    width: 100%;
    max-width: 820px;
    margin-inline: auto;
    padding: 32px;
    text-align: left;
}

/* Restore stacked questions on every step */

#quote .quote-form.is-enhanced
[data-step-name="Your garage"],
#quote .quote-form.is-enhanced
[data-step-name="Your plans & budget"] {
    display: block;
}

#quote .quote-question {
    margin-bottom: 24px;
}

#quote [data-step-name="Your garage"] .quote-question,
#quote [data-step-name="Your plans & budget"] .quote-question {
    margin-bottom: 24px;
}

#quote [data-step-name="Your garage"] .quote-question legend {
    min-height: 0;
}

#quote .quote-options,
#quote [data-step-name="Your garage"] .quote-options,
#quote [data-step-name="Your plans & budget"] .quote-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#quote .quote-option__body {
    min-height: 52px;
    padding: 12px 14px;
}

#quote .quote-option__title {
    font-size: 14px;
}

@media (max-width: 600px) {
    #quote .quote__inner {
        gap: 26px;
    }

    #quote .quote__panel {
        padding: 24px 18px;
    }

    #quote .quote-options,
    #quote [data-step-name="Your garage"] .quote-options,
    #quote [data-step-name="Your plans & budget"] .quote-options {
        grid-template-columns: minmax(0, 1fr);
    }

    #quote .booking-times .quote-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================
   LEFT INTRODUCTION / RIGHT FORM
   ========================================= */

#quote .quote__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
    width: 100%;
    max-width: 1600px;
    min-width: 0;
    margin-inline: auto;
}

#quote .quote__intro {
    width: 100%;
    max-width: 520px;
    min-width: 0;
    margin: 0;
    padding: 0;
    text-align: left;
}

#quote h2 {
    margin: 0 0 24px;
    font-size: clamp(38px, 4vw, 62px);
    line-height: 1.16;
}

#quote .quote__intro > p {
    max-width: 480px;
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.75;
}

#quote .quote__intro > .quote__note {
    max-width: 480px;
    margin: 22px 0 0;
    padding-top: 18px;
    font-size: 13px;
}

#quote .quote__panel {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 28px;
    text-align: left;
}

/* Straightforward stacked questions */

#quote .quote-form.is-enhanced
[data-step-name="Your garage"],
#quote .quote-form.is-enhanced
[data-step-name="Your plans & budget"] {
    display: block;
}

#quote .quote-question,
#quote [data-step-name="Your garage"] .quote-question,
#quote [data-step-name="Your plans & budget"] .quote-question {
    margin-bottom: 22px;
}

#quote [data-step-name="Your garage"] .quote-question legend {
    min-height: 0;
}

#quote .quote-options,
#quote [data-step-name="Your garage"] .quote-options,
#quote [data-step-name="Your plans & budget"] .quote-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

#quote .quote-option__body {
    min-height: 48px;
    padding: 11px 13px;
}

#quote .quote-option__title {
    font-size: 14px;
}

/* Desktop: section stays inside the available viewport */

@media (min-width: 1100px) {
    main#quote.quote {
        height: calc(
            100svh -
            var(--header-height, 120px) -
            var(--admin-bar-height, 0px)
        );
        min-height: 0;
        margin-block: 0;
        padding: 32px clamp(24px, 4vw, 72px);
    }

    #quote .quote__inner {
        height: 100%;
        min-height: 0;
    }

    #quote .quote__intro,
    #quote .quote__panel {
        max-height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: thin;
        scrollbar-color: #aaa #f7f7f4;
        scroll-padding-block: 20px;
    }

    #quote .quote__panel {
        scrollbar-gutter: stable;
    }
}

/* Mobile and tablet: stack naturally for readable content */

@media (max-width: 1099px) {
    main#quote.quote {
        height: auto;
        padding-block: 40px;
    }

    #quote .quote__inner {
        grid-template-columns: minmax(0, 1fr);
        max-width: 800px;
        height: auto;
        gap: 28px;
    }

    #quote .quote__intro {
        max-width: none;
    }

    #quote .quote__intro > p,
    #quote .quote__intro > .quote__note {
        max-width: 680px;
    }

    #quote .quote__panel {
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 600px) {
    #quote .quote__panel {
        padding: 24px 18px;
    }

    #quote .quote-options,
    #quote [data-step-name="Your garage"] .quote-options,
    #quote [data-step-name="Your plans & budget"] .quote-options {
        grid-template-columns: minmax(0, 1fr);
    }

    #quote .booking-times .quote-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================
   DESKTOP FORM HEIGHT AND BUTTON FIX
   ========================================= */

@media (min-width: 1100px) {
    main section#quote.quote {
        height: calc(
            100svh -
            var(--header-height, 120px) -
            var(--admin-bar-height, 0px)
        );
        min-height: 0;
        padding-block: 24px;
    }

    main #quote .quote__inner {
        height: 100%;
        min-height: 0;
        align-items: center;
    }

    main #quote .quote__panel {
        display: flex;
        flex-direction: column;
        height: 100%;
        max-height: 100%;
        min-height: 0;
        padding: 24px;
        overflow: hidden;
        scrollbar-gutter: auto;
    }

    main #quote .quote__progress {
        flex: 0 0 auto;
        margin-bottom: 18px;
    }

    main #quote .quote-form.is-enhanced {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }

    main #quote .quote-form.is-enhanced [data-quote-step] {
        display: block;
        flex: 1 1 auto;
        min-height: 0;
        margin: 0;
        padding: 4px 8px 4px 4px;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: thin;
        scrollbar-color: #aaa #f7f7f4;
        scroll-padding-block: 12px;
    }

    main #quote .quote-form__step-title {
        margin-bottom: 16px;
        font-size: 25px;
    }

    main #quote .quote-question,
    main #quote [data-step-name] .quote-question {
        margin-bottom: 18px;
    }

    main #quote .quote-question legend {
        min-height: 0;
        margin-bottom: 9px;
        font-size: 14px;
    }

    main #quote .quote-option__body {
        min-height: 44px;
        padding: 10px 12px;
    }

    main #quote .quote-form__actions {
        flex: 0 0 auto;
        margin: 16px 0 0;
        padding-top: 14px;
        border-top: 1px solid #deded7;
        background: #f7f7f4;
    }

    main #quote .quote-form__actions .button {
        min-height: 48px;
    }

    main #quote .quote-form__notice {
        flex: 0 0 auto;
        max-height: 100px;
        margin-top: 12px;
        overflow-y: auto;
    }

    main #quote .quote-success {
        min-height: 0;
        overflow-y: auto;
    }
}

/* Keep the native iPhone date field inside the form. */

main #quote .quote-field {
    min-width: 0;
    max-width: 100%;
}

main #quote .quote-field input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-inline-size: 0;
    height: 48px;
    min-height: 48px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #cfcfc8;
    border-radius: 3px;
    background: #fff;
    color: #171717;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
}

main #quote input[type="date"]::-webkit-date-and-time-value {
    min-width: 0;
    margin: 0;
    text-align: left;
}

main #quote input[type="date"]::-webkit-datetime-edit {
    min-width: 0;
    padding: 0;
}