/* Polished wallet dialogs: scoped rules intentionally load after wallet.css. */
.scw-modal,
.scw-modal *,
.scw-actions,
.scw-actions * {
	box-sizing: border-box;
}

.scw-modal {
	width: min(600px, calc(100vw - 32px));
	max-width: calc(100vw - 32px);
	max-height: min(88dvh, 760px);
	margin: auto;
	overflow: hidden;
	border-color: rgba(155, 124, 255, .34);
	background:
		radial-gradient(circle at 86% 0, rgba(139, 92, 246, .15), transparent 34%),
		linear-gradient(145deg, #171824, #0f1019);
}

.scw-modal form {
	width: 100%;
	max-width: 100%;
	max-height: min(88dvh, 760px);
	overflow-y: auto;
	overflow-x: hidden;
	gap: 18px;
	padding: 26px;
	scrollbar-width: thin;
	scrollbar-color: rgba(155, 124, 255, .55) transparent;
}

.scw-modal header {
	align-items: center;
	gap: 14px;
	padding-bottom: 17px;
	border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.scw-modal header > span {
	width: 54px;
	height: 54px;
	flex-basis: 54px;
	border: 1px solid rgba(155, 124, 255, .35);
	background: linear-gradient(145deg, rgba(155, 124, 255, .25), rgba(114, 84, 220, .10));
	box-shadow: 0 12px 32px rgba(98, 69, 190, .18);
}

.scw-modal header > span svg {
	width: 27px;
	height: 27px;
}

.scw-modal h2 {
	font-size: 25px;
	line-height: 1.35;
}

.scw-modal header p {
	font-size: 13px;
	line-height: 1.7;
}

.scw-presets {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.scw-presets label {
	min-width: 0;
}

.scw-presets label > span {
	display: flex;
	min-width: 0;
	min-height: 94px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 10px 8px;
	border: 1px solid #34364d;
	border-radius: 13px;
	background: linear-gradient(145deg, #1c1d2b, #151621);
	color: #ece8ff;
	cursor: pointer;
	transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.scw-presets label > span:hover {
	border-color: rgba(155, 124, 255, .62);
	background: #202135;
	transform: translateY(-2px);
}

.scw-presets label > span i {
	display: grid;
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	place-items: center;
	border-radius: 9px;
	background: rgba(155, 124, 255, .13);
	color: #aa91ff;
}

.scw-presets label > span i svg {
	width: 19px;
	height: 19px;
}

.scw-presets label > span b {
	display: block;
	min-width: 0;
	max-width: 100%;
	font-size: 15px;
	font-weight: 900;
	font-variant-numeric: tabular-nums;
	line-height: 1.45;
	text-align: center;
	white-space: nowrap;
}

/* WooCommerce prices contain nested spans; never style those as preset cards. */
.scw-presets label > span .woocommerce-Price-amount,
.scw-presets label > span .woocommerce-Price-currencySymbol {
	display: inline;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: inherit;
	box-shadow: none;
	cursor: inherit;
}

.scw-presets input:checked + span {
	border-color: #a78bfa;
	background: linear-gradient(145deg, rgba(139, 92, 246, .28), rgba(92, 67, 170, .15));
	box-shadow: inset 0 0 0 1px rgba(196, 181, 253, .16), 0 10px 28px rgba(98, 69, 190, .15);
}

.scw-custom-amount > span {
	color: #bbb6d0;
	font-size: 13px;
}

.scw-custom-amount > div {
	display: flex;
	width: 100%;
	max-width: 100%;
	align-items: center;
	gap: 10px;
	padding-inline: 14px;
	border: 1px solid #393b56;
	border-radius: 13px;
	background: #181925;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.scw-custom-amount > div:focus-within {
	border-color: #9b7cff;
	box-shadow: 0 0 0 3px rgba(155, 124, 255, .12);
}

.scw-custom-amount > div > svg {
	width: 22px;
	height: 22px;
	flex: 0 0 22px;
	color: #9f85f4;
}

.scw-custom-amount input {
	min-width: 0;
	border: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.scw-modal footer {
	padding-top: 3px;
}

.scw-modal footer button {
	min-width: 0;
	transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.scw-modal footer button:not(.scw-primary):hover {
	border-color: #4b4e6b;
	background: #202130;
	color: #fff;
}

.scw-actions .scw-activation {
	border-color: rgba(155, 124, 255, .42);
	background: rgba(155, 124, 255, .08);
	color: #d9ceff;
}

.scw-actions .scw-activation:hover {
	border-color: #9b7cff;
	background: rgba(155, 124, 255, .16);
}

@media (max-width: 560px) {
	.scw-modal {
		width: calc(100vw - 20px);
		max-width: calc(100vw - 20px);
		border-radius: 18px;
	}

	.scw-modal form {
		padding: 20px;
	}

	.scw-modal h2 {
		font-size: 21px;
	}

	.scw-presets {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.scw-presets label > span {
		min-height: 86px;
	}
}

@media (max-width: 380px) {
	.scw-modal form {
		padding: 17px;
	}

	.scw-modal header > span {
		width: 46px;
		height: 46px;
		flex-basis: 46px;
	}

	.scw-presets label > span {
		gap: 5px;
		padding-inline: 6px;
	}

	.scw-presets label > span i {
		width: 28px;
		height: 28px;
		flex-basis: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.scw-presets label > span {
		transition: none;
	}
}
