/* Taxonomy Responsive Slider Styles - Slick Style Navigation */

/* Hide only navigation on desktop (992px and above), keep categories visible */
@media (min-width: 992px) {
  .taxonomy-slider-controls-container { display: none;}
}

/* Show slider functionality on mobile (below 992px) */
@media (max-width: 991px) {
    .taxonomy-responsive-slider .category-small-box, 
    .taxonomy-responsive-slider .category-small-box-alt {
        margin: 0;
    }
    
    /* Wrapper to contain everything */
    .taxonomy-slider-wrapper {
        position: relative;
        overflow: hidden;
        padding: 0;
    }

    /* Transform the categories container into a slider */
    .taxonomy-responsive-slider {
        display: flex !important;
        flex-wrap: nowrap !important;
        transition: transform 0.3s ease;
        gap: 20px;
        padding: 10px 0 0 0;
        position: relative;
        width: max-content !important;
        left: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Preserve existing item styles but make them not shrink and use responsive width for slider */
    .taxonomy-responsive-slider .category-small-box,
    .taxonomy-responsive-slider .category-small-box-alt {
        flex-shrink: 0;
        width: calc(100vw / 3 - 20px) !important; /* Default: 3 items per screen */
    }

    /* Smaller screens: 2 items per screen */
    @media (max-width: 480px) {
        .taxonomy-responsive-slider .category-small-box,
        .taxonomy-responsive-slider .category-small-box-alt {
            width: calc(100vw / 2 - 20px) !important; /* 2 items per screen */
        }
    }

    /* Slider Controls Container - Slick Style */
    .taxonomy-slider-controls-container {
        position: relative;
        left: 0;
        right: 0;
        margin: 0 auto;
        display: block;
        text-align: center;
        bottom: 0;
        z-index: 10;
    }
    
    .taxonomy-slider-controls {
        position: relative;
        display: inline-flex;
        background: rgba(0, 0, 0, 0.03);
        padding: 7px 3px;
        border-radius: 50px;
        margin: 0 auto;
        justify-content: center;
        align-items: center;
        gap: 0;
    }

    .taxonomy-slide-dots { display: none !important;}
    
    /* Arrow buttons - Slick Style */
    .taxonomy-slider-controls button.taxonomy-slide-next,
    .taxonomy-slider-controls button.taxonomy-slide-prev {
        display: inline-block;
        border: none;
        box-shadow: none;
        background: transparent;
        height: 14px;
        width: 30px;
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8.268' height='14' viewBox='0 0 8.268 14'><path d='M109.521,6.454,103.259.224a.774.774,0,0,0-1.089,0l-.461.459a.764.764,0,0,0,0,1.083L106.968,7,101.7,12.235a.765.765,0,0,0,0,1.083l.461.459a.774.774,0,0,0,1.089,0l6.268-6.236a.77.77,0,0,0,0-1.087Z' transform='translate(-101.478)' fill='%23999'/></svg>");
        background-repeat: no-repeat;
        background-size: auto 100%;
        background-position: 50%;
        cursor: pointer;
        opacity: 1;
        transition: opacity 0.3s;
    }
    
        .taxonomy-slider-controls button.taxonomy-slide-prev {
        transform: rotate(180deg);
        background-position: 50% 56%;
    }
    
    .taxonomy-slider-controls button.taxonomy-slide-next:hover,
    .taxonomy-slider-controls button.taxonomy-slide-prev:hover {
        opacity: 0.7;
    }
    
    .taxonomy-slider-controls button.taxonomy-slide-next.slick-disabled,
    .taxonomy-slider-controls button.taxonomy-slide-prev.slick-disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }
    
    /* Dots Container */
    .slide-m-dots {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 5px;
    }
    
    /* Slick Dots - Match Theme Style */
    /* Dots container - Slick Style */
    .taxonomy-dots {
        display: inline-flex;
        margin: 0 7px;
        padding: 0;
        list-style: none;
        gap: 6px;
        align-items: center;
    }
    
    .taxonomy-dots li {
        margin: 0;
        list-style: none;
    }
    
    .taxonomy-dots li button {
        display: block;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.25);
        border: none;
        cursor: pointer;
        padding: 0;
        font-size: 0;
        line-height: 0;
        text-indent: -9999px;
        transition: background-color 0.15s ease;
    }
    
    .taxonomy-dots li.active button,
    .taxonomy-dots li button:hover {
        background: rgba(0, 0, 0, 0.75);
    }    /* Hide navigation when disabled */
    .taxonomy-slider-controls button.taxonomy-slide-prev.hidden,
    .taxonomy-slider-controls button.taxonomy-slide-next.hidden {
        opacity: 0;
        pointer-events: none;
    }
}

