.tf-finder {
    --tf-primary: #EA1F1A;
    --tf-primary-contrast: #f33700;
    --tf-border: #d1d5db;
    --tf-bg: #ffffff;
    --tf-text: #1f2937;
    --tf-muted: #070809;
    --tf-disabled-bg: #f3f4f6;
    --tf-radius: 8px;
    --tf-gap: 12px;

    --tf-banner-bg: #EA1F1A;
    --tf-banner-fg: #1f2937;
    --tf-banner-field-bg: #ffffff;
    --tf-banner-field-text: #0f172a;
    --tf-banner-radius: 10px;
    --tf-button-bg: #16324f;
    --tf-button-fg: #EA1F1A;
    --tf-hub-text: #0f172a;

    background: var(--tf-bg);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-radius);
    color: var(--tf-text);
    font-family: inherit;
    box-sizing: border-box;
}

.tf-finder *,
.tf-finder *::before,
.tf-finder *::after {
    box-sizing: inherit;
}

.tf-finder__tabs {
    display: flex;
    border-bottom: 1px solid var(--tf-border);
}

.tf-finder__tab {
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    padding: 20px 26px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--tf-muted) !important;
    cursor: pointer;
}

.tf-finder__tab-icon {
    width: auto;
    height: 20px;
    flex-shrink: 0;
}

.tf-finder__tab.is-active {
    color: var(--tf-primary) !important;
    border-bottom-color: var(--tf-primary);
}

.tf-finder__tab:focus-visible {
    outline: 2px solid var(--tf-primary);
    outline-offset: -2px;
}

/* .tf-finder__reset {
    align-self: center;
    margin-left: auto;
    margin-right: 16px;
    background: transparent;
    border: none;
    color: var(--tf-primary) !important;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
} */

.tf-finder__reset {
    align-self: center;
    margin-left: auto;
    margin-right: 16px;
    border: none;
    font-size: 13px;
    text-transform: capitalize;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--tf-radius);
}

.tf-finder__panel {
    padding: 16px;
}

#tf-panel-size.tf-finder__panel {
    padding: 0;
}

.tf-required-mark {
    color: var(--tf-banner-fg, #dc2626);
    opacity: 0.85;
}

form.tf-size-form {
    margin-bottom: 0 !important;
}

.tf-size-form__banner {
    display: flex;
	padding-top: 10px;
    color: var(--tf-banner-fg);
    border-radius: var(--tf-banner-radius);
    align-items: center;
}

.tf-tire-visual {
    width: 27%;
	margin-top: auto;
}

.tf-tire-visual-inner {
    position: relative;
    aspect-ratio: 688 / 210.6;
    overflow: hidden;
    border-radius: var(--tf-banner-radius);
    width: 375px;
    height: 124px;
    background: url(../images/filtre-auto-img.webp) no-repeat;
    background-size: 100%;
    background-position: center top;
}

.tf-tire-visual__overlay {
    font-size: 25px;
    margin-top: 29px;
    margin: 0;
    position: relative;
    list-style: none;
    text-align: center;
    height: 124px;
    width: 375px;
    top: 5px;
}

.tf-tire-visual__param {
    width: 3.125rem;
    height: 3.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all .3s ease;
    min-width: 55px;
    position: absolute;
    color: #dfdfdf;
    border-radius: 50%;
    font-weight: 700;
}

.tf-tire-visual__param:nth-of-type(1) {
    left: 67px;
    top: 48px;
    transform: rotate(-38deg);
}

.tf-tire-visual__param:nth-of-type(2) {
    left: 7.375rem;
    top: 0.75rem;
    align-items: flex-end !important;
    padding-bottom: 3px;
    transform: rotate(-13deg);
}

/* New slot for "structure" (inserted between aspect and rim) — placeholder
   position interpolated between the old (2) and (3) rules below; likely
   needs a visual pass same as the others. */
.tf-tire-visual__param:nth-of-type(3) {
    left: 10.34375rem;
    top: 0.45rem;
    align-items: flex-end !important;
    padding-bottom: 3px;
    transform: rotate(-2.65deg);
}

.tf-tire-visual__param:nth-of-type(4) {
    left: 12.3125rem;
    top: 0.55rem;
    align-items: flex-end !important;
    padding-bottom: 3px;
    transform: rotate(7.7deg);
}

.tf-tire-visual__param:nth-of-type(5) {
    left: 14.95rem;
    top: 1.675rem;
    align-items: flex-end !important;
    padding-bottom: 0.25rem;
    transform: rotate(32deg);
}

.tf-tire-visual__param:nth-of-type(6) {
    left: 16.825rem;
    top: 3.075rem;
    align-items: flex-end !important;
    padding-bottom: 0.1875rem;
    transform: rotate(38deg);
}

.tf-tire-visual__param.active {
    color: var(--tf-primary);
}

.tf-tire-visual__param.input-clicked {
    border: 0.0625rem solid #ffd700e0;
    background: #ffa5d15c;
    color: #fff;
    box-shadow: 0 0 0.625rem -0.1875rem;
}

.tf-size-form__fields {
    flex: 1 1 auto;
    min-width: 0;
	z-index: 2;
	padding: 20px;
}

.tf-size-form__row {
    display: flex;
    align-items: flex-end;
    gap: var(--tf-gap);
    flex-wrap: wrap;
}

.tf-size-form__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 100px;
}

