﻿#dealerLocator {
  position: relative;
  font-family: Arial, sans-serif;
  width: 100%;
  min-height: 600px;
}

#dealerLocator .sidebar {
  background-color: #f8f8f8;
  position: absolute;
  top: 15px;
  left: 15px;
  width: 360px;
  max-width: 90%;
  z-index: 20;
  padding: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  border-radius: 4px;
}

#dealerLocator.retracted .sidebar {
  width: 50px;
  overflow: hidden;
  height: 48px;
}

#dealerLocator.retracted .sidebar .filter #finddealer,
#dealerLocator.retracted .sidebar .filter #selectors,
#dealerLocator.retracted .sidebar .results,
#dealerLocator.retracted .sidebar .dealer-locator-tablist {
  display: none !important;
}

#dealerLocator .sidebar .filter .dealer-locator-tab-bar,
#dealerLocator .sidebar .filter .dealer-locator-tablist {
  padding: 0;
}

#dealerLocator .dealer-locator-tab-bar {
  display: flex;
  align-items: stretch;
  border-bottom: 2px solid #ddd;
}

#dealerLocator .dealer-locator-tablist {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
}

#dealerLocator .dealer-locator-tablist button {
  padding: 4px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: bold;
  line-height: 22px;
  color: #555;
  background: #f3f3f3;
  border: 0;
  border-bottom: 2px solid transparent;
}

#dealerLocator .dealer-locator-tablist button[aria-selected="true"] {
  background: #fff;
  color: #d00;
  border-bottom-color: #d00;
}

#dealerLocator .dealer-locator-tablist button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

#dealerLocator .dealer-locator-tab-bar #btnminmax {
  margin-left: auto;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px 8px;
  color: #777;
}

#dealerLocator .dealer-locator-tab-bar #btnminmax[aria-expanded="false"] svg {
  transform: rotate(180deg);
}

#dealerLocator .dealer-locator-actions svg {
  vertical-align: -2px;
  margin-right: 4px;
}

#dealerLocator .filter {
  margin-top: 10px;
}

#dealerLocator .filter table {
  margin-bottom: 0;
}

#dealerLocator .filter table td {
  padding: 4px 0;
  border: 0;
}

#dealerLocator .results {
  overflow-y: auto;
  max-height: 380px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-top: 10px;
}

#dealerLocator .results .item {
  border-bottom: 1px solid #eee;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.15s;
}

#dealerLocator .results .item:hover {
  background-color: #f0f7ff;
}

#dealerLocator .results .item.selected {
  background-color: #e6f2ff;
  border-left: 3px solid #d00;
}

#dealerLocator .results .item .name {
  font-weight: bold;
  color: #111;
  font-size: 14px;
  margin-bottom: 3px;
}

#dealerLocator .results .item .address {
  color: #555;
  line-height: 1.3;
}

#dealerLocator .results .item .distance {
  float: right;
  font-weight: bold;
  color: #d00;
  font-size: 12px;
}

#dealerLocator .results .item .phone {
  margin-top: 4px;
  color: #333;
}

#dealerLocator .results .item .links {
  margin-top: 6px;
}

#dealerLocator .results .item .links a {
  font-size: 12px;
  margin-right: 10px;
  color: #0066cc;
  text-decoration: none;
}

#dealerLocator .results .item .links a:hover {
  text-decoration: underline;
}

#dealerLocator #mapCanvas {
  border-radius: 4px;
}

#dealerLocator.dealer-locator-nl {
  --dealer-map-control-size: 40px;
  --dealer-map-control-inset: 10px;
}

#dealerLocator.dealer-locator-nl #mapCanvas {
  box-sizing: border-box;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#dealerLocator.dealer-locator-nl .sidebar {
  position: absolute;
  top: var(--dealer-map-control-inset);
  left: var(--dealer-map-control-inset);
  width: min(300px, calc(100% - 3 * var(--dealer-map-control-inset) - var(--dealer-map-control-size)));
  max-width: none;
  padding: 0;
  margin: 0;
  background: transparent;
  box-shadow: none;
}

#dealerLocator.dealer-locator-nl.retracted .sidebar {
  width: var(--dealer-map-control-size);
  height: var(--dealer-map-control-size);
  overflow: visible;
}

#dealerLocator.dealer-locator-nl .filter {
  margin-top: 0;
  padding-bottom: 0;
}

#dealerLocator.dealer-locator-nl .dealer-locator-tab-bar,
#dealerLocator.dealer-locator-nl .dealer-locator-tablist button,
#dealerLocator.dealer-locator-nl .results {
  border: 0;
}

#dealerLocator.dealer-locator-nl .dealer-locator-tablist button {
  min-width: 0;
  min-height: var(--dealer-map-control-size);
  padding: 0 clamp(5px, 1.5vw, 14px);
  font-size: clamp(13px, 3.6vw, 16px);
  font-weight: normal;
  line-height: 1.2;
  color: #666;
}

#dealerLocator.dealer-locator-nl .dealer-locator-tablist {
  flex-wrap: nowrap;
}

#dealerLocator.dealer-locator-nl .dealer-locator-tablist button[aria-selected="true"] {
  color: #000;
}

#dealerLocator.dealer-locator-nl .dealer-locator-tab-bar #btnminmax {
  display: grid;
  flex: 0 0 var(--dealer-map-control-size);
  place-items: center;
  align-self: flex-start;
  width: var(--dealer-map-control-size);
  height: var(--dealer-map-control-size);
  padding: 0;
  border-radius: 2px;
  background: #fff;
  color: #444;
  box-shadow: 0 1px 4px rgb(0 0 0 / 30%);
}

#dealerLocator.dealer-locator-nl .results {
  margin: 0;
  max-height: min(380px, 40vh);
  border-radius: 0;
  box-shadow: none;
}

#dealerLocator.dealer-locator-nl #selectors {
  padding: 0;
}

#dealerLocator.dealer-locator-nl #selectors .uk-select {
  display: block;
  height: 32px;
  margin: 0;
  line-height: 30px;
}

#dealerLocator.dealer-locator-nl #finddealer #sCity,
#dealerLocator.dealer-locator-nl #ddlFilter {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 34px;
  margin: 0;
  line-height: 32px;
}

#dealerLocator.dealer-locator-nl .filter .dealer-locator-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
}

#dealerLocator.dealer-locator-nl .filter .dealer-locator-actions > div {
  width: auto;
  margin: 0;
  padding: 0;
}

#dealerLocator.dealer-locator-nl .dealer-locator-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 32px;
  padding: 3px 5px;
  font-size: 13px;
  line-height: 1.2;
  white-space: normal;
}

#dealerLocator.dealer-locator-nl .dealer-locator-actions svg {
  flex: 0 0 14px;
  margin-right: 0;
}

body:has(> #dealerLocator.dealer-locator-nl) > .cms-full-width-content:has(> #content-container > .full-width > article:empty) {
  display: none;
}

@media (max-width: 768px) {
  #dealerLocator:not(.dealer-locator-nl) .sidebar {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    margin-bottom: 15px;
  }
}
