/* LABRepCo: LIVE-style loading overlay for AJAX facets, sorting and pagination. */
.lrc-ep-overlay {
  position: absolute;
  z-index: 9999;
  background-color: rgba(255, 255, 255, 0.8);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: auto;
}

.lrc-ep-overlay.is-visible {
  opacity: 1;
}

.lrc-ep-overlay.is-hiding {
  opacity: 0;
  transition-duration: 0.2s;
}

/* Sticky, so the spinner stays in view on long product lists. */
.lrc-ep-overlay__spinner {
  position: sticky;
  top: calc(50vh - 50px);
  width: 100px;
  height: 100px;
  max-height: 100%;
  margin: 0 auto;
  background: url("lrc-ep-loading.gif") center / contain no-repeat;
}

/* The facet sidebar is not covered: fade it and block clicks while loading. */
#left-sidebar .lrc-ep-loading {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/*
 * Facet widgets styled like LIVE's WPSolr facets (theme style.css: .wpsolr_facet_title,
 * .wpsolr_facet_checkbox .select_opt, div.select_opt). On LIVE all facets are one
 * widget; here each facet is its own widget, so widget padding/margins are removed
 * and the spacing comes from the titles, as on LIVE.
 */
.sidebar .widget.widget_ep-facet {
  margin: 0;
  padding: 0 20px 0 0;
}

.sidebar .widget.widget_ep-facet:first-child {
  padding-top: 20px;
}

.sidebar .widget.widget_ep-facet:last-child {
  padding-bottom: 20px;
}

.sidebar .widget.widget_ep-facet .widget-title {
  display: inline-block;
  width: 100%;
  margin: 48px 0 24px;
  padding-top: 28px;
  border-top: 1px solid #d8d8d8;
  color: #333333 !important;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.sidebar .widget.widget_ep-facet:first-child .widget-title {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.widget_ep-facet .terms .term a {
  display: block;
  min-height: 2.75rem;
  padding-left: 3rem;
  background: url("data:image/svg+xml,%3Csvg width='23' height='23' viewBox='0 0 23 23' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0.5' y='0.5' width='22' height='22' fill='white' stroke='%23D5D5D5'/%3E%3C/svg%3E%0A") top 3px left 0 / 23px 23px no-repeat;
  color: #767676;
  font-size: 16px;
  font-weight: 300;
  text-decoration: none;
  cursor: pointer;
}

.widget_ep-facet .terms .term a:hover,
.widget_ep-facet .terms .term a:focus {
  color: #333333;
}

.widget_ep-facet .terms .term.selected a {
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0.5' y='0.5' width='22' height='22' fill='white' stroke='%23333333'/%3E%3Cpath d='M16.3271 7.3102C16.5384 7.10904 16.8196 6.99782 17.1113 7.00003C17.403 7.00224 17.6825 7.1177 17.8907 7.32204C18.099 7.52638 18.2197 7.80362 18.2274 8.09527C18.2351 8.38691 18.1292 8.67015 17.9321 8.8852L11.9471 16.3702C11.8441 16.4811 11.7199 16.57 11.5819 16.6318C11.4438 16.6935 11.2947 16.7268 11.1434 16.7296C10.9922 16.7324 10.842 16.7046 10.7017 16.6481C10.5614 16.5915 10.434 16.5072 10.3271 16.4002L6.35806 12.4312C6.24753 12.3282 6.15888 12.204 6.09739 12.066C6.0359 11.928 6.00284 11.779 6.00018 11.628C5.99751 11.4769 6.0253 11.3269 6.08188 11.1868C6.13846 11.0467 6.22268 10.9195 6.32951 10.8126C6.43633 10.7058 6.56358 10.6216 6.70367 10.565C6.84375 10.5084 6.99379 10.4807 7.14485 10.4833C7.2959 10.486 7.44487 10.519 7.58287 10.5805C7.72087 10.642 7.84507 10.7307 7.94806 10.8412L11.0891 13.9807L16.2986 7.3432L16.3271 7.3102Z' fill='%23333333' /%3E%3C/svg%3E%0A");
  color: #333333;
}

/* The checkbox is drawn by the link background above, as on LIVE. */
.widget_ep-facet .terms .ep-checkbox {
  display: none;
}

/* "1 - 6 cu. ft. (35)": LIVE has a space before the count. */
.widget_ep-facet .terms .term a > span {
  margin-left: 0.25em;
}

/* Facet search box (facets with more than 15 terms). */
.widget_ep-facet .terms .facet-search {
  width: 100%;
  margin-bottom: 1rem;
  font-size: 16px;
}

/* Mobile filter panel: same room for the toggle/close buttons as LIVE's .wdm_ul. */
@media (max-width: 768px) {
  .woocommerce-page.tax-product_cat .is-left-sidebar .inside-left-sidebar {
    padding: 6rem 0;
  }

  .sidebar .widget.widget_ep-facet {
    padding-left: 20px;
  }
}
