/* Reversible active-auction filter drawer. Remove this file and its HTML link to restore the previous layout. */
body.auction-filter-drawer-enabled{overflow-x:hidden}
.auction-filter-drawer-enabled .market-filter-bar{position:sticky;top:0;z-index:45;display:grid!important;grid-template-columns:minmax(240px,1fr) auto!important;gap:10px;padding:11px max(16px,calc((100% - 1320px)/2))!important}
.auction-filter-drawer-enabled .market-filter-bar>.market-search{grid-column:1!important;min-width:0}
.auction-filter-drawer-enabled .market-filter-bar>#moreFilters{grid-column:2!important;display:flex!important;align-items:center;justify-content:center;min-width:132px;height:54px!important;padding:0 18px;border:1px solid #173d31;border-radius:5px;background:#173d31;color:#fff;font:800 13px Manrope;box-shadow:0 4px 12px #173d3130}
.auction-filter-drawer-enabled .market-filter-bar>.drawer-filter-control{display:none!important}
.auction-filter-drawer-enabled .market-layout{display:block!important;width:min(1120px,calc(100% - 28px));margin-top:18px}
.auction-filter-drawer-enabled .market-results{width:100%}
.auction-filter-drawer-enabled .market-sidebar{position:fixed!important;z-index:1200;top:0;bottom:0;left:0;width:min(410px,94vw);height:100vh;max-height:none;overflow-y:auto;overflow-x:hidden;margin:0;border:0;background:#fff;box-shadow:20px 0 45px #071c1745;transform:translateX(-105%);transition:transform .25s ease;visibility:hidden}
.auction-filter-drawer-enabled .market-sidebar.open{transform:translateX(0);visibility:visible}
.auction-filter-drawer-enabled .sidebar-heading{position:sticky;top:0;z-index:8;padding:17px 18px;background:#fff;border-bottom:1px solid #d9dfdc}
.auction-filter-drawer-enabled .sidebar-heading b{font:800 21px Manrope}
.drawer-close{width:36px;height:36px;margin-left:auto;border:0;background:transparent;color:#173d31;font-size:28px;line-height:1;cursor:pointer}
.filter-drawer-overlay{position:fixed;z-index:1190;inset:0;border:0;background:#071c1770;opacity:0;visibility:hidden;transition:opacity .2s}
.filter-drawer-overlay.open{opacity:1;visibility:visible}
.drawer-save-search{padding:16px 18px;border-bottom:1px solid #d9dfdc;background:#f6f9f6}
.drawer-save-search>button{width:100%;padding:13px;border:1px solid #173d31;background:#fff;color:#173d31;font:800 14px Manrope;cursor:pointer}
.drawer-save-form{display:grid;grid-template-columns:1fr auto;gap:7px;margin-top:9px}
.drawer-save-form[hidden]{display:none}
.drawer-save-form input{min-width:0;padding:11px;border:1px solid #aab6b0;font:13px DM Sans}
.drawer-save-form button{padding:0 15px;border:0;background:#c9ff36;font-weight:800;cursor:pointer}
.saved-search-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.saved-search-list:empty{display:none}
.saved-search-chip{display:flex;align-items:center;gap:5px;padding:7px 9px;border:1px solid #aab6b0;border-radius:18px;background:#fff;font-size:11px;font-weight:700;cursor:pointer}
.saved-search-chip i{font-style:normal;color:#b32d25;font-size:15px}
.drawer-quick-filters{padding:0 18px 15px;border-bottom:1px solid #d9dfdc}
.drawer-quick-filters h2{margin:17px 0 10px;font:800 14px Manrope}
.drawer-quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.drawer-quick-grid>*{width:100%;min-width:0;height:44px;padding:0 9px;border:1px solid #aeb9b3;border-radius:3px;background:#fff;font:700 12px DM Sans}
.drawer-quick-grid .distance-filter{height:auto}
.drawer-quick-grid .distance-trigger{width:100%;height:44px;border:1px solid #aeb9b3;background:#fff;text-align:left;padding:0 9px}
.drawer-quick-grid .distance-panel{position:fixed;z-index:1300;top:55px;left:min(420px,calc(94vw + 8px));width:min(330px,calc(100vw - 440px));min-width:280px}
.auction-filter-drawer-enabled .market-sidebar>section{padding:15px 18px}
.auction-filter-drawer-enabled .advanced-filter-title{padding-top:16px}
.auction-filter-drawer-enabled .advanced-flyout{left:min(420px,94vw);top:0;bottom:0;width:min(390px,calc(100vw - 420px));min-width:310px}
.drawer-extra-title{padding:18px 18px 8px;font:800 14px Manrope}
.drawer-extra-filters{border-top:1px solid #d9dfdc}
.drawer-extra-filters:empty{display:none}
.drawer-extra-filters details{border-bottom:1px solid #d9dfdc}
.drawer-extra-filters summary{display:flex;justify-content:space-between;padding:14px 18px;list-style:none;font-size:12px;font-weight:800;cursor:pointer}
.drawer-extra-filters summary::-webkit-details-marker{display:none}
.drawer-extra-options{display:grid;gap:7px;max-height:210px;overflow:auto;padding:0 18px 14px}
.drawer-extra-options label{display:flex;align-items:center;gap:8px;font-size:12px}
.drawer-extra-options input{width:16px;height:16px}
@media(max-width:760px){.auction-filter-drawer-enabled .market-filter-bar{top:0!important;grid-template-columns:minmax(0,1fr) 92px!important;padding:8px!important}.auction-filter-drawer-enabled .market-filter-bar>#moreFilters{min-width:0;height:48px!important;padding:0 8px;font-size:11px}.auction-filter-drawer-enabled .market-sidebar{width:min(380px,96vw)}.auction-filter-drawer-enabled .advanced-flyout{left:0;width:100%;min-width:0}.drawer-quick-grid .distance-panel{position:absolute;left:14px;right:14px;top:auto;width:auto;min-width:0}.drawer-quick-grid{grid-template-columns:1fr}.auction-filter-drawer-enabled .auction-status-tabs{margin-top:0}}

/* Keep the drawer controls below the shared application toolbar. */
body.auction-filter-drawer-enabled .market-sidebar {
  top: 60px;
  height: calc(100vh - 60px);
}
body.auction-filter-drawer-enabled .market-advanced-flyout {
  top: 60px;
  height: calc(100vh - 60px);
}
@media (max-width: 520px) {
  body.auction-filter-drawer-enabled .market-sidebar,
  body.auction-filter-drawer-enabled .market-advanced-flyout {
    top: 54px;
    height: calc(100vh - 54px);
  }
}


/* Right-side drawer variant: keeps auction cards visible while filtering. */
body.auction-filter-drawer-enabled .market-sidebar {
  left: auto;
  right: 0;
  box-shadow: -20px 0 45px #071c1740;
  transform: translateX(105%);
}
body.auction-filter-drawer-enabled .market-sidebar.open {
  transform: translateX(0);
}
body.auction-filter-drawer-enabled .filter-drawer-overlay {
  background: #071c1726;
}
body.auction-filter-drawer-enabled .drawer-quick-grid .distance-panel {
  left: auto;
  right: min(420px, calc(94vw + 8px));
}
body.auction-filter-drawer-enabled .advanced-flyout,
body.auction-filter-drawer-enabled .market-advanced-flyout {
  left: auto;
  right: min(410px, 94vw);
}
@media (max-width: 760px) {
  body.auction-filter-drawer-enabled .advanced-flyout,
  body.auction-filter-drawer-enabled .market-advanced-flyout {
    left: 0;
    right: 0;
  }
  body.auction-filter-drawer-enabled .drawer-quick-grid .distance-panel {
    left: 14px;
    right: 14px;
  }
}

/* Desktop quick search row: compact VIN search followed by the four common filters. */
@media (min-width: 761px) {
  body.auction-filter-drawer-enabled .market-filter-bar {
    grid-template-columns: minmax(280px, 360px) minmax(440px, 1fr) auto !important;
    align-items: center;
  }
  body.auction-filter-drawer-enabled .market-filter-bar > .market-search { grid-column: 1 !important; }
  body.auction-filter-drawer-enabled .auction-quick-search { grid-column: 2; }
  body.auction-filter-drawer-enabled .market-filter-bar > #moreFilters { grid-column: 3 !important; }
}
.auction-quick-search { display:grid;grid-template-columns:repeat(5,minmax(88px,1fr));gap:8px;min-width:0; }
.auction-quick-search select,.auction-quick-search button { min-width:0;height:54px;padding:0 11px;border:1px solid #c8d1cc;border-radius:5px;background:#fff;color:#15251f;font:700 12px Manrope,sans-serif;text-align:left; }
.auction-quick-search button { cursor:pointer; }
@media (max-width:760px) {
  body.auction-filter-drawer-enabled .market-filter-bar { grid-template-columns:minmax(0,1fr) 92px!important; }
  body.auction-filter-drawer-enabled .market-filter-bar>.market-search { grid-column:1; }
  body.auction-filter-drawer-enabled .market-filter-bar>#moreFilters { grid-column:2;grid-row:1; }
  .auction-quick-search { grid-column:1/-1;grid-row:2;display:flex;overflow-x:auto;padding-bottom:2px;scrollbar-width:none; }
  .auction-quick-search::-webkit-scrollbar { display:none; }
  .auction-quick-search select,.auction-quick-search button { flex:0 0 112px;height:44px; }
}

/* Location and distance enhancements. */
.quick-location-filter { appearance:auto; }
.distance-panel select,.distance-panel input { width:100%;margin-top:6px; }
.distance-choice { margin:8px 0 2px!important;color:#68736f!important;font:700 11px DM Sans;text-align:center;text-transform:uppercase;letter-spacing:.08em; }

.auction-filter-drawer-enabled .auction-quick-search select,
.auction-filter-drawer-enabled .auction-quick-search button { display:block!important; }


body.auction-filter-drawer-enabled .market-sidebar.open { display:block!important; }


body.auction-filter-drawer-enabled .drawer-quick-grid .distance-filter { display:block!important; }


/* Detailed filters remain inside the right drawer so every option is visible and clickable. */
body.auction-filter-drawer-enabled .advanced-filter > .advanced-flyout {
  position: static !important;
  inset: auto !important;
  display: flex;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  padding: 0 18px 16px !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}
body.auction-filter-drawer-enabled .advanced-filter:not([open]) > .advanced-flyout { display:none !important; }
body.auction-filter-drawer-enabled .advanced-flyout .flyout-heading { display:none; }
body.auction-filter-drawer-enabled .advanced-flyout .advanced-options { max-height:240px;padding:4px 0 10px;overflow-y:auto; }
body.auction-filter-drawer-enabled .advanced-flyout .advanced-options label { padding:3px 0;min-height:28px; }
body.auction-filter-drawer-enabled .advanced-option-group { display:block;padding:8px 0 4px;color:#0c4437;font:800 10px Manrope;text-transform:uppercase;letter-spacing:.06em; }
body.auction-filter-drawer-enabled .advanced-flyout .advanced-search,
body.auction-filter-drawer-enabled .advanced-flyout .range-filter { padding-left:0;padding-right:0; }
body.auction-filter-drawer-enabled .advanced-flyout .advanced-apply { position:static;margin-top:8px; }

/* Active filter categories stay open and expose a category-level Clear action. */
body.auction-filter-drawer-enabled .advanced-filter summary { gap:10px; }
body.auction-filter-drawer-enabled .advanced-filter summary > span:first-child { flex:1; }
body.auction-filter-drawer-enabled [data-category-clear] { border:0;background:transparent;color:#006e9a;font:700 11px DM Sans;text-decoration:underline;cursor:pointer; }
body.auction-filter-drawer-enabled .advanced-filter[data-filter-active] > summary { background:#eef4ef; }
