/**
 * Mobile bottom-sheet list picker — single source for astropro-option-sheet.js
 * (profiles, house system, etc.). Matches birth-form city-sheet scroll pattern.
 *
 * When the iOS keyboard opens, size against visualViewport (--astro-wheel-vv-*)
 * and expand the panel to fill that area — no gap above the keyboard.
 */

body.astro-wheel-sheet-open.astro-wheel-sheet-scroll-lock {
	position: fixed;
	width: 100%;
	left: 0;
	right: 0;
}

#astroOptionSheet.astro-wheel-sheet {
	top: var(--astro-wheel-vv-top, 0);
	/* Break inset:0 bottom so height tracks visualViewport above the keyboard */
	bottom: auto;
	left: 0;
	right: 0;
	height: var(--astro-wheel-vv-height, 100dvh);
	max-height: var(--astro-wheel-vv-height, 100dvh);
	overflow: hidden;
	z-index: 2147483002 !important;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

.astro-option-sheet .astro-wheel-sheet__panel {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: auto;
	/* % of overlay (= vv); never use layout vh (ignores keyboard) */
	max-height: min(80%, calc(var(--astro-wheel-vv-height, 100dvh) - 8px));
	overflow: hidden;
	padding-bottom: 0.5rem;
}

/* Keyboard open: white panel fills the visible area down to the keyboard */
#astroOptionSheet.is-keyboard-open .astro-wheel-sheet__panel {
	height: 100%;
	max-height: 100%;
	padding-bottom: 0;
	border-radius: 16px 16px 0 0;
}

.astro-option-sheet .astro-option-sheet__body {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	padding: 0 0.85rem 0.85rem;
	direction: rtl;
}

.astro-option-sheet .astro-option-sheet__search-wrap {
	flex: 0 0 auto;
	position: relative;
	margin: 0 0 0.35rem;
}

.astro-option-sheet .astro-option-sheet__results,
.astro-option-sheet .astro-city-sheet__results {
	flex: 1 1 auto;
	min-height: 0;
	max-height: none !important;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	touch-action: pan-y;
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #f8fafc;
}

.astro-profile-sheet__header-spacer {
	flex: 0 0 auto;
	min-width: 3.2rem;
	width: 3.2rem;
	height: 1px;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	visibility: hidden;
	pointer-events: none;
}

.astro-option-sheet .astro-city-sheet__result-btn.is-selected {
	background: #f4f9fe;
}

.astro-option-sheet .astro-city-sheet__result-btn.is-selected .astro-city-sheet__result-main {
	color: #217eba;
	font-weight: 700;
}

.astro-option-sheet .astro-option-sheet__body,
.astro-option-sheet .astro-option-sheet__search-wrap,
.astro-option-sheet .astro-option-sheet__search,
.astro-option-sheet .astro-city-sheet__result-btn,
.astro-option-sheet .astro-wheel-sheet__cancel {
	touch-action: manipulation;
}
