.aae-widget,
.aae-widget * {
	box-sizing: border-box;
}

.aae-widget {
	--aae-list-max-height: 520px;
	position: relative;
	z-index: 2147483000;
	isolation: isolate;
	width: 100%;
	font-family: inherit;
	color: #1f2937;
}

.aae-widget [hidden] {
	display: none !important;
}

.aae-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;
}

.aae-search {
	position: relative;
	width: 100%;
	margin: 0 0 12px;
}

.aae-search__icon {
	position: absolute;
	top: 50%;
	left: 17px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #f25c05;
	pointer-events: none;
	transform: translateY( -50% );
}

.aae-search__input {
	display: block;
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 14px 18px 14px 48px;
	font: inherit;
	font-size: 15px;
	line-height: 1.4;
	color: #1f2937;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 12px;
	outline: none;
	box-shadow: none;
	transition: border-color 160ms ease, box-shadow 160ms ease;
	-webkit-appearance: none;
	appearance: none;
}

.aae-search__input::placeholder {
	color: #6b7280;
	opacity: 1;
}

.aae-search__input:focus {
	border-color: #f25c05;
	box-shadow: 0 0 0 3px rgb( 242 92 5 / 15% );
}

.aae-search__input::-webkit-search-cancel-button {
	cursor: pointer;
}

.aae-counter {
	margin: 0 0 12px;
	font-size: 13px;
	line-height: 1.45;
	color: #6b7280;
}

.aae-states {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-content: flex-start;
	gap: 10px;
	min-height: 0;
	max-height: var( --aae-list-max-height, 520px ) !important;
	max-height: min( var( --aae-list-max-height, 520px ), max( 220px, calc( 100vh - 260px ) ) ) !important;
	max-height: min( var( --aae-list-max-height, 520px ), max( 220px, calc( 100dvh - 260px ) ) ) !important;
	padding-right: 5px;
	overflow-x: hidden !important;
	overflow-y: scroll !important;
	overscroll-behavior: contain !important;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y;
	pointer-events: auto !important;
	scrollbar-gutter: stable;
	scrollbar-width: thin;
	scrollbar-color: #f25c05 #f3f4f6;
	will-change: scroll-position;
}

.aae-states::-webkit-scrollbar {
	width: 8px;
}

.aae-states::-webkit-scrollbar-track {
	background: #f3f4f6;
	border-radius: 999px;
}

.aae-states::-webkit-scrollbar-thumb {
	background: #f25c05;
	border-radius: 999px;
}

.aae-state {
	flex: 0 0 auto;
	overflow: hidden;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
}

.aae-state__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	min-height: 54px;
	margin: 0;
	padding: 16px 18px;
	font: inherit;
	color: #1f2937;
	text-align: left;
	background: #fff;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	transition: color 160ms ease, background-color 160ms ease;
	list-style: none;
	-webkit-user-select: none;
	user-select: none;
}

.aae-state__toggle::-webkit-details-marker {
	display: none;
}

.aae-state__toggle::marker {
	content: "";
}

.aae-state__toggle:hover {
	color: #f25c05;
	background: #fff7ed;
}

.aae-state__toggle:focus-visible {
	position: relative;
	z-index: 2;
	outline: 3px solid rgb( 242 92 5 / 28% );
	outline-offset: -3px;
}

.aae-state[open] .aae-state__toggle,
.aae-state.is-open .aae-state__toggle {
	color: #fff;
	background: #f25c05;
}

.aae-state__title-wrap {
	display: flex;
	align-items: baseline;
	gap: 10px;
	min-width: 0;
}

.aae-state__name {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}

.aae-state__count {
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
	opacity: 0.72;
}

.aae-state__icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	font-size: 15px;
	line-height: 1;
	transition: transform 180ms ease;
}

.aae-state__icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.aae-state[open] .aae-state__icon,
.aae-state.is-open .aae-state__icon {
	transform: rotate( 180deg );
}

.aae-state__panel {
	background: #fff;
}

.aae-state:not([open]) > .aae-state__panel {
	display: none;
}

.aae-city-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.aae-city {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin: 0;
	padding: 14px 18px;
	background: #fff;
}

.aae-city + .aae-city {
	border-top: 1px solid #e5e7eb;
}

.aae-city__main {
	display: flex;
	flex: 1 1 auto;
	align-items: baseline;
	gap: 10px;
	min-width: 0;
}

.aae-city__name {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	color: #111827;
}

.aae-city__meta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	line-height: 1.4;
	color: #6b7280;
}

.aae-city__uf::before {
	content: "•";
	margin-right: 6px;
}

.aae-city__filial {
	display: inline-flex;
	flex: 0 1 auto;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	min-width: 0;
	font-size: 12px;
	line-height: 1.4;
	color: #f25c05;
	text-align: right;
}

.aae-city__filial-icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 15px;
	height: 15px;
	font-size: 14px;
}

.aae-city__filial-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.aae-city__filial strong {
	font-weight: 700;
}

.aae-empty {
	margin: 16px 0 0;
	padding: 20px;
	font-size: 14px;
	line-height: 1.5;
	color: #6b7280;
	text-align: center;
	background: #f9fafb;
	border: 1px dashed #d1d5db;
	border-radius: 12px;
}

.aae-empty--initial {
	margin-top: 0;
}

@media ( max-width: 767px ) {
	.aae-state__title-wrap,
	.aae-city,
	.aae-city__main {
		align-items: flex-start;
	}

	.aae-state__title-wrap,
	.aae-city,
	.aae-city__main {
		flex-direction: column;
	}

	.aae-state__title-wrap,
	.aae-city__main {
		gap: 4px;
	}

	.aae-city {
		gap: 10px;
	}

	.aae-city__filial {
		justify-content: flex-start;
		text-align: left;
	}

	.aae-city__filial-label {
		display: none;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.aae-search__input,
	.aae-state__toggle,
	.aae-state__icon {
		transition: none;
	}
}
