.gbas-search {
	max-width: 100%;
	box-sizing: border-box;
}

.gbas-search *,
.gbas-search *::before,
.gbas-search *::after {
	box-sizing: border-box;
}

/*
 * Hidden on purpose -- see GBAS_Card_Template::render_style_preload(). This
 * exists only so page-builder plugins that register a block's CSS based on
 * seeing it in the normal page-render flow actually do so; it isn't meant
 * to be seen.
 */
.gbas-style-preload {
	display: none !important;
}

/*
 * Most themes define .screen-reader-text as visually hidden via
 * position:absolute (removing it from normal flow), but that's not
 * guaranteed, so this label-hiding is defined defensively here rather
 * than assumed from the theme.
 */
.gbas-search .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.gbas-top-row {
	display: flex;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 16px;
}

.gbas-top-row .gbas-presets {
	flex: 1 1 240px;
	align-self: center;
}

.gbas-top-row .gbas-row-main {
	flex: 1 1 320px;
	max-width: 480px;
	margin-left: auto;
}

.gbas-top-row-no-presets .gbas-row-main {
	flex: 1 1 auto;
	max-width: none;
	margin-left: 0;
}

.gbas-row-main {
	display: grid;
	grid-template-columns: 1fr 100px;
	gap: 0px;
	align-items: stretch;
}

.gbas-input-wrap {
	position: relative;
	min-width: 0;
}

.gbas-input {
	width: 100%;
	height:100% !important;
	padding: 10px 34px 10px 12px !important;
	font-size: 15px;
	border: 1px solid #ccd0d4 !important;
	border-radius: 8px 0px 0px 8px !important;
}

.gbas-clear-search {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	width: 24px;
	height: 24px;
	line-height: 1;
	padding: 0;
	border: none;
	background: transparent;
	color: #646970;
	font-size: 20px;
	cursor: pointer;
	border-radius: 50%;
}

.gbas-clear-search:hover {
	background: #f0f0f1;
	color: #3c434a;
}

.gbas-submit {
	width: 100%;
	padding: 10px 18px;
	border: 1px solid #2271b1;
	background: #2271b1;
	color: #fff;
	border-radius: 0px 8px 8px 0px;
	cursor: pointer;
	font-size: 15px;
}

.gbas-submit:hover {
	background: #135e96;
}

.gbas-row-main-has-toggle {
	grid-template-columns: 1fr minmax(100px, auto) auto;
}

/* The toggle follows the search button, so it takes over the right-hand rounded corners. */
.gbas-has-filters-toggle .gbas-row-main-has-toggle .gbas-submit {
	border-radius: 0;
}

.gbas-filters-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1px solid #2271b1;
	border-left: none;
	background: #fff;
	color: #2271b1;
	border-radius: 0 8px 8px 0;
	cursor: pointer;
	font-size: 15px;
	white-space: nowrap;
}

.gbas-filters-toggle[hidden] {
	display: none;
}

.gbas-filters-toggle:hover,
.gbas-filters-toggle.is-open {
	background: #f0f6fc;
}

.gbas-filters-toggle-icon::after {
	content: "\25BC";
	display: inline-block;
	font-size: 10px;
	transition: transform 0.15s ease;
}

.gbas-filters-toggle.is-open .gbas-filters-toggle-icon::after {
	transform: rotate(180deg);
}

/* The button stands in for the panel's own "Filters" heading once JS shows it. */
.gbas-has-filters-toggle .gbas-filters-heading {
	display: none;
}

.gbas-has-filters-toggle .gbas-filters:not([open]) {
	margin-top: 0;
	padding: 0;
	border: none;
}

.gbas-live-results {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 20;
	background: #fff;
	border: 1px solid #ccd0d4;
	border-top: none;
	border-radius: 0 0 4px 4px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
	max-height: 320px;
	overflow-y: auto;
}

.gbas-live-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.gbas-live-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	text-decoration: none;
	color: inherit;
}

.gbas-live-item:hover,
.gbas-live-item:focus {
	background: #f0f0f1;
}

