/* Compact Sidebar */
.sidebar {
  position: sticky;
  top: 95px; /* Adjust based on your header height */
  height: fit-content;
  font-family: 'Roboto', sans-serif;
  background: #ffffff;
  border-radius: 8px;
  padding: 16px 12px;
  margin-right: 6px;
  width: 250px;
  box-shadow: 0 3px 8px rgba(0, 55, 125, 0.06);
  color: #222f3e;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
}

/* Sidebar Title */
.sidebar h2 {
  font-weight: 700;
  font-size: 1rem;
  color: #1e40af;
  border-bottom: 2px solid #3b82f6;
  padding-bottom: 5px;
  margin-bottom: 6px;
}

/* Labels */
.sidebar label,
.custom-dropdown label {
  font-weight: 500;
  font-size: 0.75rem;
  color: #374151;
  margin-bottom: 4px;
  display: block;
}

/* Inputs and Selects */
.filter-select,
.filter-input {
  width: 100%;
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  color: #111827;
  transition: border 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
  min-height: 34px;
}

.filter-select:focus,
.filter-input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

/* Dropdown Arrow (native select) */
.filter-select {
  background-image: url("data:image/svg+xml;utf8,<svg fill='none' height='10' stroke='%23333' stroke-width='2' viewBox='0 0 24 24' width='10' xmlns='http://www.w3.org/2000/svg'><path d='M6 9l6 6 6-6'/></svg>");
  background-position: right 10px center;
  background-size: 10px 10px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

/* Sections */
.sidebar section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Smaller Business Sidebar Width */
#businessSidebar {
  width: 200px;
}

/* Filter/Category List Links */
.category-list,
.filter-list {
  margin-bottom: 18px;
}

.category-list a,
.filter-list a {
  display: block;
  padding: 8px 10px;
  font-size: 0.8rem;
  color: #374151;
  text-decoration: none;
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.2s ease;
}

.category-list a:hover,
.filter-list a:hover {
  background-color: #f9fafb;
}

/* Filter Group Container */
#filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

/* Custom Dropdown Container */
.custom-dropdown {
  position: relative;
  margin-bottom: 14px;
  font-family: 'Roboto', sans-serif;
}

/* Dropdown Display Box */
.dropdown-selected {
  background: #f1f4f9;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  border: 1px solid #dcdcdc;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

/* Dropdown Arrow */
.dropdown-selected::after {
  content: "▾";
  float: right;
  margin-left: 8px;
  color: #888;
  font-size: 0.7rem;
}

/* Hover */
.dropdown-selected:hover {
  background: #e6eef8;
}

/* Dropdown Options List */
.dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 150px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 4px;
  margin-left: 0 !important;
  z-index: 100;
  display: none;
  box-shadow: 0 3px 6px rgba(0,0,0,0.08);
  padding: 0;
  list-style: none;
  box-sizing: border-box;
}

/* Dropdown Items */
.dropdown-options li {
  padding: 8px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  border-bottom: 1px solid #f1f1f1;
}

.dropdown-options li:last-child {
  border-bottom: none;
}

.dropdown-options li:hover {
  background-color: #f0f4f8;
}

@media (max-width: 768px) {
  .sidebar {
    position: static;
    width: 100%;
    margin-right: 0;
    margin-bottom: 14px;
    padding: 10px;
    border-radius: 0;
    box-shadow: none;
    gap: 10px;
  }

  .sidebar h2 {
    font-size: 0.9rem;
    text-align: center;
    border: none;
    margin-bottom: 6px;
    padding-bottom: 0;
  }

  .sidebar section {
    flex-direction: column;
    gap: 8px;
  }

  .filter-select,
  .filter-input,
  .dropdown-selected {
    font-size: 0.85rem;
    padding: 8px;
    min-height: 34px;
  }

  .category-list,
  .filter-list {
    margin-bottom: 12px;
  }

  .category-list a,
  .filter-list a {
    font-size: 0.85rem;
    padding: 8px;
  }

  .dropdown-options li {
    font-size: 0.85rem;
    padding: 8px;
  }
  
  #businessSidebar {
    width: 100%;
    margin-right: 0;
  }
}

