.filter-panel.panel {
  left: 0;
  width: var(--panel-width);
  overflow: hidden;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(.4, 0, .2, 1);
}


.filter-panel.panel.visible {
  transform: translateX(0);
}


/* Filter Panel Header - simplified and clear */
.filter-panel-header.panel-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 12px 22px 8px 22px;
  backdrop-filter: blur(4px);
  border-radius: var(--panel-radius) var(--panel-radius) 0 0;
  background: var(--panel-header-bg);
  box-shadow: var(--panel-header-shadow);
  border-bottom: 1px solid var(--color-border);
  position: relative;
}

.filter-panel-header.panel-header h3 {
  margin: 0;
  padding: 0;
  font-size: 21px;
  font-weight: 700;
  color: #222;
  letter-spacing: -0.5px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
  flex-shrink: 1;
  min-width: 60px;
}

.filter-panel-header.panel-header .header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.filter-panel-header.panel-header .clear-filters-btn.panel-btn {
  font-size: 13px;
  padding: 6px 12px;
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-panel-header.panel-header .panel-close {
  position: relative !important;
  background: none !important;
  border: none !important;
  font-size: 22px;
  color: #888;
  cursor: pointer;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  top: auto !important;
  right: auto !important;
}

.filter-panel-header.panel-header .panel-close:hover {
  background: var(--color-background-alt) !important;
  color: #222;
}



.filter-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 18px 22px;
  padding-bottom: 18px;
  background: transparent;
}

.filter-section {
  margin-bottom: 10px;
  font-size: 14px;
  border-radius: 0;
  background: none;
  box-shadow: none;
  padding: 0 0 4px 0;
  transition: none;
}

.filter-section.apple-section {
  background: none;
  box-shadow: none;
}

.filter-section:last-child {
  margin-bottom: 0;
}

.filter-section-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.filter-section-row h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.filter-section h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.range-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  margin-bottom: 2px;
}

.range-inputs input {
  flex: 1;
  width: 72px;
  /* Use .apple-input from main.css for Apple-like input style */
}

.range-inputs span {
  color: var(--color-text-light);
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--color-text-primary);
  cursor: pointer;
  margin-bottom: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  border-radius: 6px;
  padding: 2.5px 0 2.5px 2px;
  transition: background 0.2s;
}

.checkbox-group label:hover {
  background: #f3f7fa;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 1.5px solid #b6c6da;
  border-radius: 6px;
  cursor: pointer;
  background: var(--color-background-alt);
  accent-color: var(--color-primary);
  transition: border 0.2s, box-shadow 0.2s;
}

.checkbox-group input[type="checkbox"]:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px #b6e0fe;
}

.checkbox-group input[type="checkbox"]:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 1.5px 4px 0 rgba(0, 122, 255, 0.06);
}

.select-controls {
  display: flex;
  flex-direction: row;
  gap: 6px;
  margin-bottom: 2px;
  justify-content: flex-end;
  align-items: center;
  padding: 0;
}

/* Smaller size for select/deselect all buttons */
.select-controls button {
  font-size: 13px;
  padding: 5px 12px;
}


/* Responsive adjustments */
@media (max-width: 768px) {
  .panel-close {
    position: static !important;
    right: unset !important;
    top: unset !important;
    margin-left: auto;
    align-self: center;
    z-index: 1;
  }
  .filter-panel.panel {
    top: unset;
  }

  .filter-panel.panel {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: 50vh;
    border-radius: 12px 12px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
  }

  .filter-panel-header {
    border-radius: 12px 12px 0 0;
    padding: 12px 16px;
  }

  .filter-panel-header .mobile-only {
    display: block;
    background: none;
    border: none;
    font-size: 20px;
    padding: 4px;
    cursor: pointer;
    color: var(--color-text-secondary);
  }

  .filter-panel-header .mobile-only:hover {
    color: #1f2937;
  }

  .filter-panel-content {
    padding: 8px 16px;
    max-height: calc(40vh - 60px);
  }

  .filter-panel.panel.visible {
    transform: translateY(0);
  }

}