/* Dark mode support */
#dark-mode .taxonomy-slider-controls {
    background: rgba(255, 255, 255, 0.1);
}

#dark-mode .taxonomy-slider-controls button.taxonomy-slide-next,
#dark-mode .taxonomy-slider-controls button.taxonomy-slide-prev {
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8.268' height='14' viewBox='0 0 8.268 14'><path d='M109.521,6.454,103.259.224a.774.774,0,0,0-1.089,0l-.461.459a.764.764,0,0,0,0,1.083L106.968,7,101.7,12.235a.765.765,0,0,0,0,1.083l.461.459a.774.774,0,0,0,1.089,0l6.268-6.236a.77.77,0,0,0,0-1.087Z' transform='translate(-101.478)' fill='%23999'/></svg>");
}

#dark-mode .taxonomy-slider-controls .taxonomy-dots li {
    box-shadow: inset 0 0 0 2px #666;
}

#dark-mode .taxonomy-slider-controls .taxonomy-dots li.active {
    box-shadow: inset 0 0 0 6px #666;
}

#dark-mode .taxonomy-slider-controls .taxonomy-dots li:after {
    background-color: #666;
}

#dark-mode .taxonomy-slider-controls .taxonomy-dots li:hover {
    box-shadow: inset 0 0 0 4px #666;
}

/* Logo cards keep their original image colors and stay white on hover. */
.taxonomy-logo-style .category-small-box-alt,
.taxonomy-logo-style .category-small-box-alt:hover {
    background: #fff;
}
.taxonomy-logo-style .category-small-box-alt:before {
    display: none;
}
.taxonomy-logo-style .category-small-box-alt:hover h4 {
    color: #333;
}
.taxonomy-logo-style .category-small-box-alt:hover .category-box-counter-alt {
    color: #999;
    background: #f8f8f8;
}
.taxonomy-logo-style .listeo-logo-icon {
    display: block;
    position: relative;
    z-index: 11;
    height: 38px;
    margin: 0 0 5px;
    line-height: 0;
}
body .taxonomy-logo-style .category-small-box-alt .listeo-logo-icon img {
    position: static;
    display: inline-block;
    width: 38px;
    height: 38px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 0;
    opacity: 1;
    filter: none;
    transform: none;
}


