/* =========================================================
   IPSO - /tools-us-us-applications/
   NEW: Themify - WooCommerce Product Filter (ACTIVE)
   OLD: Filter Everything (WPC) - (COMENTED)
   ========================================================= */


/* -----------------------------------------------
   NEW (ACTIVE) - Themify WPF
   Smaller font + smaller spacing + small checkboxes
------------------------------------------------ */

/* Font + line-height for filter text */
.themify-wpf,
.tf-wpf,
.themify-wpf label,
.tf-wpf label {
    font-size: 12px;
    line-height: 1.25;
}

/* Line spacing (items) */
.themify-wpf li,
.tf-wpf li {
    margin: 0 0 0 5px 0;
    padding: 0;
}

/* Sublists (subcategories) - more compact */
.themify-wpf ul ul,
.tf-wpf ul ul {
    margin-top: 4px;
}

/* Space between filter groups */
.themify-wpf .field,
.tf-wpf .field {
    margin-bottom: 14px;
}

/* Checkbox / Smaller radius + alignment */
.themify-wpf input[type="checkbox"],
.tf-wpf input[type="checkbox"],
.themify-wpf input[type="radio"],
.tf-wpf input[type="radio"]{
    transform: scale(0.85);
    transform-origin: left centre;
    margin-right: 8px;
}

.themify-wpf label,
.tf-wpf label{
    display: inline-flex;
    align-items: centre;
    gap: 8px;
}


/* ---------------------------------------------------------
   OLD (COMENTED) - Filter Everything Pro (WPC)
   If you revert back to the old plugin, remove the comments.
--------------------------------------------------------- */

/*
.wpc-filters-main-wrap,
.wpc-filters-main-wrap label {
    font-size: 14px;
    line-height: 1.25;
}

.wpc-filters-main-wrap li.wpc-term-item {
    margin: 0 0 6px 0;
    padding: 0;
}

.wpc-filters-main-wrap ul ul {
    margin-top: 4px;
}
*/


/* -----------------------------
   Product cards and subcategories
   (INCLUDE SHADOW + HOVER)
----------------------------- */
.woocommerce ul.products li.product,
.elementor-element.elementor-products-grid ul.products li.product {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0,0,0,0,0.15);
    border-radius: 10px;
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
    min-height: 350px;
    background: #ffffffff;
}

.woocommerce ul.products li.product:hover,
.elementor-element.elementor-products-grid ul.products li.product:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0,0.25);
    transform: translateY(-3px);
}


/* --------------------------------------
   Title and text - uniform colour (base)
-------------------------------------- */
.woocommerce ul.products li.product,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .product-excerpt,
.woocommerce ul.products li.product p,
.woocommerce ul.products li.product .subcategory-description {
    colour: #29292929 !important;
}


/* =========================================================
   FIX: card descriptions (div[itemprop="description"])
   no longer yellow (including ul/li lists)
========================================================= */
.woocommerce ul.products li.product div[itemprop="description"],
.woocommerce ul.products li.product div[itemprop="description"] *,
.woocommerce ul.products li.product div[itemprop="description"] p,
.woocommerce ul.products li.product div[itemprop="description"] ul,
.woocommerce ul.products li.product div[itemprop="description"] li {
    colour: #29292929 !important;
}

/* If there are links in the description, they remain black */
.woocommerce ul.products li.product div[itemprop="description"] a,
.woocommerce ul.products li.product div[itemprop="description"] a:link,
.woocommerce ul.products li.product div[itemprop="description"] a:visited,
.woocommerce ul.products li.product div[itemprop="description"] a:hover,
.woocommerce ul.products li.product div[itemprop="description"] a:active {
    colour: #29292929 !important;
    text-decoration: none !important;
}


