/*
 * assets/more-filters-panel.css
 *
 * Shared "More Filters" panel styles for static.dropventure.com dashboard pages.
 * Extracted verbatim from jobs/index.html's inline <style> (selectors starting with
 * .filters-panel / .filter-preview / @keyframes panel-*), plus new rules at the
 * bottom for value-bearing chip states (data-chip-anchor).
 */
.filters-panel[hidden] { display: none; }

.filters-panel {
      position: fixed;
      inset: 0;
      z-index: 180;
      display: flex;
      justify-content: flex-end;
      align-items: stretch;
      gap: 18px;
    }

.filter-preview {
      position: relative; z-index: 1;
      width: min(340px, calc(100vw - 470px - 44px)); min-width: 280px;
      align-self: center; padding: 0;
      opacity: 0; transform: translateX(18px);
      pointer-events: none;
      transition: opacity 0.22s ease, transform 0.22s ease;
      display: none;
    }

.filters-panel.preview-active .filter-preview {
      display: block; opacity: 1; transform: translateX(0); pointer-events: auto;
    }

.filter-preview__card {
      border-radius: 20px;
      border: 1px solid rgba(1,56,44,0.08);
      background: radial-gradient(circle at top left, rgba(5,150,105,0.07), transparent 44%), linear-gradient(180deg, rgba(255,255,255,0.98), rgba(242,251,247,0.98));
      box-shadow: -8px 24px 52px rgba(1,34,27,0.14);
      padding: 20px; display: grid; gap: 12px;
    }

.filter-preview__card[hidden] { display: none !important; }

.filter-preview__eyebrow {
      font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em;
      text-transform: uppercase; color: rgba(1,56,44,0.38); margin-bottom: 4px;
    }

.filter-preview__title {
      font-size: 1.15rem; font-weight: 700; line-height: 1.15;
      letter-spacing: -0.02em; color: #01382C;
    }

.filter-preview__copy {
      font-size: 0.8125rem; line-height: 1.6; color: rgba(1,56,44,0.55);
    }

.filter-preview__visual {
      padding: 14px; border-radius: 14px;
      border: 1px solid rgba(1,56,44,0.06);
      background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(244,251,247,0.96));
    }

.filter-preview__bar-chart { display: grid; gap: 6px; }

.filter-preview__bar-row { display: flex; align-items: center; gap: 8px; }

.filter-preview__bar-label { font-size: 0.625rem; font-weight: 500; color: rgba(1,56,44,0.45); width: 64px; text-align: right; flex-shrink: 0; }

.filter-preview__bar { height: 6px; border-radius: 3px; background: #059669; flex-shrink: 0; }

.filter-preview__bar--muted { background: rgba(1,56,44,0.08); }

.filter-preview__stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.filter-preview__stat { text-align: center; padding: 10px 8px; border-radius: 10px; background: rgba(1,56,44,0.02); border: 1px solid rgba(1,56,44,0.04); }

.filter-preview__stat strong { display: block; font-size: 1.125rem; font-weight: 700; color: #01382C; }

.filter-preview__stat span { font-size: 0.5625rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(1,56,44,0.35); }

@media (max-width: 900px) {
  .filter-preview { display: none !important; }
}

.filters-panel__backdrop {
      position: absolute;
      inset: 0;
      background: rgba(1, 34, 27, 0.3);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      animation: panel-fade-in 0.18s ease;
    }

.filters-panel__panel {
      position: relative;
      z-index: 1;
      width: min(420px, 100vw);
      height: 100%;
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 252, 249, 0.98) 100%);
      border-left: 1px solid rgba(1, 56, 44, 0.08);
      box-shadow: -22px 0 56px rgba(1, 34, 27, 0.14);
      display: grid;
      grid-template-rows: auto auto minmax(0, 1fr) auto;
      animation: panel-slide-in 0.22s ease;
    }

.filters-panel__top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      padding: 22px 22px 16px;
      border-bottom: 1px solid rgba(1, 56, 44, 0.06);
    }

.filters-panel__title {
      font-size: 1.35rem;
      line-height: 1.08;
      letter-spacing: -0.03em;
      color: #01382C;
    }

.filters-panel__close {
      width: 40px;
      height: 40px;
      border-radius: 999px;
      background: rgba(1, 56, 44, 0.06);
      color: #01382C;
      font-size: 1.125rem;
      line-height: 1;
      flex-shrink: 0;
    }

.filters-panel__overview {
      display: grid;
      gap: 8px;
      padding: 18px 22px;
      border-bottom: 1px solid rgba(1, 56, 44, 0.06);
      background: linear-gradient(180deg, rgba(240, 253, 248, 0.82), rgba(255, 255, 255, 0));
    }

