/* Downloadere live search + unified Woodmart header search row. */
@property --wdc-search-border-progress{
  syntax:"<angle>";
  initial-value:0deg;
  inherits:false;
}

.wdc-native-search-results{display:none!important}

/* Keep search results above carousels/grids. Do not isolate the host: isolation
   would trap the result panel inside a lower stacking context. */
.wdc-live-search-host{position:relative!important;overflow:visible!important}
.wdc-home-quality-hub{position:relative!important;z-index:1000!important;overflow:visible!important}
.wdc-home-search.wdc-live-search-host{z-index:1001!important}
.wdc-header-live-search-host{z-index:10010!important;overflow:visible!important}
.whb-header{overflow:visible!important}
.wdc-header-search-row,.wdc-header-search-row>.container,.wdc-header-search-row .whb-row-inner,.wdc-header-search-row .whb-column{overflow:visible!important}

.wdc-live-search-panel{
  position:absolute;
  z-index:2147483000!important;
  top:calc(100% + 8px);
  right:0;
  left:0;
  overflow:auto;
  max-height:min(68vh,680px);
  padding:16px;
  border:1px solid var(--brdcolor-gray-300);
  border-radius:max(var(--wd-brd-radius),16px);
  background:var(--bgcolor-white);
  box-shadow:0 18px 45px rgba(var(--bgcolor-black-rgb),.13);
  opacity:0;
  transform:translateY(-4px);
  transition:opacity .15s ease,transform .15s ease;
}
.wdc-live-search-panel[hidden]{display:none!important}
.wdc-live-search-panel.is-open{opacity:1;transform:none}
.wdc-live-search-grid{margin:0!important}
.wdc-live-search-empty{display:grid;place-items:center;min-height:88px;color:var(--color-gray-500);font-size:12px;text-align:center}

/* Animated loading border around the actual search field/form. */
.wdc-live-search-form{position:relative!important;overflow:visible!important}
.wdc-live-search-form.is-searching:before{
  position:absolute;
  z-index:20;
  inset:-2px;
  padding:2px;
  border-radius:inherit;
  background:conic-gradient(from -90deg,var(--wd-primary-color) 0deg var(--wdc-search-border-progress),transparent var(--wdc-search-border-progress) 360deg);
  content:"";
  pointer-events:none;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask-composite:exclude;
  animation:wdc-live-search-border-fill 1.05s ease-in-out infinite;
}
@keyframes wdc-live-search-border-fill{
  0%{--wdc-search-border-progress:0deg;opacity:.65}
  78%{--wdc-search-border-progress:360deg;opacity:1}
  100%{--wdc-search-border-progress:360deg;opacity:0}
}

/* The header search row visually belongs to the row above it. */
.whb-header{--wdc-header-unified-bg:var(--bgcolor-white)}
.wdc-header-main-row,.wdc-header-search-row,.wdc-header-main-row>.container,.wdc-header-search-row>.container,.wdc-header-main-row .whb-row-inner,.wdc-header-search-row .whb-row-inner{background-color:var(--wdc-header-unified-bg)!important}
.wdc-header-main-row{border-bottom:0!important;box-shadow:none!important}
.wdc-header-search-row{position:relative;z-index:10000!important;margin-top:0!important;border-top:1px solid color-mix(in srgb,var(--brdcolor-gray-300) 70%,transparent)!important;box-shadow:none!important;overflow:visible!important}
.wdc-header-search-row .wd-search-form{width:100%!important;overflow:visible!important}
.wdc-header-search-row form.searchform,.wdc-header-search-row form[role="search"]{border:1px solid color-mix(in srgb,var(--brdcolor-gray-300) 82%,transparent)!important;border-radius:max(var(--wd-brd-radius),11px)!important;background:transparent!important;box-shadow:none!important;overflow:visible!important}
.wdc-header-search-row form.searchform:focus-within,.wdc-header-search-row form[role="search"]:focus-within{border-color:color-mix(in srgb,var(--wd-primary-color) 55%,var(--brdcolor-gray-300))!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--wd-primary-color) 8%,transparent)!important}
.wdc-header-search-row form.searchform input.s,.wdc-header-search-row form[role="search"] input[type="search"]{background:transparent!important}
.wdc-header-search-row .wdc-live-search-panel{top:calc(100% + 6px)}

/* Home hero uses the same live card grid, without changing archive-card styling. */
.wdc-home-search.wdc-live-search-host{position:relative!important}
.wdc-home-search .wdc-live-search-panel{right:50%;left:auto;width:min(920px,calc(100vw - 32px));transform:translate(50%,-4px);text-align:start}
.wdc-home-search .wdc-live-search-panel.is-open{transform:translate(50%,0)}

@media(max-width:1024px){
  .wdc-live-search-panel{padding:14px}
  .wdc-live-search-grid.wdc-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:768px){
  .wdc-live-search-panel{top:calc(100% + 5px);max-height:70vh;padding:12px;border-radius:max(var(--wd-brd-radius),13px)}
  .wdc-live-search-grid.wdc-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 14px}
  .wdc-home-search .wdc-live-search-panel{width:calc(100vw - 28px)}
  .wdc-header-search-row{border-top-color:color-mix(in srgb,var(--brdcolor-gray-300) 58%,transparent)!important}
  .wdc-header-search-row form.searchform,.wdc-header-search-row form[role="search"]{border-radius:max(var(--wd-brd-radius),10px)!important}
}
@media(prefers-reduced-motion:reduce){
  .wdc-live-search-panel{transition:none}
  .wdc-live-search-form.is-searching:before{animation-duration:1.7s}
}
