/* PartsDone HomeFitment VIN/action styling - v13 */
.pd-custom-fitment [data-pd-vin] {
    width: 100% !important;
    min-height: 46px !important;
    height: 46px !important;
    padding: 0 14px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
}

.pd-custom-fitment [data-pd-vin]::placeholder {
    color: #6b7280 !important;
    font-size: 14px !important;
}

.pd-custom-fitment [data-pd-vin]:focus {
    outline: none !important;
    border-color: #1f48c5 !important;
    box-shadow: 0 0 0 3px rgba(31, 72, 197, .12) !important;
}

.pd-custom-fitment button[data-pd-vin-submit],
.pd-custom-fitment .pd-custom-vin-submit,
.pd-custom-fitment .pd-custom-vin-actions button[data-pd-vin-submit],
.pd-custom-fitment .pd-custom-vin-actions .pd-custom-btn-green[data-pd-vin-submit] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 46px !important;
    height: 46px !important;
    padding: 0 18px !important;
    border: 1px solid #1f48c5 !important;
    border-radius: 8px !important;
    background: #1f48c5 !important;
    background-color: #1f48c5 !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
}

.pd-custom-fitment button[data-pd-vin-submit]:hover,
.pd-custom-fitment button[data-pd-vin-submit]:focus,
.pd-custom-fitment .pd-custom-vin-submit:hover,
.pd-custom-fitment .pd-custom-vin-submit:focus {
    border-color: #173aa3 !important;
    background: #173aa3 !important;
    background-color: #173aa3 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.pd-custom-fitment button[data-pd-vin-help],
.pd-custom-fitment .pd-custom-vin-help-text,
.pd-custom-fitment .pd-custom-vin-help {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 46px !important;
    height: 46px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    color: #111827 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    box-shadow: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
}

.pd-custom-fitment button[data-pd-vin-help]:hover,
.pd-custom-fitment button[data-pd-vin-help]:focus,
.pd-custom-fitment .pd-custom-vin-help-text:hover,
.pd-custom-fitment .pd-custom-vin-help-text:focus,
.pd-custom-fitment .pd-custom-vin-help:hover,
.pd-custom-fitment .pd-custom-vin-help:focus {
    color: #173aa3 !important;
    background: transparent !important;
    background-color: transparent !important;
    text-decoration: underline !important;
}

.pd-custom-fitment .pd-custom-vin-actions {
    align-items: center !important;
}


/* PD_HOMEFITMENT_VIN_POPOVER_ALIGN_START */
/* Keep homepage VIN help link inside the finder and open the popup straight underneath */

.pd-home-body-v41 .pd-home-finder-card,
.pd-home-body-v41 .pd-home-finder-body,
.pd-home-body-v41 .pd-custom-fitment,
.pd-home-body-v41 .pd-custom-fitment-form {
    overflow: visible !important;
}

.pd-home-body-v41 .pd-custom-vin-actions {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
    align-items: start !important;
    justify-items: stretch !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: visible !important;
    transform: none !important;
    box-sizing: border-box !important;
}

.pd-home-body-v41 .pd-custom-vin-actions button[data-pd-vin-submit],
.pd-home-body-v41 .pd-custom-vin-actions .pd-custom-btn-green[data-pd-vin-submit] {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
}

.pd-home-body-v41 .pd-custom-vin-help-text {
    position: static !important;
    display: inline-flex !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    justify-self: start !important;
    align-self: start !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    line-height: 1.25 !important;
    text-align: left !important;
    transform: none !important;
}

/* Popup is now anchored to the full VIN action row, so it opens straight underneath */
.pd-home-body-v41 .pd-custom-vin-actions .pd-custom-vin-popover,
.pd-home-body-v41 .pd-custom-vin-actions [data-pd-vin-popover] {
    position: absolute !important;
    left: 0 !important;
    right: auto !important;
    top: calc(100% + 10px) !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    transform: none !important;
    box-sizing: border-box !important;
    z-index: 10050 !important;
}

.pd-home-body-v41 .pd-custom-vin-actions .pd-custom-vin-popover[hidden],
.pd-home-body-v41 .pd-custom-vin-actions [data-pd-vin-popover][hidden] {
    display: none !important;
}

@media (max-width: 768px) {
    .pd-home-body-v41 .pd-custom-vin-actions {
        gap: 8px !important;
    }

    .pd-home-body-v41 .pd-custom-vin-help-text {
        font-size: 13px !important;
        white-space: nowrap !important;
    }

    .pd-home-body-v41 .pd-custom-vin-actions .pd-custom-vin-popover,
    .pd-home-body-v41 .pd-custom-vin-actions [data-pd-vin-popover] {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        transform: none !important;
    }
}
/* PD_HOMEFITMENT_VIN_POPOVER_ALIGN_END */


/* PD_HOMEFITMENT_ATTRIBUTE_BRANDS_START */
.pd-magento-brand-card {
    min-height: 132px !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 14px !important;
}

.pd-brand-card__visual {
    width: 110px;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.pd-brand-card__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 110px;
    max-height: 66px;
    object-fit: contain;
}

.pd-brand-card__color,
.pd-brand-card__fallback {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    display: grid;
    place-items: center;
}

.pd-brand-card__color {
    border: 1px solid #d1d5db;
    box-shadow: inset 0 0 0 3px #ffffff;
}

.pd-brand-card__fallback {
    background: rgba(31, 72, 197, .08);
    color: #1f48c5;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .02em;
}

.pd-brand-card__name {
    display: block;
    max-width: 100%;
    color: inherit;
    font-size: 14px;
    line-height: 1.25;
    text-align: center;
    overflow-wrap: anywhere;
}
/* PD_HOMEFITMENT_ATTRIBUTE_BRANDS_END */

/*
 * PD_GDS_A7_4_1C_A_HOMEFITMENT_NATIVE_CONTROL_TOKEN_BRIDGE
 *
 * Token bridge only:
 * - preserves all template markup and data hooks;
 * - preserves existing select arrows and checkbox images;
 * - preserves dimensions, padding and disabled behavior;
 * - maps the existing Hyva form variables to global design tokens.
 */
.pd-custom-fitment .pd-custom-fitment-form {
    --form-stroke: var(--pd-gds-color-border, #d1d5db);
    --form-bg: var(--pd-gds-color-surface, #ffffff);
    --form-color: var(--pd-gds-color-text, #111827);
    --form-active-color: var(--pd-gds-color-primary, #1f48c5);
}

.pd-custom-fitment [data-pd-year],
.pd-custom-fitment [data-pd-make],
.pd-custom-fitment [data-pd-model],
.pd-custom-fitment [data-pd-engine],
.pd-custom-fitment [data-pd-vin] {
    font-family: var(--pd-gds-font-family, inherit);
}

.pd-custom-fitment [data-pd-vin] {
    border-color: var(--pd-gds-color-border, #d1d5db) !important;
    border-radius: var(--pd-gds-radius-md, 8px) !important;
    background: var(--pd-gds-color-surface, #ffffff) !important;
    color: var(--pd-gds-color-text, #111827) !important;
}

.pd-custom-fitment [data-pd-vin]::placeholder {
    color: var(--pd-gds-color-text-muted, #6b7280) !important;
}

.pd-custom-fitment [data-pd-year]:focus,
.pd-custom-fitment [data-pd-make]:focus,
.pd-custom-fitment [data-pd-model]:focus,
.pd-custom-fitment [data-pd-engine]:focus,
.pd-custom-fitment [data-pd-vin]:focus {
    border-color: var(--pd-gds-color-focus, #1f48c5) !important;
}

/*
 * PD_GDS_A7_4_1C_C2_HOMEFITMENT_ACTION_BUTTON_TOKEN_BRIDGE
 *
 * HomeFitment-only exact-value token bridge:
 * - existing grouped rules in other modules remain untouched;
 * - all three template classes and data hooks remain untouched;
 * - Find Parts hover #183a9e remains component-owned;
 * - Reset gray backgrounds and hover border remain component-owned;
 * - 46px VIN height, 18px padding, 15px type and 8px radius remain;
 * - existing focus rings, disabled states and hidden state remain.
 */
.pd-custom-fitment [data-pd-find] {
    background: var(
        --pd-gds-button-primary-bg,
        #1f48c5
    ) !important;
    border-color: var(
        --pd-gds-button-primary-bg,
        #1f48c5
    ) !important;
    color: var(
        --pd-gds-button-primary-color,
        #ffffff
    ) !important;
}

.pd-custom-fitment [data-pd-reset] {
    border-color: var(
        --pd-gds-color-border,
        #d1d5db
    ) !important;
    color: var(
        --pd-gds-color-text,
        #111827
    ) !important;
}

.pd-custom-fitment [data-pd-reset]:hover {
    color: var(
        --pd-gds-color-text,
        #111827
    ) !important;
}

.pd-custom-fitment [data-pd-vin-submit] {
    border-color: var(
        --pd-gds-button-primary-bg,
        #1f48c5
    ) !important;
    background: var(
        --pd-gds-button-primary-bg,
        #1f48c5
    ) !important;
    background-color: var(
        --pd-gds-button-primary-bg,
        #1f48c5
    ) !important;
    color: var(
        --pd-gds-button-primary-color,
        #ffffff
    ) !important;
    font-weight: var(
        --pd-gds-font-weight-bold,
        700
    ) !important;
}

.pd-custom-fitment [data-pd-vin-submit]:hover,
.pd-custom-fitment [data-pd-vin-submit]:focus {
    border-color: var(
        --pd-gds-button-primary-bg-hover,
        #173aa3
    ) !important;
    background: var(
        --pd-gds-button-primary-bg-hover,
        #173aa3
    ) !important;
    background-color: var(
        --pd-gds-button-primary-bg-hover,
        #173aa3
    ) !important;
    color: var(
        --pd-gds-button-primary-color,
        #ffffff
    ) !important;
}

/*
 * PD_GDS_A7_4_1C_G_HOMEFITMENT_VIN_HELP_TOKEN_BRIDGE
 *
 * Exact-value token bridge for the planned
 * HomeFitment VIN-help utility control.
 *
 * Preserved as component-owned:
 * - the button tag and data-pd-vin-help hook;
 * - 46px/auto responsive geometry;
 * - 13px/14px typography sizes;
 * - underline offset, alignment and wrapping;
 * - transparent backgrounds and current focus behavior;
 * - pd-custom-vin-close remains unstyled and unchanged.
 */
.pd-custom-fitment button[data-pd-vin-help],
.pd-custom-fitment .pd-custom-vin-help-text,
.pd-custom-fitment .pd-custom-vin-help {
    color: var(
        --pd-gds-color-text,
        #111827
    ) !important;
    font-weight: var(
        --pd-gds-font-weight-bold,
        700
    ) !important;
}

.pd-custom-fitment button[data-pd-vin-help]:hover,
.pd-custom-fitment button[data-pd-vin-help]:focus,
.pd-custom-fitment .pd-custom-vin-help-text:hover,
.pd-custom-fitment .pd-custom-vin-help-text:focus,
.pd-custom-fitment .pd-custom-vin-help:hover,
.pd-custom-fitment .pd-custom-vin-help:focus {
    color: var(
        --pd-gds-color-primary-hover,
        #173aa3
    ) !important;
}