.filters-panel__selection {
      display: inline-flex;
      align-items: center;
      justify-self: start;
      min-height: 28px;
      padding: 0 12px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.9);
      border: 1px solid rgba(1, 56, 44, 0.08);
      color: rgba(1, 56, 44, 0.68);
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.01em;
    }

.filters-panel__summary {
      font-size: 0.8125rem;
      line-height: 1.6;
      color: rgba(1, 56, 44, 0.54);
      max-width: 38ch;
    }

.filters-panel__sections {
      overflow-y: auto;
      padding: 18px 22px 24px;
    }

.filters-panel__section + .filters-panel__section {
      margin-top: 24px;
      padding-top: 24px;
      border-top: 1px solid rgba(1, 56, 44, 0.06);
    }

.filters-panel__section-meta {
      font-size: 0.75rem;
      color: rgba(1, 56, 44, 0.42);
      white-space: nowrap;
    }

.filters-panel .sidebar-title {
      margin-bottom: 0;
    }

.filters-panel .filter-head {
      align-items: baseline;
      margin-bottom: 8px;
    }

.filters-panel .filter-summary {
      margin-bottom: 12px;
      max-width: 34ch;
    }

.filters-panel__search-wrap {
      position: relative;
    }

.filters-panel__search-shell {
      display: flex;
      align-items: center;
      min-height: 52px;
      border-radius: 16px;
      border: 1px solid rgba(1, 56, 44, 0.1);
      background: #fff;
      transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    }

.filters-panel__search-shell:focus-within {
      border-color: rgba(5, 150, 105, 0.34);
      background: #F8FFFC;
      box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.08);
    }

.filters-panel__search-icon {
      width: 16px;
      height: 16px;
      margin-left: 14px;
      color: rgba(1, 56, 44, 0.42);
      flex-shrink: 0;
    }

.filters-panel__search-input {
      flex: 1 1 auto;
      width: 100%;
      min-width: 0;
      min-height: 52px;
      padding: 0 14px 0 10px;
      border: 0;
      background: transparent;
      color: #01382C;
      font-size: 0.9375rem;
      font-weight: 500;
    }

.filters-panel__search-input::placeholder {
      color: rgba(1, 56, 44, 0.38);
    }

.filters-panel__search-input:focus {
      outline: none;
    }

.filters-panel__autocomplete {
      top: calc(100% + 10px);
      min-width: 0;
    }

.filters-panel__field-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

.filters-panel__field {
      display: grid;
      gap: 8px;
    }

.filters-panel__field-label {
      font-size: 0.75rem;
      font-weight: 700;
      color: rgba(1, 56, 44, 0.48);
      letter-spacing: 0.01em;
    }

.filters-panel__input-shell {
      display: flex;
      align-items: center;
      min-height: 52px;
      padding: 0 14px;
      border-radius: 16px;
      border: 1px solid rgba(1, 56, 44, 0.1);
      background: #fff;
      transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    }

.filters-panel__input-shell:focus-within {
      border-color: rgba(5, 150, 105, 0.34);
      background: #F8FFFC;
      box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.08);
    }

.filters-panel__input-prefix {
      color: rgba(1, 56, 44, 0.48);
      font-size: 0.9375rem;
      font-weight: 700;
      flex-shrink: 0;
    }

.filters-panel__number-input {
      flex: 1 1 auto;
      width: 100%;
      min-width: 0;
      min-height: 52px;
      padding: 0 0 0 10px;
      border: 0;
      background: transparent;
      color: #01382C;
      font-size: 0.9375rem;
      font-weight: 500;
      appearance: textfield;
      -moz-appearance: textfield;
    }

.filters-panel__number-input::-webkit-outer-spin-button,
    .filters-panel__number-input::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }

.filters-panel__number-input::placeholder {
      color: rgba(1, 56, 44, 0.38);
    }

.filters-panel__number-input:focus {
      outline: none;
    }

.filters-panel__section-note {
      margin-top: 10px;
      font-size: 0.75rem;
      line-height: 1.5;
      color: rgba(1, 56, 44, 0.42);
    }

.filters-panel .filter-options {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }

.filters-panel .filter-option {
      min-height: 50px;
      padding: 11px 12px;
      align-items: flex-start;
      flex-direction: column;
    }

.filters-panel .filter-option span:last-child {
      margin-top: 4px;
    }

.filters-panel [data-filter-section="job-type"] .filter-options {
      display: grid;
      grid-template-columns: none;
      grid-auto-flow: column;
      grid-template-rows: auto auto;
      gap: 8px;
      overflow-x: auto;
      overflow-y: hidden;
      scroll-snap-type: x proximity;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
      padding-bottom: 4px;
    }

.filters-panel [data-filter-section="job-type"] .filter-options::-webkit-scrollbar { display: none; }

