/* ==========================================================================
   GBZ420 - category listing bar (count / sort / filter) - v1, 2026-09-23
   --------------------------------------------------------------------------
   Surface: the presentation of the category listing bar only - the Creative
   Elements section `.gbz-listing-bar` (data-id gbzbarsec) that carries the
   gbz-count, gbz-sort and listing-filters widgets of the listing-theme
   document.

   Measured problem it fixes (1440, post-apply7): the three widgets stack in
   three rows and the sort <select> stretches across the whole bar, where the
   maquettes show the count on the left and sort + filter on the right of one
   line.

   Scope: desktop only (>= 992px). Below that the stacked layout is exactly as
   it was. Nothing is hidden or re-labelled: the sort <select> keeps its
   options, its label and its onchange handler, the filter widget keeps its
   Creative Elements dialog, and a focus-visible ring is asserted on the bar's
   interactive elements so the keyboard path stays visible.
   ========================================================================== */

/* The theme's combined stylesheet is emitted after this file, so every rule below is
   id-qualified: `body#category ...` outranks Elementor's class-only `.elementor-widget`
   / `.elementor-widget-wrap` defaults whatever the load order is. */
@media (min-width: 992px) {
    /* one row: count left, sort + filter right */
    body#category .gbz-listing-bar .elementor-widget-wrap {
        align-items: center;
        column-gap: 20px;
        display: flex;
        flex-wrap: wrap;
        row-gap: 12px;
    }

    body#category .gbz-listing-bar .elementor-widget.gbz-count {
        flex: 0 0 auto;
        margin-right: auto;
        width: auto;
    }

    body#category .gbz-listing-bar .elementor-widget.gbz-sort,
    body#category .gbz-listing-bar .elementor-widget.elementor-widget-listing-filters {
        flex: 0 0 auto;
        width: auto;
    }

    /* the sort control keeps its inline label and stops filling the bar */
    body#category .gbz-listing-bar .ce-sort-order {
        align-items: center;
        display: flex;
        gap: 10px;
        margin: 0;
    }

    body#category .gbz-listing-bar .ce-sort-order .elementor-select-wrapper {
        width: auto;
    }

    body#category .gbz-listing-bar .ce-sort-order select {
        max-width: 260px;
        min-width: 200px;
        width: auto;
    }

    /* the filter trigger keeps its own box; the CE dialog is left untouched */
    body#category .gbz-listing-bar .elementor-widget-listing-filters > .elementor-widget-container {
        width: auto;
    }

    /* keep the keyboard ring visible on the bar's interactive elements */
    body#category .gbz-listing-bar select:focus-visible,
    body#category .gbz-listing-bar a:focus-visible,
    body#category .gbz-listing-bar button:focus-visible,
    body#category .gbz-listing-bar [role="button"]:focus-visible {
        outline: 2px solid var(--gbz-black, #000);
        outline-offset: 2px;
    }
}