@media (min-width: 992px) {
    .taxonomy-logo-style .categories-boxes-container-alt {
        display: grid;
        grid-template-columns: repeat(var(--listeo-logo-columns, 5), minmax(0, 1fr));
        gap: 12px;
        left: 0;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .taxonomy-logo-style .categories-boxes-container-alt .category-small-box-alt {
        width: auto;
        min-width: 0;
        margin: 0;
        padding-left: 8px;
        padding-right: 8px;
    }
}


.taxonomy-logo-style .category-small-box-alt,
.taxonomy-logo-style .category-small-box-alt:hover {
    padding: 20px 8px;
    min-height: 0;
    transform: translateY(0);
    transition: transform 180ms ease;
}
.taxonomy-logo-style .category-small-box-alt:hover,
.taxonomy-logo-style .category-small-box-alt:focus-visible {
    transform: translateY(-4px);
}
.taxonomy-logo-style .category-small-box-alt h4 {
    font-size: 15px;
    line-height: 20px;
    margin: 4px 0;
}
body .taxonomy-logo-style .category-small-box-alt .category-box-counter-alt {
    margin: 0 auto;
    width: 34px;
    height: 22px;
    min-height: 0;
    line-height: 22px;
    font-size: 12px;
    padding: 0;
}


/* Style 4: Compact. One-row tiles: icon chip, term name and counter.
   Everything is scoped to .taxonomy-compact-style, so the other styles are untouched. */
.taxonomy-compact-style .categories-boxes-container-alt {
    display: grid;
    grid-template-columns: repeat(var(--listeo-compact-columns, 4), minmax(0, 1fr));
    align-items: stretch;
    gap: 16px;
    left: 0;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}
.taxonomy-compact-style .categories-boxes-container-alt .category-small-box-alt,
.taxonomy-compact-style .categories-boxes-container-alt .category-small-box-alt:hover {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    width: auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    margin: 0;
    padding: 14px 18px 14px 14px;
    text-align: left;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    transform: translateY(0);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.taxonomy-compact-style .categories-boxes-container-alt .category-small-box-alt:hover,
.taxonomy-compact-style .categories-boxes-container-alt .category-small-box-alt:focus-visible {
    border-color: var(--listeo-primary-color, #f91942);
    box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}
.taxonomy-compact-style .category-small-box-alt:before {
    display: none;
}
.taxonomy-compact-style .category-small-box-alt > i,
.taxonomy-compact-style .category-small-box-alt .listeo-svg-icon-box-grid {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0;
    font-size: 22px;
    border-radius: 12px;
    background: rgba(var(--listeo-primary-color-rgb, 249, 25, 66), 0.08);
    transition: background-color 180ms ease;
}
.elementor .taxonomy-compact-style .listeo-svg-icon-box-grid svg,
.taxonomy-compact-style .listeo-svg-icon-box-grid svg {
    width: 24px;
    height: 24px;
}
.taxonomy-compact-style .category-small-box-alt .listeo-icon-img-grid {
    flex: 0 0 auto;
    position: static;
    width: 48px;
    height: 48px;
    padding: 12px;
    opacity: 1;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(var(--listeo-primary-color-rgb, 249, 25, 66), 0.08);
}
.taxonomy-compact-style .category-small-box-alt:hover > i,
.taxonomy-compact-style .category-small-box-alt:hover .listeo-svg-icon-box-grid {
    background: var(--listeo-primary-color, #f91942);
}
.taxonomy-compact-style .category-small-box-alt h4,
.taxonomy-compact-style .category-small-box-alt:hover h4 {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
    color: #333;
}
body .taxonomy-compact-style .category-small-box-alt .category-box-counter-alt,
body .taxonomy-compact-style .category-small-box-alt:hover .category-box-counter-alt {
    flex: 0 0 auto;
    width: auto;
    min-width: 28px;
    height: 24px;
    margin: 0;
    padding: 0 8px;
    line-height: 24px;
    font-size: 12px;
    color: #888;
    background: #f4f4f4;
}

@media (max-width: 991px) {
    .taxonomy-compact-style .categories-boxes-container-alt {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 767px) {
    .taxonomy-compact-style .categories-boxes-container-alt {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .taxonomy-compact-style .categories-boxes-container-alt .category-small-box-alt,
    .taxonomy-compact-style .categories-boxes-container-alt .category-small-box-alt:hover {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px;
    }
    .taxonomy-compact-style .category-small-box-alt > i,
    .taxonomy-compact-style .category-small-box-alt .listeo-svg-icon-box-grid,
    .taxonomy-compact-style .category-small-box-alt .listeo-icon-img-grid {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
    .taxonomy-compact-style .category-small-box-alt .listeo-icon-img-grid {
        padding: 10px;
    }
    .taxonomy-compact-style .category-small-box-alt h4,
    .taxonomy-compact-style .category-small-box-alt:hover h4 {
        font-size: 15px;
        line-height: 20px;
    }
    body .taxonomy-compact-style .category-small-box-alt .category-box-counter-alt {
        display: none;
    }
}