.filters-panel [data-filter-section="job-type"] .filter-option,
    .filters-panel [data-filter-section="experience"] .filter-option {
      min-width: 110px;
      scroll-snap-align: start;
    }

.filters-panel [data-filter-section="experience"] .filter-options {
      display: grid;
      grid-template-columns: none;
      grid-auto-flow: column;
      grid-template-rows: auto auto;
      gap: 8px;
      overflow-x: auto;
      overflow-y: hidden;
      scroll-snap-type: x proximity;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
      padding-bottom: 4px;
    }

.filters-panel [data-filter-section="experience"] .filter-options::-webkit-scrollbar { display: none; }

.filters-panel .filter-option:disabled {
      cursor: not-allowed;
      border-color: rgba(1, 56, 44, 0.06);
      background: rgba(247, 249, 248, 0.92);
      color: rgba(1, 56, 44, 0.34);
      box-shadow: none;
    }

.filters-panel .filter-option:disabled span:last-child {
      background: rgba(1, 56, 44, 0.04);
      color: rgba(1, 56, 44, 0.28);
    }

.filters-panel__footer {
      display: flex;
      align-items: center;
      gap: 10px;
      justify-content: space-between;
      padding: 18px 22px calc(18px + env(safe-area-inset-bottom, 0px));
      border-top: 1px solid rgba(1, 56, 44, 0.08);
      background: rgba(255, 254, 251, 0.94);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      position: sticky;
      bottom: 0;
      z-index: 2;
    }

.filters-panel__footer .btn,
.filters-panel__footer .button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 46px;
      padding: 0 16px;
      flex: 1 1 0;
      border-radius: 12px;
      border: 1px solid transparent;
      font-size: 0.875rem;
      font-weight: 600;
      line-height: 1;
      white-space: nowrap;
      cursor: pointer;
      font-family: inherit;
      transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    }

.filters-panel__footer .btn-ghost,
.filters-panel__footer .button--ghost {
      background: rgba(255, 255, 255, 0.72);
      color: #01382C;
      border-color: rgba(1, 56, 44, 0.1);
    }

.filters-panel__footer .btn-ghost:hover,
.filters-panel__footer .button--ghost:hover {
      background: rgba(131, 230, 189, 0.16);
      border-color: rgba(5, 150, 105, 0.18);
    }

.filters-panel__footer .btn-primary,
.filters-panel__footer .button--primary {
      background: #01382C;
      color: #ecfdf5;
      border-color: #01382C;
    }

.filters-panel__footer .btn-primary:hover,
.filters-panel__footer .button--primary:hover {
      background: #005c47;
      border-color: #005c47;
    }

.filters-panel__clear {
      border: 1px solid rgba(1, 56, 44, 0.1);
    }

@keyframes panel-fade-in {
      from { opacity: 0; }
      to { opacity: 1; }
    }

@keyframes panel-slide-in {
      from { transform: translateX(24px); opacity: 0; }
      to { transform: translateX(0); opacity: 1; }
    }

@media (max-width: 767px) {
  .filters-panel__panel {
        width: 100vw;
      }
  .filters-panel__top,
      .filters-panel__overview,
      .filters-panel__sections,
      .filters-panel__footer {
        padding-left: 18px;
        padding-right: 18px;
      }
  .filters-panel .filter-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
  .filters-panel__field-grid {
        grid-template-columns: 1fr;
      }
}


/* ─── Base filter-option / sidebar structure (extracted from jobs page) ─────────────── */
.sidebar-section { margin-bottom: 32px; }

.sidebar-title {
      font-size: 0.6875rem; font-weight: 600; text-transform: uppercase;
      letter-spacing: 0.14em; color: rgba(1, 56, 44, 0.35);
      margin-bottom: 12px;
    }

.filter-sidebar .sidebar-section {
      margin-bottom: 22px;
      padding-bottom: 20px;
      border-bottom: 1px solid rgba(1, 56, 44, 0.06);
    }

.filter-sidebar .sidebar-section:last-child {
      margin-bottom: 0;
      padding-bottom: 0;
      border-bottom: none;
    }

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

.filter-summary {
      font-size: 0.75rem;
      color: rgba(1, 56, 44, 0.45);
      line-height: 1.5;
    }

