/**
 * VortexG Country Pricing - Preferences Modal Styles
 * Styled 100% using shared Material 3 Expressive design tokens.
 */

.vortexg-preferences-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-family: inherit;
}

.vortexg-preferences-trigger svg {
	display: block;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

/* Modal Backdrop */
.vortexg-preferences-modal {
	position: fixed;
	inset: 0;
	z-index: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: color-mix(in srgb, var(--md-sys-color-scrim) 45%, transparent);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 220ms cubic-bezier(0.2, 0, 0, 1), visibility 220ms linear;
	box-sizing: border-box;
	overscroll-behavior: contain;
	touch-action: none;
}

.vortexg-preferences-modal.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Modal Dialog Surface */
.vortexg-preferences-dialog {
	position: relative;
	width: 100%;
	max-width: 440px;
	padding: 24px;
	box-sizing: border-box;
	background: var(--md-sys-color-surface-container-high);
	color: var(--md-sys-color-on-surface);
	border-radius: var(--md-sys-shape-corner-extra-large, 28px);
	box-shadow: var(--md-sys-elevation-level-3, 0 8px 28px color-mix(in srgb, var(--md-sys-color-shadow) 28%, transparent));
	transform: scale(0.92);
	transition: transform 250ms cubic-bezier(0.05, 0.7, 0.1, 1);
	font-family: inherit;
}

.vortexg-preferences-modal.is-open .vortexg-preferences-dialog {
	transform: scale(1);
}

/* Modal Header */
.vortexg-preferences-dialog__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
}

.vortexg-preferences-dialog__title-wrap {
	flex: 1 1 auto;
}

.vortexg-preferences-dialog__title {
	margin: 0 0 4px;
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--md-sys-color-on-surface);
}

.vortexg-preferences-dialog__subtitle {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--md-sys-color-on-surface-variant);
}

.vortexg-preferences-dialog__close {
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	border-radius: var(--md-sys-shape-corner-full, 9999px);
	color: var(--md-sys-color-on-surface-variant);
	cursor: pointer;
	transition: background-color 150ms ease, color 150ms ease;
}

.vortexg-preferences-dialog__close:hover,
.vortexg-preferences-dialog__close:focus-visible {
	background: var(--md-sys-color-surface-container-highest);
	color: var(--md-sys-color-on-surface);
	outline: none;
}

.vortexg-preferences-dialog__close svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* Form Fields */
.vortexg-preferences-dialog__form {
	display: grid;
	gap: 18px;
}

.vortexg-preferences-field {
	display: grid;
	gap: 8px;
	width: 100%;
}

.vortexg-preferences-field__label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--md-sys-color-on-surface-variant);
	width: fit-content;
	justify-self: start;
	cursor: default;
}

.vortexg-preferences-field__control {
	width: 100%;
}

.vortexg-preferences-field__control .vortexg-m3-menu {
	width: 100%;
	display: block;
}

.vortexg-preferences-field__control .vortexg-m3-menu__trigger {
	width: 100%;
	min-inline-size: 100%;
	min-height: 48px;
	height: 48px;
	padding: 0 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--md-sys-color-surface-container-low);
	color: var(--md-sys-color-on-surface);
	border: 0;
	border-radius: var(--md-sys-shape-corner-large, 16px);
	box-sizing: border-box;
	text-align: start;
	font-size: 0.9375rem;
	font-weight: 500;
}

.vortexg-preferences-field__control .vortexg-m3-menu__trigger:hover {
	background: var(--md-sys-color-surface-container);
}

.vortexg-preferences-field__control .vortexg-m3-menu__trigger .vortexg-m3-menu__trigger-label {
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Modal Actions */
.vortexg-preferences-dialog__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 10px;
}
