/*
 * Car selector ("Your Garage"): the bar on the home page (.cbs-car--home), the block on top of the filter panel (.cbs-car--panel)
 * and the "view your car" link (.cbs-car--mini). Written for the shop (the look measured from the shop's previous car selector);
 * the dropdown mechanics (.k-*) come from the Kendo styles that SevenSpikes.Core loads on every page.
 * Accent colour: --cbs-accent and --cbs-accent-hover (set by the Cbs Common settings on the pages that have the filter panel),
 * with the theme's red as the fallback.
 */

.cbs-car {
    margin: 0;
    color: #fff;
    background-color: #2c2c2c;
    font-family: "Fjalla One", sans-serif;
    font-size: 15px;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.cbs-car__title {
    color: #909090;
    text-align: left;
}

.cbs-car__title strong {
    display: block;
    font-weight: 700;
}

/* ---- the three dropdowns ---- */

.cbs-car__field {
    padding: 0 3.5px;
}

.cbs-car .k-widget.k-dropdown {
    display: block;
    position: relative;
    width: 100%;
    border: 0;
    background: none;
}

.cbs-car span.k-dropdown-wrap {
    display: block;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    padding: 16.5px 33px 16.5px 10px;
    border: 0;
    border-radius: 0;
    background-color: #1d1d1d;
    color: #909090;
    font-family: Lato, sans-serif;
    font-size: 14px;
    line-height: 16.8px;
    text-align: left;
    text-transform: none;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: 0.3s ease-in-out;
}

/* the accent line that grows under the dropdown on hover */
.cbs-car span.k-dropdown-wrap:before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--cbs-accent, #bc0019);
    transition: 0.3s ease-in-out;
}

.cbs-car span.k-dropdown-wrap:hover:before {
    width: 100%;
}

