
:root {
    --bg: #f5f4f0;
    --surface: #ffffff;
    --border: #e2e0d8;
    --text-primary: #1a1a1a;
    --text-muted: #9b9890;
    --accent: #f57c00;
    --radius: 10px;
}

.filter-wrapper {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0px 1.2rem;
    text-align: left;
    z-index: 10;
    float: none;
}

.filter-grid {
    margin: 0 auto;
    display: grid;
    grid-template-columns: 
        minmax(0, 400px) 
        minmax(0, 220px) 
        minmax(0, 220px);
    gap: 12px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pw-filter-group .filter-group:nth-child(1) {
    max-width: 400px;
    width: 100%;
}

/* Select Groups: Max 220px */
.pw-filter-group .filter-group:nth-child(2),
.pw-filter-group .filter-group:nth-child(3) {
    max-width: 220px;
    width: 100%;
}
.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

/* Search Box */
.search-box { position: relative; }
.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.search-box input {
    width: 100%;
    max-width: 400px;
    padding: 8px 14px 8px 42px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8rem;
    background: var(--bg);
    outline: none;
}

/* Select Box */
.select-box { position: relative; }
.select-box svg.sel-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 1;
}
.select-box select {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--bg);
    appearance: none;
    cursor: pointer;
    outline: none;
}
.select-box svg.chevron {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Active Filter Tags */
.filter-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-inline: auto;
}
.active-tag {
    background: #eff4ff;
    border: 1px solid rgba(37,99,235,0.2);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

@media (max-width: 768px) and (min-width: 600px) {
    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filter-grid > :first-child {
        grid-column: span 2; /* full width */
    }
}
@media (max-width: 600px) {
    .filter-grid { grid-template-columns: 1fr; }
}
/* Multi-Select Container */
.multiselect-container {
    position: relative;
    width: 100%;
}

/* The visual box (mimics your existing select-box) */
.select-box.multi {
    cursor: pointer;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 40px 8px 14px;
    font-size: 0.875rem;
    min-height: 37px;
    display: flex;
    align-items: center;
    position: relative;
}

/* The actual list of checkboxes */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 100%;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    z-index: 100;
    margin-top: 5px;
    max-height: 300px;
    min-height: 100px;
    overflow-y: auto;
    padding: 8px;
}

.dropdown-content label {
    display: flex;
    align-items: center;
    padding: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.dropdown-content label:hover {
    background-color: var(--accent-light);
}

.dropdown-content input {
    margin-right: 10px;
    accent-color: var(--accent);
}

/* Show dropdown when active */
.multiselect-container.active .dropdown-content {
    display: block;
}

/* Base Tag Style */
.active-tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

/* Category Tag - Blue */
.active-tag.tag-cat {
    background: #FFF3E0;
    border: 1px solid #FFCC80;
    color: #e65100;
}

/* Industry Tag - Green */
.active-tag.tag-ind {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

/* Search Tag - Neutral/Grey */
.active-tag.tag-search {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.active-tag:hover {
    filter: brightness(0.95);
}
/* Style the multiple select to look like a clean list */
.custom-select {
    display: none; /* We toggle this with the 'active' class */
    width: 100%;
    border: 1px solid var(--border);
    background: white;
    padding: 5px;
    outline: none;
}

.multiselect-container.active .custom-select {
    display: block;
    position: absolute;
    z-index: 100;
}

/* Modern browsers allow some styling of options */
.custom-select option {
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    white-space: normal;
    min-height: 30px;
}

.custom-select option:checked {
    background: var(--accent) linear-gradient(0deg, var(--accent) 0%, var(--accent) 100%);
    color: white;
    border-bottom: 1px solid white;
}
:root {
    /* ... existing variables ... */
    --accent-light: #fff4ed;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.custom-select:focus{
    border: 1px solid #e2e0d8;
    box-shadow:  0 1px 2px rgba(0,0,0,.075),0 0 5px #fff4ed;
}

.select-box.multi .placeholder-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}
.filter-tags {
  display: none;
  align-items: center;
  margin-top: 15px;
}

.filter-tags-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: 8px;
}

.tags-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.clear-all {
  margin-left: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
}

.clear-all:hover {
  color: var(--text-secondary);
}