/* Filter Control Styling */
.filter-control {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  position: relative;
}

.filter-header {
  padding: 10px;
  background: #cf173b;
  color: white;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
  font-weight: bold;
  user-select: none;
  font-size: 18px;
  width: 40px;
  height: 40px;
  box-sizing: border-box;
  box-shadow: 0 1px 5px rgba(0,0,0,0.4);
  position: relative;
  z-index: 1001;
}

.filter-control:has(.filter-panel:not(.collapsed)) .filter-header {
  border-radius: 4px 4px 0 0;
  box-shadow: none;
}

.filter-header:hover {
  background: #b01532;
}

.filter-panel {
  position: absolute;
  top: 40px;
  right: 0;
  padding: 0;
  width: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background: transparent;
  z-index: 1000;
}

.filter-panel:not(.collapsed) {
  padding: 15px;
  width: 240px;
  max-height: 500px;
  overflow-y: auto;
  background: white;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.4);
}

.filter-group {
  margin-bottom: 15px;
  padding-bottom: 5px;
  border-bottom: 1px solid #fae7eb;
}

.filter-group:last-of-type {
  border-bottom: none;
}

.filter-group label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 600;
  font-size: 14px;
}

.filter-group label input[type="checkbox"] {
  margin-right: 8px;
}

.filter-group input[type="text"],
.filter-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 14px;
}

.filter-group input[type="text"]:focus,
.filter-group select:focus {
  outline: none;
  border-color: #cf173b;
}

.filter-group input[type="range"] {
  width: 100%;
  display: block;
  margin-bottom: 5px;
}

.btn-small {
  padding: 6px 12px;
  background: #cf173b;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  width: 100%;
  margin-top: 5px;
}

.btn-small:hover {
  background: #b01532;
}

.btn-small:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-clear {
  width: 100%;
  padding: 10px;
  background: #fae7eb;
  color: #cf173b;
  border: 1px solid #cf173b;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.btn-clear:hover {
  background: #cf173b;
  color: white;
}

.filter-actions {
  margin-top: 10px;
}

#distanceValue {
  display: inline-block;
  margin-left: 10px;
  font-weight: bold;
  color: #cf173b;
  font-size: 14px;
}

#locationDisplay {
  padding: 8px;
  background: #f0f9ff;
  border-left: 3px solid #cf173b;
  border-radius: 4px;
  font-style: italic;
}

/* Custom Select Dropdown Styling */
.custom-select {
  position: relative;
  width: 100%;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
}

.custom-select-button {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.2s;
}

.custom-select-button:hover {
  border-color: #cf173b;
}

.custom-select-button:focus {
  outline: none;
  border-color: #cf173b;
}

.custom-select-button.open {
  border-color: #cf173b;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.custom-select-arrow {
  font-size: 10px;
  transition: transform 0.2s;
  color: #666;
}

.custom-select-button.open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #cf173b;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1002;
}

.custom-select-option {
  padding: 8px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.custom-select-option:hover {
  background: #fae7eb;
}

.custom-select-option.selected {
  background: #cf173b;
  color: white;
}

.custom-select-option.selected:hover {
  background: #b01532;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .filter-panel:not(.collapsed) {
    width: 240px;
    min-width: 240px;
    max-width: 300px;
  }

  .filter-header {
    font-size: 16px;
    width: 36px;
    height: 36px;
  }

  .filter-group label {
    font-size: 13px;
  }

  .filter-group input[type="text"],
  .custom-select-button {
    font-size: 13px;
    padding: 6px;
  }

  .custom-select-option {
    font-size: 13px;
    padding: 6px 8px;
  }
}
