.tob-section--contact-form {
    --tob-form-red: #d1301e;
    --tob-form-red-dark: #aa2416;
    --tob-form-ink: #252930;
    --tob-form-muted: #626973;
    --tob-form-line: #d9dde2;
    --tob-form-soft: #f4f5f7;
    --tob-form-white: #fff;
}

.tob-section--contact-form .section-content > .row {
    max-width: 1180px;
}

.tob-form-intro {
    max-width: 900px;
    margin-bottom: 32px;
}

.tob-form-intro__eyebrow {
    margin: 0 0 8px;
    color: var(--tob-form-red);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
}

.tob-form-intro h2 {
    margin: 0 0 14px;
    color: var(--tob-form-ink);
}

.tob-form-intro > p:last-child {
    max-width: 780px;
    margin-bottom: 0;
    color: var(--tob-form-muted);
    font-size: 18px;
    line-height: 1.55;
}

.tob-process-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin: 28px 0 0;
    overflow: hidden;
    border: 1px solid var(--tob-form-line);
    border-radius: 4px;
    background: var(--tob-form-line);
}

.tob-process-overview__item {
    display: flex;
    min-height: 70px;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    background: var(--tob-form-white);
    color: var(--tob-form-ink);
    font-weight: 700;
}

.tob-process-overview__number {
    display: inline-grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border-radius: 50%;
    background: var(--tob-form-red);
    color: var(--tob-form-white);
    font-size: 15px;
}

.tob-section--contact-form .wpcf7 {
    width: 100%;
    margin: 0;
    padding: 0;
}

.tob-contact-form {
    width: 100%;
    padding: 42px clamp(22px, 4vw, 52px);
    border: 1px solid var(--tob-form-line);
    border-top: 5px solid var(--tob-form-red);
    border-radius: 4px;
    background: var(--tob-form-white);
    box-shadow: 0 12px 34px rgba(37, 41, 48, 0.08);
    color: var(--tob-form-ink);
}

.tob-form-progress {
    margin: 0 0 38px;
}

.tob-form-progress__status {
    margin: 0 0 12px;
    color: var(--tob-form-muted);
    font-size: 14px;
    font-weight: 700;
}

.tob-form-progress__track {
    height: 5px;
    margin-bottom: 18px;
    overflow: hidden;
    border-radius: 3px;
    background: #e7e9ec;
}

.tob-form-progress__bar {
    display: block;
    width: 25%;
    height: 100%;
    border-radius: inherit;
    background: var(--tob-form-red);
    transition: width 180ms ease;
}

.tob-form-progress__steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.tob-form-progress__step {
    color: var(--tob-form-muted);
    font-size: 14px;
    font-weight: 700;
}

.tob-form-progress__step::before {
    content: attr(data-step);
    display: inline-grid;
    width: 28px;
    height: 28px;
    margin-right: 8px;
    place-items: center;
    border: 1px solid var(--tob-form-line);
    border-radius: 50%;
    background: var(--tob-form-white);
    color: var(--tob-form-muted);
}

.tob-form-progress__step.is-active,
.tob-form-progress__step.is-complete {
    color: var(--tob-form-ink);
}

.tob-form-progress__step.is-active::before,
.tob-form-progress__step.is-complete::before {
    border-color: var(--tob-form-red);
    background: var(--tob-form-red);
    color: var(--tob-form-white);
}

.tob-form-section {
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 0;
}

.tob-contact-form:not(.tob-form-enhanced) .tob-form-section + .tob-form-section {
    padding-top: 36px;
    margin-top: 36px;
    border-top: 1px solid var(--tob-form-line);
}

.tob-form-section[hidden] {
    display: none !important;
}

.tob-form-section legend {
    width: 100%;
    padding: 0 0 15px;
    margin: 0 0 24px;
    border-bottom: 1px solid var(--tob-form-line);
    color: var(--tob-form-ink);
    font-size: 29px;
    font-weight: 800;
    line-height: 1.2;
}

.tob-form-grid {
    display: grid;
    gap: 22px 28px;
}

.tob-form-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tob-contact-form p {
    margin: 0 0 22px;
}

.tob-form-grid > p {
    min-width: 0;
    margin: 0;
}