.filter-options {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

.filter-option {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 12px;
      border: 1px solid rgba(1, 56, 44, 0.08);
      background: #fff;
      color: rgba(1, 56, 44, 0.7);
      font-size: 0.8125rem;
      font-weight: 500;
      text-align: left;
      transition: border-color 0.15s, color 0.15s, background 0.15s;
    }

.filter-option:hover {
      border-color: rgba(1, 56, 44, 0.2);
      color: #01382C;
    }

.filter-option.active {
      border-color: rgba(5, 150, 105, 0.28);
      background: #F0FDF8;
      color: #01382C;
    }

.filter-option span:last-child {
      flex-shrink: 0;
      font-size: 0.6875rem;
      color: rgba(1, 56, 44, 0.38);
      background: #F6F7F8;
      border-radius: 999px;
      padding: 2px 8px;
    }

.filter-sidebar .filter-option.active span:last-child {
      background: rgba(5, 150, 105, 0.12);
      color: #047857;
    }

/* ─── Value-bearing chip extensions (new) ────────────────────────────── */
.filter-chip[data-chip-anchor] { display: inline-flex; align-items: center; gap: 6px; }
.filter-chip[data-chip-anchor] .filter-chip__label { font-weight: 600; }
.filter-chip[data-chip-anchor] .filter-chip__value { font-weight: 700; color: #01382C; }
.filter-chip[data-chip-anchor].is-active {
  background: rgba(5, 150, 105, 0.10);
  border-color: rgba(5, 150, 105, 0.30);
  color: #01382C;
}
.filter-chip__clear {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; margin-left: 4px;
  border-radius: 999px;
  background: rgba(1, 56, 44, 0.10);
  color: #01382C; font-size: 0.8125rem; line-height: 1;
  border: 0; cursor: pointer;
  transition: background 0.15s;
}
.filter-chip__clear:hover { background: rgba(1, 56, 44, 0.20); }
.filter-chip__clear:focus-visible { outline: 2px solid #059669; outline-offset: 1px; }

body.filters-panel-open { overflow: hidden; }

@media (max-width: 640px) {
  .filters-panel__panel { width: 100vw; }
}

.filters-panel__footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 22px 18px;
  border-top: 1px solid rgba(1, 56, 44, 0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(247,252,249,0.6));
}
.filters-panel__footer .btn { flex: 1 1 auto; min-height: 44px; }
.filters-panel__footer .btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.filters-panel__options { display: flex; flex-wrap: wrap; gap: 8px; }
.filters-panel__options label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(1, 56, 44, 0.12);
  background: #fff;
  font-size: 0.8125rem; font-weight: 600;
  color: #01382C; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.filters-panel__options label:has(input:checked) {
  background: rgba(5, 150, 105, 0.10);
  border-color: rgba(5, 150, 105, 0.35);
}
.filters-panel__options input { accent-color: #059669; }

.filters-panel__range {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 10px;
}
.filters-panel__range .filters-panel__input-shell { min-height: 44px; }
.filters-panel__range-sep { color: rgba(1, 56, 44, 0.42); font-weight: 700; }

/* Keyboard focus ring on filter-option buttons */
.filter-option:focus-visible {
  outline: 2px solid #059669;
  outline-offset: 2px;
  border-color: rgba(5, 150, 105, 0.45);
}

/* Autocomplete dropdown (used by typeahead.js + page-level autocomplete wiring).
 * Shared so any page that loads more-filters-panel.css gets the same
 * suggestions UI. Page-specific stylesheets (jobs/styles.css,
 * jobseeker-dashboard/dashboard.css) may override these rules. */
.autocomplete-menu[hidden] { display: none; }
.autocomplete-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 280px;
  max-width: 360px;
  max-height: 320px;
  overflow-y: auto;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(1, 56, 44, 0.08);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 45px rgba(1, 34, 27, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid;
  gap: 8px;
  z-index: 200;
}
.autocomplete-menu--location { min-width: 260px; }
.autocomplete-menu__label {
  padding: 0 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(1, 56, 44, 0.38);
  text-align: left;
}
.autocomplete-menu__options { display: grid; gap: 6px; }
.autocomplete-menu__option {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: #01382C;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.autocomplete-menu__option:hover,
.autocomplete-menu__option:focus-visible,
.autocomplete-menu__option.is-active {
  background: #F4FBF7;
  border-color: rgba(5, 150, 105, 0.16);
  outline: none;
  transform: translateY(-1px);
}
.autocomplete-menu__copy { min-width: 0; display: grid; gap: 2px; }
.autocomplete-menu__primary {
  font-size: 0.875rem;
  font-weight: 600;
  color: #01382C;
  line-height: 1.3;
}
.autocomplete-menu__secondary {
  font-size: 0.75rem;
  color: rgba(1, 56, 44, 0.48);
  line-height: 1.45;
}
.autocomplete-menu__secondary:empty { display: none; }
.autocomplete-menu__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.1);
  color: #047857;
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
.autocomplete-menu__badge:empty { display: none; }
.autocomplete-menu__empty {
  padding: 12px;
  border-radius: 14px;
  background: #F8FBF9;
  color: rgba(1, 56, 44, 0.5);
  font-size: 0.8125rem;
  line-height: 1.55;
}

/* Inputs with autocomplete need a positioning context for the menu */
.filters-panel__search-wrap { position: relative; }
.search-field { position: relative; }
.search-location-wrap { position: relative; }
