/* ================================
   UJP Tax Filter – Base Styles
   ================================ */

/* Wrapper layout */

.ujp-tax-filter-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    justify-content: space-between;
}

/* Left side: filters */
.ujp-tax-filter-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: flex-end;
}

.ujp-tax-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: flex-end;
    margin: 0;
}

.ujp-tax-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 160px;
}

/* Label + select basics */
.ujp-tax-filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
}

.ujp-tax-filter-field select {
    min-width: 160px;
    padding: 0.35rem 0.6rem;
    font-size: 0.875rem;
    line-height: 1.3;
    border-radius: 3px;
    border: 1px solid #d4d4d4;
    background: #ffffff;
}

/* Right side: meta (results + clear) */
.ujp-tax-filter-meta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
}

.ujp-tax-filter-count {
    font-size: 0.875rem;
    color: #555;
}

/* ================================
   Loading animation on loop grid
   ================================ */

.ujp-loop-grid-wrapper.ujp-loading {
    animation: ujpLoadingPulse 0.8s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes ujpLoadingPulse {
    from { opacity: 0.9; }
    to   { opacity: 0.6; }
}

/* ================================
   Responsive tweaks
   ================================ */

/* Stack filters/meta on narrow screens */
@media (max-width: 767px) {
    .ujp-tax-filter-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .ujp-tax-filter-filters,
    .ujp-tax-filter-form {
        width: 100%;
    }

    .ujp-tax-filter-meta {
        margin-left: 0;
        justify-content: space-between;
        width: 100%;
    }

    .ujp-tax-filter-clear {
        margin-left: 0;
    }
}

/* Hide Elementor's built-in pagination (numbers + prev/next)
   when using the custom Load More button */
.ujp-loop-grid-wrapper .page-numbers {
    display: none;
}