/* ══════════════════════════════════════
   FILTER BAR
   ══════════════════════════════════════ */

/* ── Mobile filter toggle button ── */
.filter-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid #d0d5dd;
  background: #fff;
  font-size: 15px;
  color: #444;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-toggle-btn:hover {
  border-color: #aaa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ── Dropdown arrow ── */
.views-exposed-form .js-form-item:not(.form-item-title)::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 6px;
  pointer-events: none;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* ══════════════════════════════════════
   MOBILE
   ══════════════════════════════════════ */
@media (max-width: 768px) {

  .views-exposed-form {
    flex-direction: column;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
    margin-bottom: 20px;
  }

  .filter-mobile-top-row {
    display: flex !important;
    gap: 8px;
    align-items: center;
    width: 100%;
  }

  .views-exposed-form .form-item-title {
    flex: 1;
    min-width: 0;
    order: -1;
  }

  /* Locked visible — nothing can override */
  .filter-toggle-btn {
    display: flex !important;
    flex-shrink: 0;
  }

  .filter-dropdowns-panel {
    display: none;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #f9f9fb;
    border-radius: 14px;
    border: 1px solid #e8e8ee;
  }

  .filter-dropdowns-panel.is-open {
    display: flex;
  }

  .views-exposed-form .js-form-item:not(.form-item-title) {
    flex: unset;
    width: 100%;
  }

  .views-exposed-form select {
    width: 100%;
    font-size: 14px;
    height: 42px;
  }
}

/* ══════════════════════════════════════
   CLEAR ALL BUTTON (top of panel)
   ══════════════════════════════════════ */
.filter-clear-all-btn {
  display: none;
  align-items: center;
  gap: 6px;
  align-self: flex-end;
  padding: 4px 12px 4px 10px;
  border-radius: 20px;
  border: 1.5px solid #E01A4F;
  background: transparent;
  color: #E01A4F;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 4px;
}

.filter-clear-all-btn:hover {
  background: #E01A4F;
  color: #fff;
}

/* ══════════════════════════════════════
   PER-FILTER CLEAR × BUTTON
   ══════════════════════════════════════ */
.filter-clear-btn {
  display: none;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.14);
  color: inherit;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
  z-index: 2;
  line-height: 1;
}

.filter-clear-btn:hover {
  background: rgba(0, 0, 0, 0.28);
  transform: translateY(-50%) scale(1.15);
}

/* Shrink select text area when × is visible */
.views-exposed-form .js-form-item:not(.form-item-title):has(.filter-clear-btn[style*="inline-flex"]) select {
  padding-right: 36px;
}

/* Shift dropdown arrow left when × is visible */
.views-exposed-form .js-form-item:not(.form-item-title):has(.filter-clear-btn[style*="inline-flex"])::after {
  right: 30px;
}