.gbas-live-item-title {
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.gbas-live-item-type {
	flex-shrink: 0;
	font-size: 12px;
	color: #646970;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.gbas-presets {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.gbas-preset-btn {
	padding: 5px 14px;
	border: 1px solid #ccd0d4;
	border-radius: 16px;
	background: #fff;
	color: #3c434a;
	font-size: 13px;
	cursor: pointer;
}

.gbas-preset-btn:hover {
	background: #f0f0f1;
}

.gbas-preset-btn.is-active {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.gbas-filters {
	margin-top: 16px;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	padding: 16px;
}

.gbas-filters-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	font-weight: 600;
	font-size: 14px;
	line-height:14px;
	list-style: none;
	padding: 0px 0;
	-webkit-user-select: none;
	user-select: none;
}

.gbas-filters-heading::-webkit-details-marker {
	display: none;
}

.gbas-filters-heading::after {
	content: "\25BC";
	margin-left: 8px;
	font-size: 10px;
	color: #646970;
	transition: transform 0.15s ease;
}

.gbas-filters[open] > .gbas-filters-heading::after {
	transform: rotate(180deg);
}

.gbas-filters-body {
	margin-top: 12px;
}

.gbas-clear-filters {
	display: inline-block;
	margin-bottom: 12px;
	padding: 0;
	border: none;
	background: none;
	color: #2271b1;
	font-size: 12px;
	text-decoration: underline;
	cursor: pointer;
}

.gbas-clear-filters:hover {
	color: #135e96;
}

.gbas-filter-submit {
	display: inline-block;
	margin-top: 12px;
	padding: 6px 14px;
	border: 1px solid #2271b1;
	border-radius: 4px;
	background: #fff;
	color: #2271b1;
	font-size: 13px;
	cursor: pointer;
}

.gbas-filter-submit:hover {
	background: #f0f6fc;
}

.gbas-filters-content {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.gbas-filter-dropdown {
	position: relative;
	flex: 1 1 200px;
}

.gbas-filter-list {
	flex: 1 1 200px;
	min-width: 160px;
}



.gbas-filter-list-heading {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 600;
	color: #3c434a;
}

.gbas-filter-list .gbas-filter-options {
	max-height: none;
	overflow-y: visible;
}

.gbas-filter-toggle {
	display: flex;
	width:100%;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	background: #fff;
	font-size: 13px;
	cursor: pointer;
}

.gbas-filter-toggle:hover {
	background: #f0f0f1;
}

/*
 * Sort control: the same dropdown/list widget as a taxonomy filter, with radio
 * options. The current choice shows next to the "Sort by:" prefix.
 */
.gbas-sort-current {
	color: #2271b1;
	font-weight: 600;
}

.gbas-filter-option.is-disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.gbas-filter-option.is-disabled .gbas-radio {
	cursor: not-allowed;
}

/* In the results header the control sits at the right edge, so open its panel leftwards. */
.gbas-results-toolbar .gbas-sort-dropdown {
	flex: 0 0 auto;
	min-width: 200px;
}

.gbas-results-toolbar .gbas-sort-dropdown .gbas-filter-panel {
	left: auto;
	right: 0;
}

.gbas-sidebar-body .gbas-filter-list {
	flex: 1;
	min-width: 100%;
}

/* The sidebar stacks its widgets in a column, where the row-oriented 200px flex-basis would set a height. */
.gbas-sidebar-body .gbas-filter-dropdown {
	flex: 0 0 auto;
}

.gbas-filter-count {
	color: #2271b1;
	font-weight: 600;
}

.gbas-filter-caret {
	width: 0;
	height: 0;
	margin-left: 2px;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid #646970;
	transition: transform 0.15s ease;
}

.gbas-filter-toggle[aria-expanded="true"] .gbas-filter-caret {
	transform: rotate(180deg);
}

.gbas-filter-panel {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 15;
	margin-top: 4px;
	min-width: 220px;
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
	padding: 10px;
}

.gbas-filter-options {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-height: 220px;
	overflow-y: auto;
}

.gbas-filter-option {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	white-space: nowrap;
}

/*
 * Filter checkboxes: native inputs re-drawn with appearance:none so every part
 * is stylable. Override the --gbas-checkbox-* variables on .gbas-search (or any
 * wrapper around one form) to restyle them, or target .gbas-checkbox directly,
 * e.g. .gbas-checkbox:checked, .gbas-filter-option:hover .gbas-checkbox. The sort
 * options are radios (.gbas-radio) and share these variables; --gbas-radio-radius
 * (default 50%) sets their corner radius.
 */
.gbas-search {
	--gbas-checkbox-size: 16px;
	--gbas-checkbox-radius: 3px;
	--gbas-checkbox-bg: #fff;
	--gbas-checkbox-border-width: 1px;
	--gbas-checkbox-border-color: #8c8f94;
	--gbas-checkbox-hover-border-color: #2271b1;
	--gbas-checkbox-checked-bg: #2271b1;
	--gbas-checkbox-checked-border-color: var(--gbas-checkbox-checked-bg);
	--gbas-checkbox-check-color: #fff;
	--gbas-checkbox-focus-color: #2271b1;
}

.gbas-checkbox,
.gbas-radio {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	flex: 0 0 auto;
	width: var(--gbas-checkbox-size);
	height: var(--gbas-checkbox-size);
	margin: 0;
	padding: 0;
	border: var(--gbas-checkbox-border-width) solid var(--gbas-checkbox-border-color);
	border-radius: var(--gbas-checkbox-radius);
	background: var(--gbas-checkbox-bg);
	cursor: pointer;
	transition: background-color 0.1s ease, border-color 0.1s ease;
}

.gbas-checkbox:hover,
.gbas-radio:hover:not(:disabled) {
	border-color: var(--gbas-checkbox-hover-border-color);
}

.gbas-checkbox:checked,
.gbas-radio:checked {
	background: var(--gbas-checkbox-checked-bg);
	border-color: var(--gbas-checkbox-checked-border-color);
}

/* The check mark: an L-shaped border rotated into a tick, scaled to the box size. */
.gbas-checkbox::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 45%;
	width: 28%;
	height: 52%;
	border: solid var(--gbas-checkbox-check-color);
	border-width: 0 2px 2px 0;
	transform: translate(-50%, -50%) rotate(45deg);
	opacity: 0;
}

.gbas-checkbox:checked::after {
	opacity: 1;
}

.gbas-radio {
	border-radius: var(--gbas-radio-radius, 50%);
}

/* Radio marker: a centered dot instead of a tick. */
.gbas-radio::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 40%;
	height: 40%;
	border-radius: 50%;
	background: var(--gbas-checkbox-check-color);
	transform: translate(-50%, -50%);
	opacity: 0;
}

