/* "Find Parts For Your Ride" bar - genesis-child lib/rt-ride.php + js/rt-ymm.js */

.rt-ride {
    background: #1c1c1c;
    border-top: 1px solid #2a2a2a;
    border-bottom: 1px solid #2a2a2a;
    position: relative;
    z-index: 50;
}
.rt-ride__inner { max-width: 1240px; margin: 0 auto; padding: 10px 16px; box-sizing: border-box; }

.rt-ride__toggle { display: none; }

.rt-ride__form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0;
}
.rt-ride__label {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .4px;
    white-space: nowrap;
    margin-right: 4px;
}

.rt-ride select,
.rt-ride input[type="text"] {
    height: 40px;
    padding: 0 10px;
    background-color: #262626;
    color: #fff;
    border: 1px solid #3a3a3a;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
    margin: 0;
}
.rt-ride select { flex: 1 1 130px; min-width: 110px; max-width: 190px; }
.rt-ride select option { color: #fff; background: #262626; }

/* Customizable <select> (Chrome / Edge 135+): the open list in RaceTech red instead of the system blue.
   Safari and Firefox ignore this block and keep their native list. */
@supports (appearance: base-select) {
    .rt-ride select,
    .rt-ride select::picker(select) { appearance: base-select; }
    .rt-ride select { display: flex; align-items: center; }
    .rt-ride select::picker-icon { color: #fff; font-size: 11px; }
    .rt-ride select::picker(select) {
        background: #262626;
        border: 1px solid #3a3a3a;
        border-radius: 3px;
        padding: 4px 0;
        max-height: 360px;
        box-shadow: 0 8px 20px rgba(0,0,0,.5);
    }
    /* !important: the theme's custom.css forces input/select/option to #171615 !important */
    .rt-ride select option { padding: 7px 12px; color: #fff; background-color: #262626 !important; font-size: 14px; }
    .rt-ride select option::checkmark { display: none; }
    .rt-ride select option:checked { background-color: #3a3a3a !important; }
    .rt-ride select option:hover,
    .rt-ride select option:focus-visible { background-color: #ee2d33 !important; color: #fff !important; outline: none; }
}
.rt-ride select:disabled,
.rt-ride input:disabled { opacity: .5; cursor: not-allowed; }
.rt-ride select:focus,
.rt-ride input[type="text"]:focus { outline: none; border-color: #ee2d33; }

/* ATV / Side-by-Side / Snowmobile have no year */
.rt-ride--noyear .rt-ride__year { display: none; }
/* Sprint Car: the sub-category is the whole choice */
.rt-ride--makeonly .rt-ride__modelwrap { display: none; }

.rt-ride__modelwrap { position: relative; flex: 2 1 200px; min-width: 170px; max-width: 280px; }
.rt-ride__modelwrap input { width: 100%; }
.rt-ride__list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 340px;
    overflow-y: auto;
    margin: 2px 0 0;
    padding: 4px 0;
    list-style: none;
    background: #262626;
    border: 1px solid #3a3a3a;
    border-radius: 3px;
    z-index: 100;
    box-shadow: 0 8px 20px rgba(0,0,0,.5);
}
.rt-ride__list[hidden] { display: none; }
.rt-ride__group {
    padding: 6px 10px 2px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #8a8a8a;
    text-transform: uppercase;
}
.rt-ride__opt {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 10px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}
.rt-ride__opt:hover { background: #ee2d33; }
.rt-ride__opt:hover .rt-ride__n { color: #fff; }
.rt-ride__opt.is-picked { background: #1d4d2c; box-shadow: inset 3px 0 0 #3fbf63; }
.rt-ride__n { color: #9a9a9a; font-size: 12px; }
.rt-ride__empty { padding: 8px 10px; color: #9a9a9a; font-size: 13px; }

.rt-ride__go {
    height: 40px;
    padding: 0 22px;
    background: #ee2d33;
    color: #fff;
    border: 0;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    cursor: pointer;
    white-space: nowrap;
}
.rt-ride__go:disabled { background: #7a2a2c; color: #c9a3a4; cursor: not-allowed; }

/* My Garage */
.rt-garage { position: relative; margin-left: auto; }
.rt-garage__btn {
    height: 40px;
    padding: 0 14px;
    background: transparent;
    color: #fff;
    border: 1px solid #3a3a3a;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.rt-garage__btn:hover,
.rt-garage__btn[aria-expanded="true"] { border-color: #ee2d33; }
.rt-garage__n { color: #9a9a9a; font-weight: 400; }
.rt-garage__menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    min-width: 260px;
    background: #262626;
    border: 1px solid #3a3a3a;
    border-radius: 3px;
    padding: 4px 0;
    z-index: 100;
    box-shadow: 0 8px 20px rgba(0,0,0,.5);
}
.rt-garage__menu[hidden] { display: none; }
.rt-garage__row { display: flex; align-items: center; }
.rt-garage__row a { flex: 1; padding: 8px 12px; color: #fff; text-decoration: none; font-size: 14px; }
.rt-garage__row a:hover { background: #333; }
.rt-garage__row.is-current a { color: #7fe19b; font-weight: 700; }
.rt-garage__x { background: none; border: 0; color: #9a9a9a; font-size: 18px; padding: 0 12px; cursor: pointer; }
.rt-garage__x:hover { color: #ee2d33; }
.rt-garage__empty { padding: 10px 12px; color: #9a9a9a; font-size: 13px; }

/* Green: what the page is filtered to, and the product-page fit check */
.rt-ride-active,
.rt-fit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #143d22;
    border: 1px solid #2f9e52;
    border-radius: 4px;
    color: #fff;
    font-size: 15px;
}
.rt-ride-active strong,
.rt-fit strong { color: #fff; }
.rt-ride-active__links { display: flex; gap: 16px; }
.rt-ride-active a,
.rt-fit a { color: #8fe3a5; text-decoration: underline; font-size: 13px; white-space: nowrap; }
.rt-fit__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-right: 8px;
    border-radius: 50%;
    background: #2f9e52;
    color: #fff;
    font-weight: 700;
}
.rt-fit--no { background: #262626; border-color: #3a3a3a; color: #cfcfcf; font-size: 14px; }
.rt-fit--no a { color: #ee8b8e; }

/* The theme's "button:not(.gpay-card-info-container, .drawer-button)" rule gives every button 15px 30px padding,
   and its :not() makes it outrank a single class. Inside a 40px-high button that left 10px for the text, which
   sat low. Two classes + element beats it; flex centres the label whatever the font's line height. */
.rt-ride .rt-ride__form button.rt-ride__go,
.rt-ride .rt-ride__form button.rt-garage__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    line-height: 1;
    vertical-align: middle;
    gap: 6px; /* flex drops the space before the garage count */
}

/* the theme styles every <button> red and fixed-width; these are not theme buttons */
.rt-ride button.rt-ride__toggle,
.rt-ride button.rt-garage__btn { box-shadow: none; text-shadow: none; letter-spacing: .4px; font-family: inherit; }
.rt-ride button.rt-garage__btn { background: transparent !important; color: #fff !important; }

.rt-ride-filtered .filter-results-btn { display: none !important; }
.rt-ride-active--few .rt-ride-allfit { color: #fff; background: #2f9e52; padding: 4px 10px; border-radius: 3px; text-decoration: none; font-weight: 700; }

/* Phones and tablets: one tap target that opens the form */
@media (max-width: 991px) {
    .rt-ride__inner { padding: 8px 12px; }
    .rt-ride button.rt-ride__toggle { width: 100% !important; background: #262626 !important; color: #fff !important; padding: 0 12px !important; }
    .rt-ride button.rt-garage__btn { width: 100% !important; }
    .rt-ride__toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        height: 44px;
        padding: 0 12px;
        background: #262626;
        color: #fff;
        border: 1px solid #3a3a3a;
        border-radius: 3px;
        text-align: left;
        cursor: pointer;
    }
    .rt-ride__title { font-weight: 700; text-transform: uppercase; font-size: 14px; white-space: nowrap; }
    .rt-ride__current { flex: 1; color: #7fe19b; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
    .rt-ride__chev { width: 8px; height: 8px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); margin: -4px 4px 0 6px; transition: transform .15s; }
    .rt-ride.is-open .rt-ride__chev { transform: rotate(-135deg); margin-top: 4px; }

    .rt-ride__form { display: none; flex-direction: column; align-items: stretch; gap: 8px; padding-top: 8px; }
    .rt-ride.is-open .rt-ride__form { display: flex; }
    .rt-ride__label { display: none; }
    .rt-ride select,
    .rt-ride__modelwrap { max-width: none; width: 100%; flex: none; }
    .rt-ride select,
    .rt-ride input[type="text"],
    .rt-ride__go,
    .rt-garage__btn { height: 44px; font-size: 16px; } /* 16px stops iOS zooming into the field */
    .rt-garage { margin-left: 0; }
    .rt-garage__btn { width: 100%; }
    .rt-garage__menu { left: 0; right: 0; min-width: 0; }
    .rt-ride-active,
    .rt-fit { font-size: 14px; }
}

/* Everything clickable in the search shows the hand cursor (disabled controls keep not-allowed above) */
.rt-ride select:not(:disabled),
.rt-ride select option,
.rt-ride__toggle,
.rt-ride__go:not(:disabled),
.rt-ride__opt,
.rt-garage__btn,
.rt-garage__row a,
.rt-garage__x,
.rt-ride-active a,
.rt-fit a { cursor: pointer; }
.rt-ride input[type="text"]:not(:disabled) { cursor: text; }

/* Everything that opens out of the header (cart popup z-index 35, menus, search suggestions) must sit in front
   of this bar (50). The header container already has position: relative; a z-index above the bar makes every
   popup inside it render over the bar. */
.my-header-navbar-container { z-index: 60 !important; }
#cartPopupContainer { z-index: 1000 !important; }