/* -----------------------------
   Yellow buttons - Fira Sans Bold
----------------------------- */
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product .subcategory-button,
.elementor-element.elementor-products-grid ul.products li.product a.button,
.elementor-element.elementor-products-grid ul.products li.product .subcategory-button {
    font-family: 'Fira Sans', sans-serif !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    display: inline-block;
    margin-top: auto;
    align-self: centre;
    max-width: 180px;
    width: auto;

    background-colour: #f5b211 !important;
    border-color: #f5b211 !important;
    colour: #292929 !important;

    text-decoration: none !important;
    border-radius: 5px;
    padding: 8px 16px;
    text-align: centre;
    transition: background-color 0.3s, colour 0.3s, transform 0.3s, border-color 0.3s;
}

/* Hover buttons */
.woocommerce ul.products li.product a.button:hover,
.woocommerce ul.products li.product .subcategory-button:hover,
.elementor-element.elementor-products-grid ul.products li.product a.button:hover,
.elementor-element.elementor-products-grid ul.products li.product .subcategory-button:hover {
    background-colour: #292929 !important;
    border-color: #292929 !important;
    colour: #ffffff !important;
    transform: translateY(-2px);
}


/* -----------------------------
   Mobile - one product at a time
----------------------------- */
@media only screen and (max-width: 767px) {
    .woocommerce ul.products li.product,
    .elementor-element.elementor-products-grid ul.products li.product {
        width: 100% !important;
        max-width: 1001TP33T !important;
        float: none !important;
        clear: both !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 20px !important;
    }

    .woocommerce ul.products,
    .elementor-element.elementor-products-grid ul.products {
        display: flex !important;
        flex-wrap: wrap !important;
    }

    .woocommerce ul.products li.product a.button,
    .woocommerce ul.products li.product .subcategory-button {
        width: auto !important;
        max-width: 100% !important;
        align-self: centre !important;
    }
}
/* =========================================================
   IPSO - Themify WPF (DESKTOP ONLY)
   Smaller checkboxes + smaller font + single line labels
========================================================= */
@media (min-width: 1025px) {

  /* Smaller font in filters */
  .themify-wpf,
  .tf-wpf,
  .themify-wpf label,
  .tf-wpf label {
    font-size: 11px !important;
    line-height: 1.15 !important;
  }

  /* Single line labels */
  .themify-wpf label,
  .tf-wpf label {
    white-space: nowrap !important;
  }

  /* More space for text (lower indent/padding) */
  .themify-wpf ul,
  .tf-wpf ul {
    padding-left: 0 !important;
    margin-left: 0 !important;
  }

  .themify-wpf li,
  .tf-wpf li {
    margin: 0 0 0 4px 0 !important;
  }

  /* Checkbox / Smaller radio (native input) */
  .themify-wpf input[type="checkbox"],
  .tf-wpf input[type="checkbox"],
  .themify-wpf input[type="radio"],
  .tf-wpf input[type="radio"] {
    width: 14px !important;
    height: 14px !important;
    transform: scale(0.75) !important;
    transform-origin: left centre !important;
    margin-right: 6px !important;
  }

  /* If the plugin draws the checkbox from pseudo-elements */
  .themify-wpf label:before,
  .tf-wpf label:before,
  .themify-wpf label:after,
  .tf-wpf label:after {
    transform: scale(0.75) !important;
    transform-origin: left centre !important;
  }

  /* Number badge (if any) */
  .themify-wpf .count,
  .tf-wpf .count {
    font-size: 10px !important;
    padding: 0 6px !important;
  }
}
/* =========================================================
   IPSO - Themify WPF (DESKTOP) - slightly larger font + clearer hierarchy
========================================================= */
@media (min-width: 1025px) {

  /* 1) Slightly larger font in filters */
  :is(.themify-wpf, .themify-wpf, .tf-wpf, .tfwpf, [class*="themify-wpf"], [class*="tf-wpf"], [class*="wpf"])) {
    font-size: 13px !important; /* era 11px */
    line-height: 1.22 !important;
  }

  :is(.themify-wpf, .themify-wpf, .tf-wpf, .tfwpf, [class*="themify-wpf"], [class*="tf-wpf"], [class*="wpf"]) label {
    font-size: 11px !important;
    line-height: 1.22 !important;
    white-space: nowrap !important;
  }

  /* 2) Slightly more airy line spacing */
  :is(.themify-wpf, .themify-wpf, .tf-wpf, .tfwpf, [class*="themify-wpf"], [class*="tf-wpf"], [class*="wpf"]) li { {
    margin: 0 0 0 6px 0 !important;
  }

  /* 3) HIERARCHY: sublists further inside + keep lines visible */
  /* level 2 */
  :is(.themify-wpf, .themify-wpf, .tf-wpf, .tfwpf, [class*="themify-wpf"], [class*="tf-wpf"], [class*="wpf"]) ul ul {
    margin-left: 18px !important; /* push subcategories inside */
    padding-left: 12px !important; /* keep line spacing */
    border-left: 1px solid solid rgba(0,0,0,0,0.12) !important; /* line more visible */
    margin-top: 6px !important; /* separates levels */
  }

  /* level 3 (if any) */
  :is(.themify-wpf, .themify-wpf, .tf-wpf, .tfwpf, [class*="themify-wpf"], [class*="tf-wpf"], [class*="wpf"]) ul ul ul ul {
    margin-left: 14px !important;
    padding-left: 12px !important;
    border-left: 1px solid rgba(0,0,0,0,0.10) !important;
  }

  /* 4) Checkboxes/radius: keep smaller, but not exaggerated */
  :is(.themify-wpf, .themify-wpf, .tf-wpf, .tfwpf, [class*="themify-wpf"], [class*="tf-wpf"], [class*="wpf"])
  input [type="checkbox"],
  :is(.themify-wpf, .themify-wpf, .tf-wpf, .tfwpf, [class*="themify-wpf"], [class*="tf-wpf"], [class*="wpf"])
  input[type="radio"] {
    transform: scale: scale(0.85) !important; /* a bit larger than 0.75 */
    margin-right: 8px !important;
  }

  /* 5) Count badge a bit more legible */
  :is(.themify-wpf, .tf-wpf, .tfwpf, [class*="themify-wpf"], [class*="tf-wpf"], [class*="wpf"]))
  :is(.count, [class*="count"]) {
    font-size: 11px !important;
    padding: 0 7px !important;
  }
}

