
/* YANKEE MOTORS — PREMIUM CUSTOM DROPDOWNS */

.mobile-filter-stack .ym-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.mobile-filter-stack .real-filter-field:has(.ym-custom-dropdown)::after {
  display: none !important;
}

.ym-custom-dropdown {
  position: relative;
  width: 100%;
}

.ym-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #102f4c;
  font: 750 15px "Manrope", sans-serif;
  text-align: left;
  cursor: pointer;
}

.ym-dropdown-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #edf4ff;
  color: #1169c8;
  font-size: 18px;
  transition: transform .2s ease;
}

.ym-custom-dropdown.is-open .ym-dropdown-arrow {
  transform: rotate(180deg);
}

.ym-dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: -18px;
  z-index: 1000;
  width: calc(100% + 36px);
  padding: 8px;
  border: 1px solid #e5eaf0;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(13, 43, 70, .14);
  box-sizing: border-box;
}

.ym-dropdown-panel[hidden] {
  display: none !important;
}

.ym-dropdown-search {
  padding: 5px;
  margin-bottom: 5px;
}

.ym-dropdown-search input {
  width: 100% !important;
  padding: 11px 12px !important;
  border: 1px solid #e2e8ef !important;
  border-radius: 9px !important;
  background: #f8fafc !important;
  font-size: 12px !important;
  outline: none;
}

.ym-dropdown-options {
  display: grid;
  gap: 3px;
  max-height: 240px;
  overflow-y: auto;
  padding: 3px;
}

.ym-dropdown-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 41px;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #243b53;
  font: 600 12px "Inter", sans-serif;
  text-align: left;
  cursor: pointer;
}

.ym-dropdown-option:hover,
.ym-dropdown-option[aria-selected="true"] {
  background: #f0f5fb;
}

.ym-option-check {
  color: #1169c8;
  font-weight: 800;
}

.ym-dropdown-trigger:focus-visible,
.ym-dropdown-option:focus-visible {
  outline: 2px solid #1169c8;
  outline-offset: 2px;
}

/* Ensure open menu displays over neighboring fields */

.mobile-filter-stack .real-filter-field:has(
  .ym-custom-dropdown.is-open
) {
  z-index: 50;
}

/* Extra safety for narrow mobile screens */

@media (max-width: 600px) {
  .ym-dropdown-panel {
    left: -12px;
    width: calc(100% + 24px);
  }

  .ym-dropdown-trigger {
    font-size: 14px;
  }
}
.mobile-filter-stack:has(.ym-custom-dropdown.is-open) {
  overflow: visible !important;
}
/* ==========================================
   YANKEE MOTORS — DROPDOWN STACKING FIX
   ========================================== */

/* Allow dropdowns to extend outside the filter container */
.search-shell,
.mobile-filter-stack,
.real-filter-pair,
.real-filter-field {
  overflow: visible !important;
}

/* Keep the filter area above surrounding content */
.search-shell:has(.ym-custom-dropdown.is-open) {
  position: relative;
  z-index: 9999 !important;
}

/* Raise the active filter above the other fields */
.mobile-filter-stack .real-filter-field:has(
  .ym-custom-dropdown.is-open
) {
  position: relative;
  z-index: 10000 !important;
}

/* Raise the two-column row when Distance is open */
.mobile-filter-stack .real-filter-pair:has(
  .ym-custom-dropdown.is-open
) {
  position: relative;
  z-index: 10000 !important;
}

/* Active dropdown */
.ym-custom-dropdown.is-open {
  position: relative;
  z-index: 10001 !important;
}

/* Popup menu */
.ym-custom-dropdown .ym-dropdown-panel {
  position: absolute;
  z-index: 10002 !important;
}/* ========================================
   YANKEE MOTORS — SMART DROPDOWN POSITION
   ======================================== */

/* Distance dropdown opens UPWARD */
.mobile-filter-stack
.real-filter-pair
.ym-dropdown-panel {
  top: auto !important;
  bottom: calc(100% + 10px) !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 99999 !important;
}

/* Other dropdowns open downward */
.mobile-filter-stack
.real-filter-field:not(.real-filter-pair .real-filter-field)
.ym-dropdown-panel {
  z-index: 99999 !important;
}

/* Keep active field above other filters */
.mobile-filter-stack
.real-filter-field:has(.ym-custom-dropdown.is-open) {
  position: relative;
  z-index: 99999 !important;
}

/* Raise Distance + ZIP container */
.mobile-filter-stack
.real-filter-pair:has(.ym-custom-dropdown.is-open) {
  position: relative;
  z-index: 99998 !important;
}

/* Prevent the dropdown from being clipped */
.mobile-filter-stack:has(.ym-custom-dropdown.is-open),
.search-shell:has(.ym-custom-dropdown.is-open),
.search-shell form:has(.ym-custom-dropdown.is-open) {
  overflow: visible !important;
}