/* ======================================================================
 * PrestaHeroes / Wilderness121 — Amazzing Filter woodland styling v1.0
 * 2026-09-14
 * REPLACE the contents of Amazzing Filter's custom CSS field with this file.
 * This is module CSS, NOT themes/.../assets/css/custom.css.
 * Based on the live module markup and front.css on /6-fire.
 * Preserves native folding, filtering, counters, hidden states and drawer
 * transforms. No JavaScript or template changes required.
 * Changes: dark cards, selected-filter panel, readable options, green controls,
 * compact mobile height, natural-flow footer, remove old 80px form spacer.
 * ====================================================================== */

#amazzing_filter {
  --waf-bg: #171f18;
  --waf-line: #344437;
  --waf-text: #f3f6f2;
  --waf-muted: #b9c7ba;
  --waf-green: #2f7040;
  color: var(--waf-text) !important;
  font-size: 14px;
  line-height: 1.45;
  color-scheme: dark;
}
#amazzing_filter .title_block {
  color: var(--waf-text) !important;
  font-size: 21px !important;
  font-weight: 800 !important;
  line-height: 1.25;
  margin: 0 0 12px !important;
}
#amazzing_filter .af-form { padding-top: 0; }
#amazzing_filter .af_filter {
  background: var(--waf-bg) !important;
  border: 1px solid var(--waf-line) !important;
  border-radius: 11px;
  margin: 0 0 10px !important;
  padding: 0 12px 8px !important;
  min-height: 0;
}
#amazzing_filter .af_filter.closed { padding-bottom: 0 !important; }
#amazzing_filter .af_subtitle {
  color: var(--waf-text) !important;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  padding: 13px 24px 12px 0;
  margin: 0;
}
#amazzing_filter .af_subtitle:after { color: #9fbea4; }
#amazzing_filter .af_filter_content { color: var(--waf-text); }
#amazzing_filter .af_filter_content > ul { padding: 0; margin: 0; }
#amazzing_filter .af_filter li { padding-top: 1px; padding-bottom: 1px; }
#amazzing_filter .af-checkbox-label,
#amazzing_filter .af-radio-label {
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 7px 8px !important;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--waf-text) !important;
  font-size: 14px;
  line-height: 1.35;
}
#amazzing_filter .af_filter .name {
  color: inherit !important;
  padding-left: 0;
  overflow-wrap: anywhere;
}
#amazzing_filter .af-checkbox-label:has(input:checked),
#amazzing_filter .af-radio-label:has(input:checked) {
  background: #24472e;
  border-color: #51835b;
  color: #fff !important;
}
#amazzing_filter .af-checkbox-label input,
#amazzing_filter .af-radio-label input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0 !important;
  accent-color: #4b965d;
}
#amazzing_filter .count,
#amazzing_filter .af_count { color: var(--waf-muted) !important; }
#amazzing_filter .af_filter select,
#amazzing_filter input[type="text"],
#amazzing_filter input[type="number"] {
  background: #101711 !important;
  color: var(--waf-text) !important;
  border: 1px solid #607663 !important;
  border-radius: 6px;
  min-height: 36px;
}
#amazzing_filter a:focus-visible,
#amazzing_filter button:focus-visible,
#amazzing_filter input:focus-visible,
#amazzing_filter select:focus-visible {
  outline: 2px solid #b1dfba !important;
  outline-offset: 2px;
}
/* Selected filters: native removal links remain in place. */
#amazzing_filter .selectedFilters {
  background: #182e20 !important;
  border: 1px solid #426b4c;
  border-radius: 10px;
  padding: 8px;
  margin: 0 0 12px;
}
#amazzing_filter .selectedFilters .clearAll {
  background: transparent !important;
  padding: 0 0 6px !important;
}
#amazzing_filter .selectedFilters .clearAll a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  color: #d8ebdc !important;
  padding: 4px 6px;
  border-radius: 5px;
}
#amazzing_filter .selectedFilters .clearAll .txt {
  font-size: 12px;
  line-height: 1.3;
  margin: 0;
  font-weight: 700;
}
#amazzing_filter .selectedFilters .cf {
  background: #24472e !important;
  color: #fff !important;
  border: 1px solid #51835b;
  border-radius: 7px;
  margin: 4px 0 0;
  padding: 9px 40px 9px 10px;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
#amazzing_filter .selectedFilters .cf a {
  display: flex;
  align-items: center;
  justify-content: center;
  top: 50%;
  right: 3px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  color: #fff !important;
  border-radius: 5px;
}
#amazzing_filter .viewFilteredProducts {
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin: 0 !important;
  padding: 12px !important;
  border: 1px solid #63996c !important;
  border-radius: 8px !important;
  background: var(--waf-green) !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.3;
  text-align: center;
  text-transform: none !important;
}
#amazzing_filter .viewFilteredProducts .af-total-count {
  color: #fff !important;
  opacity: .9;
  margin-left: 4px;
}
@media (hover: hover) {
  #amazzing_filter .af-checkbox-label:hover,
  #amazzing_filter .af-radio-label:hover { background: #26382a; }
  #amazzing_filter .selectedFilters a:hover { background: #365d40; }
  #amazzing_filter .viewFilteredProducts:hover { background: #245b33 !important; }
}
/* Keep the proven drawer offsets and open/close transforms owned by AF. */
@media (max-width: 767.98px) {
  #amazzing_filter {
    top: 12px !important;
    bottom: auto !important;
    width: min(340px, calc(100vw - 24px)) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    background: #101711 !important;
    border-radius: 12px !important;
    box-shadow: 0 16px 40px rgba(0,0,0,.35) !important;
  }
  #amazzing_filter .block_content {
    flex: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 12px !important;
    margin-bottom: 0 !important;
    color: var(--waf-text) !important;
    scrollbar-width: thin;
  }
  #amazzing_filter .af-form { padding-bottom: 0 !important; }
  #amazzing_filter .af-checkbox-label,
  #amazzing_filter .af-radio-label { min-height: 44px; }
  #amazzing_filter .btn-holder {
    position: static !important;
    inset: auto !important;
    flex: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 10px 0 0 !important;
    background: transparent !important;
    border-top: 1px solid var(--waf-line) !important;
  }
  #amazzing_filter .compact-toggle {
    background: #2f7040 !important;
    color: #fff !important;
  }
  .has-compact-filter.show-filter .af-compact-overlay {
    background: rgba(8,14,10,.72) !important;
    opacity: 1 !important;
  }
}