.gbas-radio:checked::after {
	opacity: 1;
}

.gbas-checkbox:focus-visible,
.gbas-radio:focus-visible {
	outline: 2px solid var(--gbas-checkbox-focus-color);
	outline-offset: 2px;
}

.gbas-filter-option {
	cursor: pointer;
}

.gbas-term-count {
	color: #646970;
}

.gbas-no-filters {
	color: #646970;
	font-style: italic;
}

/*
 * Layout only -- everything inside an individual .gbas-card comes from the
 * Reusable Block chosen as the Results Card Template, so the plugin doesn't
 * style .gbas-card's internals at all.
 */
.gbas-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}

.gbas-card-grid.gbas-cols-1 {
	grid-template-columns: repeat(1, 1fr);
}

.gbas-card-grid.gbas-cols-2 {
	grid-template-columns: repeat(2, 1fr);
}

.gbas-card-grid.gbas-cols-3 {
	grid-template-columns: repeat(3, 1fr);
}

.gbas-card-grid.gbas-cols-4 {
	grid-template-columns: repeat(4, 1fr);
}

.gbas-results-wrap {
	margin-top: 20px;
	min-width: 0;
	flex: 1 1 0%;
}

.gbas-sections {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.gbas-section-heading {
	margin: 0 0 14px;
	padding-bottom: 8px;
	border-bottom: 1px solid #e2e4e7;
	font-size: 18px;
	font-weight: 600;
}

/*
 * Filter Location: Sidebar. .gbas-layout always wraps the sidebar (when
 * present) and .gbas-results-wrap; in the default "Top" location it holds
 * only .gbas-results-wrap, so the flex context is harmless either way.
 */
.gbas-layout {
	display: flex;
	align-items: flex-start;
	gap: 24px;
}

.gbas-layout.gbas-sidebar-right {
	flex-direction: row-reverse;
}

.gbas-sidebar {
	flex: 0 0 260px;
	padding:16px;
	width: 260px;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
}

.gbas-sidebar.is-collapsed {
	flex: 0 0 auto;
	width: 32px;
	overflow:hidden;
}

.gbas-sidebar-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	padding: 8px 0px;
	margin-bottom: 12px;
	background: #fff;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.gbas-sidebar.is-collapsed .gbas-sidebar-toggle-label {
	display: none;
}

.gbas-sidebar.is-collapsed .gbas-sidebar-toggle {
	width: auto;
}

.gbas-sidebar-toggle-icon {
	width: 0;
	height: 0;
	flex-shrink: 0;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	border-right: 5px solid #646970;
	transition: transform 0.15s ease;
}

