/* Top-up form.
   Deliberately colourless — it borrows the active theme's type and colour via
   `currentColor` and `inherit`, so it looks native in any storefront instead of
   imposing a palette the theme has to be fought over. */

.gvc-topup {
	max-width: 30rem;
	margin: 0 0 1.5rem;
}

.gvc-topup__title {
	margin: 0 0 0.75rem;
}

.gvc-topup__balance {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	margin: 0 0 1rem;
	padding: 0.6rem 0.9rem;
	border: 1px solid currentColor;
	border-radius: 4px;
	opacity: 0.85;
}

.gvc-topup__balance strong {
	font-size: 1.25em;
	font-variant-numeric: tabular-nums;
}

.gvc-topup__presets {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.gvc-topup__preset {
	flex: 1 1 5rem;
	padding: 0.6rem 0.5rem;
	background: transparent;
	color: inherit;
	border: 1px solid currentColor;
	border-radius: 4px;
	cursor: pointer;
	font: inherit;
	opacity: 0.65;
}

.gvc-topup__preset:hover,
.gvc-topup__preset:focus-visible {
	opacity: 1;
}

.gvc-topup__preset.is-selected {
	opacity: 1;
	box-shadow: inset 0 0 0 1px currentColor;
	font-weight: 700;
}

.gvc-topup__field label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
}

.gvc-topup__input {
	display: flex;
	align-items: stretch;
	border: 1px solid currentColor;
	border-radius: 4px;
	overflow: hidden;
}

.gvc-topup__input:focus-within {
	box-shadow: 0 0 0 2px currentColor;
}

.gvc-topup__symbol {
	display: flex;
	align-items: center;
	padding: 0 0.75rem;
	opacity: 0.6;
	border-right: 1px solid currentColor;
}

.gvc-topup__input input[type="number"] {
	flex: 1;
	min-width: 0;
	margin: 0;
	border: 0;
	padding: 0.65rem 0.75rem;
	font-size: 1.15rem;
	font-variant-numeric: tabular-nums;
	background: transparent;
	color: inherit;
}

.gvc-topup__input input[type="number"]:focus {
	outline: none;
}

.gvc-topup__hint {
	margin: 0.35rem 0 0;
	font-size: 0.85em;
	opacity: 0.7;
}

.gvc-topup__preview {
	margin: 0.9rem 0;
	font-size: 1.05em;
	font-weight: 600;
	min-height: 1.4em;
}

.gvc-topup__preview.is-error {
	font-weight: 400;
	opacity: 0.8;
}

.gvc-topup__submit {
	width: 100%;
}

.gvc-topup--blocked p {
	margin: 0;
	padding: 0.9rem 1.1rem;
	border: 1px solid currentColor;
	border-radius: 4px;
}

.gvc-topup__admin-notice {
	padding: 0.75rem 1rem;
	border: 1px dashed currentColor;
	border-radius: 4px;
	opacity: 0.75;
}

/* On a product page the form sits inside the existing add-to-cart form, so it
   should not add its own outer spacing. */
.gvc-topup--inline {
	margin-bottom: 1rem;
}

@media (prefers-reduced-motion: reduce) {
	.gvc-topup * {
		transition: none !important;
	}
}
