/* Events search form (widget event.browse-new-search, pages circus-events and circus-events/browse).
   Loaded directly from the widget template, NOT through css.php: CSSScaffold mangles @container rules. */
/* Events search (circus-events). Layout follows the form's own width (container query), not the viewport:
   at 1000px the form sits beside the sidebar and is only ~330px wide.
   Title on its own line; >=700px: the five fields share one row, date + status + language on the next;
   460-700px: two columns; <460px: one column. */
.layout_event_browse_new_search .widget-search {
    container-type: inline-size;
}
.layout_event_browse_new_search #new_search_form .row-group-first > label[for="event_title"] {
    width: 100%;
}
/* Old search.js (browser-cached) moves the date/status/language groups into .row-group-first:
   keep them on their own line below the five fields instead of squeezing the fields to 0 width. */
.layout_event_browse_new_search #new_search_form .row-group-first > .row-group-inline {
    order: 2;
}
.layout_event_browse_new_search #new_search_form .row-group-first:has(> .row-group-inline)::after {
    content: "";
    order: 1;
    width: 100%;
}
.layout_event_browse_new_search #new_search_form .row-group-first > .form-group > label {
    width: 100%;
}
.layout_event_browse_new_search #new_search_form .row-group-first > .form-group :is(select, input),
.layout_event_browse_new_search #new_search_form .row-group-first .ss-main {
    width: 100%;
}
.layout_event_browse_new_search #new_search_form .row-group-inline:has(#languages-wrapper) {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 20px;
}
@container (min-width: 700px) {
    .layout_event_browse_new_search #new_search_form .row-group-first > .form-group {
        flex: 1 1 0;
        min-width: 0;
    }
    .layout_event_browse_new_search #new_search_form .row-group-first > .form-group:last-child,
    .layout_event_browse_new_search #new_search_form .row-group-first > .form-group:has(+ .row-group-inline) {
        margin-right: 0;
    }
    .layout_event_browse_new_search #new_search_form .row-group-inline {
        display: inline-flex;
        vertical-align: bottom;
        margin-right: 10px;
    }
}
@container (max-width: 699.98px) {
    .layout_event_browse_new_search #new_search_form .row-group-first,
    .layout_event_browse_new_search #new_search_form .row-group-inline {
        column-gap: 10px;
    }
    .layout_event_browse_new_search #new_search_form .row-group-first > .form-group {
        flex: 1 1 calc(50% - 5px);
        min-width: 0;
        margin-right: 0;
    }
    .layout_event_browse_new_search #new_search_form .row-group-inline {
        display: flex;
        flex-wrap: wrap;
        width: 100% !important; /* Event/externals/styles/main.css: width: auto !important for guests */
    }
    .layout_event_browse_new_search #new_search_form .row-group-inline > .form-group {
        flex: 1 1 0;
        min-width: 0;
        margin-right: 0;
    }
    .layout_event_browse_new_search #new_search_form .row-group-inline > .form-group:only-child {
        flex: 0 1 calc(50% - 5px);
    }
    .layout_event_browse_new_search #new_search_form .row-group-inline > .form-group :is(select, input),
    .layout_event_browse_new_search #new_search_form .row-group-inline .event_calendar_container {
        width: 100%;
    }
}
@container (max-width: 459.98px) {
    .layout_event_browse_new_search #new_search_form .row-group-first > .form-group,
    .layout_event_browse_new_search #new_search_form .row-group-inline > .form-group,
    .layout_event_browse_new_search #new_search_form .row-group-inline > .form-group:only-child {
        flex: 1 1 100%;
    }
}