.gbas-sidebar.is-collapsed .gbas-sidebar-toggle-icon {
	transform: rotate(180deg);
}

.gbas-sidebar-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.gbas-sidebar-body .gbas-filters-content {
	flex-direction: column;
}

.gbas-active-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 12px;
	font-size: 13px;
}

.gbas-summary-label {
	color: #646970;
}

.gbas-summary-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border-radius: 12px;
	background: #f0f0f1;
	color: #3c434a;
}

.gbas-chip-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	margin: 0 -4px 0 0;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
}

.gbas-chip-remove:hover,
.gbas-chip-remove:focus-visible {
	background: rgba(0, 0, 0, 0.12);
}

/* Active-filters summary on the left, status + sort toolbar pinned to the right. */
.gbas-results-header {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: start;
	gap: 12px;
	margin-bottom: 12px;
}

.gbas-results-header .gbas-active-summary,
.gbas-results-header .gbas-results-toolbar {
	margin-bottom: 0;
}

.gbas-results-header .gbas-results-toolbar {
	grid-column: 2;
}

.gbas-results-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.gbas-status {
	min-height: 1.2em;
	font-size: 13px;
	color: #646970;
}

.gbas-result-count {
	font-size: 13px;
	color: #646970;
	margin: 0 0 12px;
}

.gbas-result-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.gbas-result-item {
	padding: 14px 0;
	border-bottom: 1px solid #e2e4e7;
}

.gbas-result-item:first-child {
	padding-top: 0;
}

.gbas-result-title {
	font-size: 17px;
	font-weight: 600;
	text-decoration: none;
	color: #2271b1;
}

.gbas-result-title:hover {
	text-decoration: underline;
}

.gbas-result-meta {
	display: block;
	font-size: 12px;
	color: #646970;
	margin: 3px 0 6px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.gbas-result-meta .gbas-result-type::after {
	content: "\2022";
	margin: 0 6px;
}

.gbas-result-excerpt {
	margin: 0;
	color: #3c434a;
	line-height: 1.5;
}

.gbas-result-excerpt mark {
	background: #fff2a8;
	padding: 0 1px;
}

.gbas-no-results {
	color: #646970;
	font-style: italic;
}

.gbas-pagination-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 16px;
}

.gbas-page-link {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid #ccd0d4;
	background: #fff;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
	text-decoration: none;
	color: #2271b1;
}

.gbas-page-link.is-current {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.gbas-page-link:hover:not(.is-current) {
	background: #f0f0f1;
}

/* "Arrows" pagination style: back arrow, "page 1 / 2", forward arrow. */
.gbas-pagination-indicator {
	justify-content: center;
	align-items: center;
	gap: var(--Spacing-Spacing-8, 8px);
	padding: 10px;
	color: #000;
}

.gbas-page-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
	line-height: 0;
	color: inherit;
	text-decoration: none;
}

a.gbas-page-arrow:hover,
a.gbas-page-arrow:focus-visible {
	opacity: 0.6;
}

.gbas-page-arrow.is-disabled {
	opacity: 0.25;
	cursor: default;
}

.gbas-page-status {
	font-size: 16px;
	line-height: 1.4;
	white-space: nowrap;
}

@media (max-width: 900px) {
	.gbas-card-grid.gbas-cols-3,
	.gbas-card-grid.gbas-cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}

	.gbas-layout,
	.gbas-layout.gbas-sidebar-right {
		flex-direction: column;
	}

	.gbas-sidebar,
	.gbas-sidebar.is-collapsed {
		width: 100%;
		flex-basis: auto;
	}

	.gbas-sidebar.is-collapsed .gbas-sidebar-toggle-label {
		display: inline;
	}
}

@media (max-width: 480px) {
	.gbas-results-header {
		grid-template-columns: minmax(0, 1fr);
	}

	.gbas-results-header .gbas-results-toolbar {
		grid-column: 1;
	}

	.gbas-top-row {
		flex-direction: column;
	}

	.gbas-top-row .gbas-row-main {
		max-width: none;
		margin-left: 0;
		width: 100%;
	}

	.gbas-row-main,
	.gbas-row-main-has-toggle {
		grid-template-columns: 1fr;
	}

	.gbas-filters-toggle {
		border-left: 1px solid #2271b1;
		border-radius: 8px;
	}

	.gbas-has-filters-toggle .gbas-row-main-has-toggle .gbas-submit {
		border-radius: 8px;
	}

	.gbas-card-grid {
		grid-template-columns: repeat(1, 1fr) !important;
	}
}
