/**
 * [iw-product-filter] product filter styles.
 *
 * Deliberately light — the Avada theme can override. Lays the dropdowns out in
 * a responsive row with labels above each control.
 *
 * @package InfusionWooIntegration
 */

.iw-filter {
    margin: 0 0 1.5em;
}

.iw-filter-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 16px;
}

.iw-filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
}

.iw-filter-label {
    font-size: 0.85em;
    font-weight: 600;
    line-height: 1.2;
}

/*
 * Our own dropdown chevron, so its spacing from the right edge is under our
 * control rather than the theme's. The chevron sits 14px from the right with
 * 36px of text padding so the value never crowds it. Adjust the
 * `background-position` / `padding-right` below to taste. The double-class
 * selector raises specificity to win over Avada's global `select` styling; if
 * the theme still overrides it, add `!important` to these two lines.
 */
.iw-filter .iw-filter-select {
    min-width: 160px;
    max-width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-left: 20px;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23555' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
}

/* label="off" — no visible labels; drop the label/control gap. */
.iw-filter--no-labels .iw-filter-field {
    gap: 0;
}

.iw-filter-reset {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    color: inherit;
    font-size: 0.9em;
    line-height: 2.4;
}

.iw-filter-reset[hidden] {
    display: none;
}

.iw-filter-status {
    margin-top: 0.75em;
    font-size: 0.9em;
    opacity: 0.85;
}

.iw-filter-status[hidden] {
    display: none;
}

/* Subtle busy state while a filter request is in flight. */
.iw-filter-busy {
    opacity: 0.6;
    pointer-events: none;
}

/* No-results / error placeholders injected into the grid. */
.products.iw-no-results,
.products.iw-error {
    list-style: none;
    margin: 0;
    padding: 0;
}

.iw-filter-no-results,
.iw-filter-error {
    padding: 1em 0;
}
