/* Simple, clear, user-friendly location dropdown (public/custom/location/location.css) */

/* Wrapper */
[data-location-dropdown] {
  position: relative;
}

/* Trigger */
[data-location-dropdown] .filter-select {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #dcdfe4 !important;
  border-radius: 8px !important;
  background: #fff !important;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

[data-location-dropdown] .filter-select:hover,
[data-location-dropdown] .filter-select.active {
  border-color: #4a90e2 !important;
  box-shadow: 0 0 0 3px rgba(74,144,226,.15);
}

[data-location-dropdown] .filter-select span.location-display-text {
  color: #2c3e50;
  font-size: 14px;
  font-weight: 500;
}

/* Panel */
[data-location-dropdown] .dropdown-menu-modern {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  right: 0 !important;
  background: #fff !important;
  border: 1px solid #e6e9ed !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.08) !important;
  z-index: 1000;
  overflow: hidden;
  display: none !important; /* hidden by default */
}

/* Show when wrapper active (and also when JS sets display:block inline) */
[data-location-dropdown].active .dropdown-menu-modern,
[data-location-dropdown] .dropdown-menu-modern[style*="display: block"] {
  display: block !important;
}

/* Search */
[data-location-dropdown] .dropdown-search-box {
  padding: 10px;
  border-bottom: 1px solid #f0f2f5;
  background: #fafbfc;
  position: relative;
}

[data-location-dropdown] .dropdown-search-input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid #dcdfe4;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}

[data-location-dropdown] .dropdown-search-input:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74,144,226,.12);
}

[data-location-dropdown] .search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #98a1a9;
}

/* List */
[data-location-dropdown] .dropdown-options-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  max-height: 320px;
  overflow-y: auto;
}

[data-location-dropdown] .dropdown-option-item {
  padding: 10px 12px;
  font-size: 14px;
  color: #2c3e50;
  cursor: pointer;
  outline: none;
}

[data-location-dropdown] .dropdown-option-item:hover,
[data-location-dropdown] .dropdown-option-item.keyboard-focus {
  background: #f3f6f9;
}

[data-location-dropdown] .dropdown-option-item.selected {
  background: #e8f1fc;
  color: #1f5fbf;
  font-weight: 600;
}

/* States */
[data-location-dropdown] .loading-placeholder,
[data-location-dropdown] .no-results-message,
[data-location-dropdown] .error-message {
  padding: 16px 12px;
  font-size: 14px;
  color: #5f6b76;
  text-align: left;
}

@media (max-width: 768px) {
  [data-location-dropdown] .dropdown-menu-modern {
    border-radius: 8px !important;
    max-height: 70vh;
  }
}
