.ggs0060-sc {
	width: 100% !important;
	margin: 0 0 1.5em;
}

.ggs0060-sc__form {
	width: 100%;
}

.ggs0060-sc__label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.5em;
}

/*
 * The heading follows the state: "Select a government:" until a searchable
 * jurisdiction is chosen, then "Search by name" once the field is exposed.
 */
.ggs0060-sc__label--search {
	display: none;
}

.ggs0060-sc--state-search .ggs0060-sc__label--select {
	display: none;
}

.ggs0060-sc--state-search .ggs0060-sc__label--search {
	display: block;
}

.ggs0060-sc__row {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0.5em;
}

/*
 * The name field and button appear only once a searchable jurisdiction is
 * chosen. This keys off the state class the server already renders, rather
 * than waiting for JS, so the controls never flash visible on load. The
 * dropdown itself lives in the same row and is never hidden.
 */
.ggs0060-sc__input,
.ggs0060-sc__submit {
	display: none;
}

.ggs0060-sc--state-search .ggs0060-sc__input {
	display: block;
}

.ggs0060-sc--state-search .ggs0060-sc__submit {
	display: inline-block;
}

/* The link-out shown for jurisdictions that can't be searched from here. */
.ggs0060-sc__portal {
	display: none;
	margin-top: 1.25em;
}

.ggs0060-sc--state-portal .ggs0060-sc__portal {
	display: block;
}

.ggs0060-sc__portal-intro {
	margin: 0 0 0.35em !important;
	font-weight: 600;
}

.ggs0060-sc__portal-link {
	margin: 0 !important;
}

.ggs0060-sc__select {
	/* Capped so the longest option name can't stretch the row and push the
	   submit button onto a second line. */
	flex: 0 1 auto;
	min-width: 10em;
	max-width: 15em;
	padding: 0.5em 0.75em;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	font-size: 1em;
	background-color: transparent !important;
	color: #fff !important;
	/*
	 * The expanded option list is drawn natively by the browser, not by the
	 * page. Left at the default light scheme it applies its own light-UI text
	 * treatment over the colours below, which renders the options grey and
	 * only corrects them on hover (that row uses the system highlight).
	 * Declaring the control dark makes the browser render the popup - text,
	 * hover and scrollbar - with dark-mode contrast.
	 */
	color-scheme: dark;
}

/*
 * The popup can't inherit the transparent background above, so it needs its
 * own explicit pair; !important guards against a theme styling option colours.
 */
.ggs0060-sc__select option {
	background-color: #1d2327 !important;
	color: #fff !important;
}

/* Keeps the select's label available to screen readers without showing it. */
.ggs0060-sc__sr-only {
	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;
}

.ggs0060-sc__input {
	flex: 1 1 200px;
	min-width: 0;
	padding: 0.5em 0.75em;
	border: 1px solid #ccd0d4;
	border-radius: 4px;
	font-size: 1em;
}

.ggs0060-sc__submit {
	padding: 0.5em 1.25em;
	border: none;
	border-radius: 4px;
	background: #2271b1;
	color: #fff;
	font-size: 1em;
	cursor: pointer;
}

.ggs0060-sc__submit:hover {
	background: #135e96;
}

.ggs0060-sc__error {
	color: #a00;
	margin-top: 1em;
}

.ggs0060-sc__fallback {
	margin-top: 0.5em;
	font-size: 0.9em;
}

.ggs0060-sc__empty {
	margin-top: 1em;
	font-style: italic;
}

.ggs0060-sc__results {
	margin-top: 1.5em;
}

.ggs0060-sc__matches {
	display: block !important;
}

.ggs0060-sc__match {
	display: flex !important;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5em;
	padding: 0.3em 0 !important;
	margin: 0 !important;
}

.ggs0060-sc__tick {
	color: #2a8a2a;
	font-weight: 700;
	flex: 0 0 auto;
}

.ggs0060-sc__name {
	font-weight: 700 !important;
}

.ggs0060-sc__source {
	margin: 1.25em 0 0 !important;
	padding-top: 1em !important;
	border-top: 1px solid rgba(128, 128, 128, 0.35) !important;
	font-size: 0.85em;
	color: #666;
}

.ggs0060-sc__updated {
	margin: 0.35em 0 0 !important;
	padding-top: 0 !important;
	border-top: none !important;
}