.tf-size-form__field label {
    font-size: 12px;
    font-weight: 700;
    color: var(--tf-banner-fg);
}

.tf-size-form__field select {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: var(--tf-radius);
    background: var(--tf-banner-field-bg);
    color: var(--tf-banner-field-text);
    font-size: 14px;
    font-weight: 700;
}

.tf-size-form__field select:disabled {
    /* background: rgba( 255, 255, 255, 0.9 ); */
    color: var(--tf-muted);
}

.tf-size-form__actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.tf-size-form__required-note {
    margin: 0;
    font-size: 11px;
    color: var(--tf-banner-fg);
    opacity: 0.85;
}

.tf-size-form__submit {
    text-align: center;
    padding: 10px;
    background: var(--tf-button-bg);
    color: var(--tf-button-fg);
    border: none;
    border-radius: var(--tf-radius);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    white-space: nowrap;
}

.tf-size-form__submit-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.tf-size-form__submit:disabled {
    /* background: var( --tf-border ); */
    /* color: var( --tf-muted ); */
    /* cursor: not-allowed; */
}

.tf-finder__status {
    margin: 8px 16px 0;
    font-size: 12px;
    color: var(--tf-muted);
    min-height: 16px;
}

.tf-finder__coming-soon {
    margin: 0;
    color: var(--tf-muted);
    font-size: 14px;
}

.tf-vehicle-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tf-gap);
    padding: 10px 12px;
    margin-bottom: 12px;
    background: var(--tf-disabled-bg);
    border-radius: var(--tf-radius);
    font-size: 13px;
}

.tf-vehicle-form {
	margin-bottom: 12px;
}

.tf-vehicle-banner__change {
    background: transparent;
    border: none;
    color: var(--tf-primary) !important;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.tf-vehicle-form__row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tf-gap);
}

.tf-vehicle-form__row .tf-size-form__field {
    flex: 1 1 140px;
}

.tf-vehicle-form__row .tf-size-form__field label {
    color: var(--tf-muted);
    font-weight: 400;
}

.tf-vehicle-form__row .tf-size-form__field select {
    border: 1px solid var(--tf-border);
    background: var(--tf-bg);
    color: var(--tf-text);
    font-weight: 400;
}

.tf-vehicle-form__row .tf-size-form__field select:disabled {
    background: var(--tf-disabled-bg);
    color: var(--tf-muted);
}

.tf-vehicle-sizes__group-title {
    margin: 16px 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tf-muted);
}

.tf-vehicle-sizes__group-title:first-child {
    margin-top: 8px;
}

.tf-vehicle-sizes__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tf-vehicle-size-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-radius);
    text-decoration: none;
    color: var(--tf-text);
    font-size: 14px;
    font-weight: 600;
}

.tf-vehicle-size-row:hover {
    border-color: var(--tf-primary);
}

.tf-vehicle-size-row.is-unavailable {
    opacity: 0.55;
}

.tf-vehicle-size-row__badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
}

.tf-vehicle-size-row__badge--oe {
    background: #dcfce7;
    color: #166534;
}

.tf-vehicle-size-row__badge--contact {
    background: #fee2e2;
    color: #991b1b;
}

@media ( max-width: 640px ) {
    .tf-tire-visual {
        display: none;
    }

    .tf-size-form__actions {
        align-items: stretch;
    }

    .tf-size-form__required-note {
        text-align: center;
    }

    .tf-size-form__submit {
        justify-content: center;
    }
    .tf-finder__reset {
        margin: 16px auto 0;
        width: calc( 100% - 32px );
        order: -1;
    }
    .tf-finder__tabs {
        flex-wrap: wrap;
    }
}

@media ( max-width: 480px ) {
    .tf-vehicle-form__row {
        flex-direction: column;
        align-items: stretch;
    }
    .tf-finder__tab{
        padding: 12px 16px;
    }
}
