/* _DS -Dealer-Locator storefront page */

.ds-dl {
    margin-bottom: 30px;
}

.ds-dl__intro {
    margin: 0 0 15px;
}

/* Search bar: location box, then distance + buttons. Everything is the theme's button height. */

.ds-dl__search {
    --ds-dl-control-height: 42px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 15px;
    margin-bottom: 10px;
}

.ds-dl__field label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
}

.ds-dl__search input[type="text"],
.ds-dl__search select {
    height: var(--ds-dl-control-height);
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
    font-size: 14px;
}

.ds-dl__search .ty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--ds-dl-control-height);
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
    white-space: nowrap;
}

.ds-dl__field--location {
    flex: 1 1 260px;
    min-width: 0;
}

.ds-dl__location-box {
    position: relative;
}

.ds-dl__location-box input[type="text"] {
    width: 100%;
    padding-right: 46px;
}

/* "Use my location": an icon inside the right end of the location box. */
.ds-dl__locate {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--ds-dl-control-height);
    height: var(--ds-dl-control-height);
    padding: 0;
    border: 0;
    background: none;
    color: #434343;
    cursor: pointer;
}

.ds-dl__locate:hover,
.ds-dl__locate:focus {
    color: #c2151c;
}

.ds-dl__locate[disabled] {
    opacity: 0.5;
    cursor: wait;
}

.ds-dl__locate[hidden] {
    display: none;
}

.ds-dl__controls {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.ds-dl__field--radius select {
    min-width: 120px;
}

/* Tablet and phone: location box on its own row, distance and buttons on the row below. */
@media (max-width: 1024px) {
    .ds-dl__field--location,
    .ds-dl__controls {
        flex: 1 1 100%;
    }

    .ds-dl__field--radius {
        flex: 1 1 auto;
        min-width: 0;
    }

    .ds-dl__field--radius select {
        width: 100%;
        min-width: 0;
    }
}

.ds-dl__types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 6px 0 10px;
}

.ds-dl__type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: normal;
}

.ds-dl__swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.ds-dl__status {
    min-height: 20px;
    margin-bottom: 8px;
    font-weight: bold;
}

.ds-dl__body {
    display: flex;
    gap: 15px;
    height: 600px;
}

.ds-dl__list {
    flex: 0 0 34%;
    overflow-y: auto;
    border: 1px solid #ddd;
    box-sizing: border-box;
}

.ds-dl__map {
    flex: 1 1 auto;
    min-height: 300px;
    background: #eee;
}

.ds-dl__group {
    margin: 0;
    padding: 8px 12px;
    background: #f3f3f3;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
    font-weight: bold;
}

.ds-dl__item {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    line-height: 1.4;
}

.ds-dl__item.is-active {
    background: #fdf2f1;
}

.ds-dl__name {
    display: block;
    margin-bottom: 2px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: bold;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
}

.ds-dl__name:hover {
    text-decoration: underline;
}

.ds-dl__name--plain {
    cursor: default;
}

.ds-dl__name--plain:hover {
    text-decoration: none;
}

.ds-dl__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
}

.ds-dl__distance {
    margin-left: auto;
    font-weight: bold;
    color: #333;
}

.ds-dl__notes {
    margin: 4px 0;
    font-style: italic;
}

.ds-dl__hours {
    color: #666;
}

.ds-dl__notes {
    white-space: pre-line;
}

.ds-dl__links {
    margin-top: 4px;
}

.ds-dl__links a {
    display: inline-block;
    margin-right: 10px;
    white-space: nowrap;
}

.ds-dl__empty {
    padding: 15px 12px;
    color: #666;
}

.ds-dl__info {
    max-width: 260px;
    line-height: 1.4;
}

.ds-dl__info strong {
    font-size: 14px;
}

.ds-dl__notice {
    padding: 15px;
    color: #666;
}

.ds-dl__notice-reason {
    display: block;
    margin-top: 6px;
}

@media (max-width: 767px) {
    .ds-dl__body {
        flex-direction: column-reverse;
        height: auto;
    }

    /* Fixed sizes: percentage and grow values don't resolve in a column without a set height. */
    .ds-dl__map {
        flex: none;
        height: 350px;
        min-height: 0;
    }

    .ds-dl__list {
        flex: none;
        max-height: 500px;
    }

    /* Less space above the map so more of it shows without scrolling. */
    .ds-dl__search {
        gap: 8px 10px;
    }

    .ds-dl__types {
        margin: 4px 0 6px;
    }
}
