/* ---- legacy-search-bar (brand-borg-warner / part-search mockup) ---- */
.legacy-search-bar.legacy-search-by-vehicle {
  box-sizing: border-box;
  background: #141a22;
  border-bottom: 2px solid #1a1a1a;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  overflow: visible;
  --legacy-bar-h: 36px;
}

.legacy-search-bar.legacy-search-by-vehicle *,
.legacy-search-bar.legacy-search-by-vehicle *::before,
.legacy-search-bar.legacy-search-by-vehicle *::after {
  box-sizing: border-box;
}

.legacy-search-bar__label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 900;
  color: #008080;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

.legacy-search-bar__divider {
  width: 1px;
  height: 30px;
  background: #1e1e1e;
  flex-shrink: 0;
}

.legacy-search-bar__select,
.legacy-search-bar__input {
  flex: 1;
  min-width: 0;
  height: var(--legacy-bar-h) !important;
  min-height: var(--legacy-bar-h) !important;
  max-height: var(--legacy-bar-h) !important;
  padding: 0 10px !important;
  margin: 0;
  background: #303030 !important;
  border: 1px solid #363636 !important;
  border-radius: 3px;
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  color: #dde3e9 !important;
  outline: none;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
  line-height: normal !important;
}

.legacy-search-bar__select {
  cursor: pointer;
  padding-right: 28px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23aeb6bf' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 10px 6px !important;
}

.legacy-search-bar__select:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.legacy-search-bar__select option {
  background: #303030;
  color: #dde3e9;
}

.legacy-search-bar__go {
  background: #008080 !important;
  color: #f0f2f4 !important;
  border: none !important;
  height: var(--legacy-bar-h) !important;
  min-height: var(--legacy-bar-h) !important;
  max-height: var(--legacy-bar-h) !important;
  padding: 0 22px !important;
  border-radius: 3px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  line-height: 1 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.legacy-search-bar__go:hover {
  background: #006666 !important;
}

.legacy-search-bar__or {
  color: #555;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.legacy-search-bar__field-group {
  display: flex;
  flex: 1.5;
  min-width: 0;
  align-items: center;
  height: var(--legacy-bar-h);
}

.legacy-search-bar__field-group--oem {
  position: relative;
  overflow: visible;
  height: auto;
  min-height: var(--legacy-bar-h);
  align-self: center;
}

.legacy-search-bar__oem-suggestions {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 700;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  max-height: 360px;
  overflow: auto;
  width: 100% !important;
}

.legacy-search-bar__field-group--oem .legacy-search-bar__input,
.legacy-search-bar__field-group--oem .legacy-search-bar__search-btn {
  position: relative;
  z-index: 1;
}

.legacy-search-bar__field-group .legacy-search-bar__input {
  flex: 1;
  min-width: 0;
  border-right: none !important;
  border-radius: 3px 0 0 3px !important;
  padding: 0 12px !important;
}

.legacy-search-bar__field-group .legacy-search-bar__input:focus {
  border-color: #008080 !important;
}

.legacy-search-bar__field-group .legacy-search-bar__input::placeholder {
  color: #aeb6bf;
  opacity: 1;
}

.legacy-search-bar__search-btn {
  background: #008080 !important;
  color: #f0f2f4 !important;
  border: none !important;
  width: 40px;
  height: var(--legacy-bar-h) !important;
  min-height: var(--legacy-bar-h) !important;
  max-height: var(--legacy-bar-h) !important;
  padding: 0 !important;
  border-radius: 0 3px 3px 0;
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.legacy-search-bar__search-btn:hover {
  background: #006666 !important;
}

/* Beat global form / bootstrap input sizing */
.path-catalogue.catalogue-brand-search .legacy-search-bar.legacy-search-by-vehicle input[type="text"],
.path-catalogue.catalogue-brand-search .legacy-search-bar.legacy-search-by-vehicle input.form-control,
.path-catalogue.catalogue-brand-search .legacy-search-bar.legacy-search-by-vehicle input.form-text,
.path-catalogue.catalogue-brand-search .legacy-search-bar.legacy-search-by-vehicle select,
.path-part-search .legacy-search-bar.legacy-search-by-vehicle input[type="text"],
.path-part-search .legacy-search-bar.legacy-search-by-vehicle input.form-control,
.path-part-search .legacy-search-bar.legacy-search-by-vehicle input.form-text,
.path-part-search .legacy-search-bar.legacy-search-by-vehicle select,
.path-catalogue.catalogue-part-type-search .legacy-search-bar.legacy-search-by-vehicle input[type="text"],
.path-catalogue.catalogue-part-type-search .legacy-search-bar.legacy-search-by-vehicle input.form-control,
.path-catalogue.catalogue-part-type-search .legacy-search-bar.legacy-search-by-vehicle input.form-text,
.path-catalogue.catalogue-part-type-search .legacy-search-bar.legacy-search-by-vehicle select {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
}

/* Part-search: place Search By Vehicle bar below the page hero (mockup order). */
.path-part-search .main-content {
  display: flex;
  flex-direction: column;
}

.path-part-search .main-content > .region {
  order: 3;
}

.path-part-search .main-content__container {
  order: 1;
}

@media (max-width: 1180px) {
  .legacy-search-bar__field-group {
    flex: 1 1 46%;
  }
}

@media (max-width: 760px) {
  .legacy-search-bar__select {
    flex: 1 1 45% !important;
  }

  .legacy-search-bar__field-group {
    flex: 1 1 100% !important;
  }
}

@media (max-width: 520px) {
  .legacy-search-bar__select {
    flex: 1 1 100% !important;
  }
}