/* the arrow (a glyph of the theme's icon font) */
.cbs-car span.k-dropdown-wrap:after {
    content: "c";
    position: absolute;
    right: 15px;
    top: 20.4px;
    width: 8px;
    height: 9px;
    color: var(--cbs-accent, #bc0019);
    font-family: venture-font;
    font-size: 8px;
    line-height: 9px;
}

.cbs-car span.k-dropdown-wrap .k-input {
    color: inherit;
}

.cbs-car span.k-dropdown-wrap .k-select {
    display: none;
}

/* ---- the search button ---- */

.cbs-car__action {
    position: relative;
    padding: 0 3.5px;
    overflow: hidden;
}

.cbs-car__button {
    display: block;
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 0 20px 0 10px;
    border: 0;
    border-radius: 0;
    background-color: var(--cbs-accent, #bc0019);
    color: #fff;
    font-family: "Fjalla One", sans-serif;
    font-size: 15px;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

/* the magnifier glyph before the text (the theme's icon font) */
.cbs-car__button:before {
    content: "e";
    display: inline-block;
    padding-right: 7px;
    font-family: venture-font;
    font-size: 12px;
}

.cbs-car__button:hover {
    background-color: var(--cbs-accent-hover, #930014);
}

.cbs-car__button:disabled {
    background-color: var(--cbs-accent, #bc0019);
    cursor: default;
}

/* ---- the list that opens under a dropdown (Kendo puts it at the end of the page) ---- */

.cbs-car__list {
    border: 1px solid #ccc;
    border-top: 0;
    background-color: #fff;
    color: #2c2c2c;
    font-family: Lato, sans-serif;
    font-size: 14px;
    letter-spacing: 0.2px;
}

.cbs-car__list ul {
    max-height: 200px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
}

.cbs-car__list .k-list-scroller {
    height: auto !important;
}

/* the "all ..." entry shown above the list is not wanted, the first row of the list does the same */
.cbs-car__list .k-list-optionlabel {
    display: none !important;
}

.cbs-car__list li {
    padding: 10px 15px;
    color: #909090;
    font-family: Lato, sans-serif;
    font-size: 14px;
    letter-spacing: 0.2px;
    text-transform: none;
    cursor: pointer;
}

.cbs-car__list li:hover,
.cbs-car__list li.k-state-hover,
.cbs-car__list li.k-state-focused {
    background-color: #f9f9f9;
}

.cbs-car__list li.k-state-selected {
    color: var(--cbs-accent, #bc0019);
}

/* ---- home page: one bar, the title on the left, the three dropdowns and the button next to it ---- */

.cbs-car--home {
    padding: 18px 0;
    text-align: center;
}

.cbs-car--home .cbs-car__fields {
    display: flex;
    align-items: center;
    width: 1200px;
    max-width: 100%;
    margin: 0 auto;
}

.cbs-car--home .cbs-car__title {
    flex: 0 0 auto;
    margin: 0;
    padding: 0 30px 0 3.5px;
}

.cbs-car--home .cbs-car__field {
    flex: 1 1 0;
    min-width: 0;
}

.cbs-car--home .cbs-car__action {
    flex: 0 0 23%;
    min-width: 215px;
}

/* as before, the button stops 57px short of the right edge of its cell */
.cbs-car--home .cbs-car__button {
    width: calc(100% - 57px);
}

/* ---- on top of the filter panel: a dark block, everything stacked ---- */

.cbs-car--panel {
    position: relative;
    margin: 0 0 20px;
    padding: 10px;
    box-shadow: 0 0 13px rgba(0, 0, 0, 0.25);
    text-align: center;
}

/* the title sits in the same box as the dropdowns, which are inset by 6px: it takes that back */
.cbs-car--panel .cbs-car__title {
    margin: 0 -6px 25px;
    padding: 0 3px 4px;
    color: #fff;
    font-size: 18px;
}

.cbs-car--panel .cbs-car__title strong {
    font-weight: 400;
}

.cbs-car--panel .cbs-car__fields {
    padding: 0 6px 6px;
}

.cbs-car--panel .cbs-car__field {
    margin: 0 0 7px;
}

.cbs-car--panel span.k-dropdown-wrap {
    background-color: #fff;
    color: #232628;
}

/* ---- the link to the car that was chosen earlier ---- */

.cbs-car--mini {
    position: relative;
    margin: 0 0 20px;
    padding: 10px;
    box-shadow: 0 0 13px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.cbs-car--mini .cbs-car__title {
    margin: 0 0 15px;
    padding: 0 3px 4px;
    color: #fff;
    font-size: 18px;
}

.cbs-car--mini .cbs-car__title strong {
    font-weight: 400;
}

.cbs-car--mini .cbs-car__link {
    display: block;
    margin-top: 8px;
    padding-top: 10px;
    color: #ccc;
    font-size: 14px;
    text-align: left;
}

/* ---- tablet and phone, home page: title above, dropdowns in a row (or stacked), full width button ---- */

@media (max-width: 1200px) {
    .cbs-car--home {
        padding: 30px;
    }

    .cbs-car--home .cbs-car__fields {
        flex-wrap: wrap;
        justify-content: center;
        width: auto;
    }

    .cbs-car--home .cbs-car__title {
        flex: 0 0 100%;
        margin: 0 0 15px;
        padding: 0;
        text-align: center;
    }

    .cbs-car--home .cbs-car__field {
        flex: 0 0 calc(33.333% - 10px);
        margin: 0 5px 10px;
        padding: 0;
    }

    .cbs-car--home .cbs-car__action {
        flex: 0 0 calc(100% - 10px);
        min-width: 0;
        margin: 0 5px;
        padding: 0;
    }

    .cbs-car--home span.k-dropdown-wrap {
        padding: 16.5px 40px;
        text-align: center;
    }

    .cbs-car--home .cbs-car__button {
        width: calc(100% - 7px);
    }
}

@media (max-width: 767px) {
    .cbs-car--home .cbs-car__field {
        flex: 0 0 100%;
        margin: 0 0 7px;
    }

    .cbs-car--home .cbs-car__action {
        flex: 0 0 100%;
        margin: 0;
    }
}