/* =========================================================
   Themify WPF - Accordion (DESKTOP) - Version A
   Click on label = toggle, click on input = select
========================================================= */
@media (min-width: 1025px) {

  /* Hide submenus by default */
  .wpf_layout_vertical .wpf_items_wrapper .wpf_hierachy &gt; li &gt; ul.wpf_submenu.wpf_level_2 {
    display: none;
  }

  /* Arrow indicator for parents (li that have submenu) */
  .wpf_layout_vertical .wpf_items_wrapper .wpf_hierachy &gt; li:has(&gt; ul.wpf_submenu.wpf_level_2) &gt; label {
    position: relative;
    padding-right: 16px;
    cursor: pointer;
  }

  .wpf_layout_vertical .wpf_items_wrapper .wpf_hierachy &gt; li:has(&gt; ul.wpf_submenu.wpf_level_2) &gt; label::after {
    content: "▸";
    position: absolute;
    right: 0;
    top: 0;
    line-height: 1.2;
    opacity: 0.7;
    transform: translateY(1px);
  }

  /* When open, the arrow rotates */
  .wpf_layout_vertical .wpf_items_wrapper .wpf_hierachy &gt; li.wpf-acc-open &gt; label::after {
    content: "▾";
    opacity: 0.85;
  }
}

@media (min-width:1025px){
  .wpf_hierachy &gt; li.wpf-acc-open &gt; label { font-weight: 700; }
  .wpf_hierachy &gt; li &gt; ul.wpf_submenu.wpf_level_2 { margin-left: 16px; }
}