.tob-contact-form label,
.tob-form-choice > p {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--tob-form-ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.tob-contact-form label > span[aria-hidden="true"] {
    color: var(--tob-form-red);
}

.tob-contact-form .wpcf7-form-control-wrap {
    display: block;
}

.tob-contact-form input[type="text"],
.tob-contact-form input[type="email"],
.tob-contact-form input[type="tel"],
.tob-contact-form input[type="date"],
.tob-contact-form select,
.tob-contact-form textarea {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    margin: 0;
    border: 1px solid #bfc5cc;
    border-radius: 4px;
    background: var(--tob-form-white);
    box-shadow: none;
    color: var(--tob-form-ink);
    font-size: 16px;
    line-height: 1.4;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.tob-contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.tob-contact-form input:focus,
.tob-contact-form select:focus,
.tob-contact-form textarea:focus {
    border-color: var(--tob-form-red);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(209, 48, 30, 0.14);
}

.tob-contact-form .wpcf7-not-valid {
    border-color: #b42318;
    box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.1);
}

.tob-contact-form .wpcf7-not-valid-tip {
    margin-top: 6px;
    color: #9b1c12;
    font-size: 14px;
    font-weight: 700;
}

.tob-form-help,
.tob-form-required,
.tob-character-count {
    color: var(--tob-form-muted);
    font-size: 14px;
    line-height: 1.5;
}

.tob-character-count {
    display: block;
    margin-top: 7px;
    text-align: right;
}

.tob-form-choice {
    padding: 20px;
    margin-top: 26px;
    border: 1px solid var(--tob-form-line);
    border-radius: 4px;
    background: var(--tob-form-soft);
}

.tob-form-choice .wpcf7-list-item {
    margin: 0 26px 0 0;
}

.tob-form-choice label,
.tob-form-section--consent .wpcf7-list-item-label {
    display: inline-flex;
    align-items: flex-start;
    gap: 9px;
    font-weight: 500;
    cursor: pointer;
}

.tob-contact-form input[type="radio"],
.tob-contact-form input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin: 1px 0 0;
    accent-color: var(--tob-form-red);
}

.tob-form-review {
    padding: 22px;
    margin: 0 0 26px;
    border-left: 4px solid var(--tob-form-red);
    background: var(--tob-form-soft);
}

.tob-form-review h3 {
    margin: 0 0 14px;
    font-size: 20px;
}

.tob-form-review dl {
    display: grid;
    grid-template-columns: minmax(130px, 0.35fr) 1fr;
    gap: 7px 18px;
    margin: 0;
}

.tob-form-review dt {
    color: var(--tob-form-muted);
    font-weight: 700;
}

.tob-form-review dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.tob-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 28px;
    margin-top: 30px;
    border-top: 1px solid var(--tob-form-line);
}

.tob-form-button,
.tob-contact-form .tob-submit {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    margin: 0;
    border: 2px solid var(--tob-form-red);
    border-radius: 4px;
    background: var(--tob-form-red);
    color: var(--tob-form-white);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: none;
    cursor: pointer;
}

.tob-form-button:hover,
.tob-form-button:focus,
.tob-contact-form .tob-submit:hover,
.tob-contact-form .tob-submit:focus {
    border-color: var(--tob-form-red-dark);
    background: var(--tob-form-red-dark);
    color: var(--tob-form-white);
}

.tob-form-button--back {
    border-color: #aeb4bc;
    background: var(--tob-form-white);
    color: var(--tob-form-ink);
}

.tob-form-button--back:hover,
.tob-form-button--back:focus {
    border-color: var(--tob-form-ink);
    background: var(--tob-form-white);
    color: var(--tob-form-ink);
}

.tob-form-submit {
    margin: 0 !important;
}

.tob-contact-form .tob-submit:disabled {
    border-color: #c7cbd0;
    background: #c7cbd0;
    color: #545b64;
    cursor: not-allowed;
}

.tob-section--contact-form .wpcf7-response-output {
    padding: 16px 18px;
    margin: 24px 0 0;
    border-width: 1px;
    border-radius: 4px;
    font-weight: 700;
}

@media (max-width: 849px) {
    .tob-process-overview,
    .tob-form-progress__steps {
        grid-template-columns: 1fr;
    }

    .tob-process-overview__item {
        min-height: 58px;
    }

    .tob-form-progress__steps {
        gap: 8px;
    }

    .tob-form-progress__step:not(.is-active) {
        display: none;
    }

    .tob-form-grid--two {
        grid-template-columns: 1fr;
    }

    .tob-contact-form {
        padding: 30px 20px;
    }
}

@media (max-width: 549px) {
    .tob-section--contact-form .section-content > .row > .col {
        padding-right: 12px;
        padding-left: 12px;
    }

    .tob-form-intro > p:last-child {
        font-size: 16px;
    }

    .tob-form-section legend {
        font-size: 24px;
    }

    .tob-form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .tob-form-button,
    .tob-contact-form .tob-submit {
        width: 100%;
    }

    .tob-form-review dl {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .tob-form-review dd + dt {
        margin-top: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tob-form-progress__bar,
    .tob-contact-form input,
    .tob-contact-form select,
    .tob-contact-form textarea {
        transition: none;
    }
}
