/* Tlloancy People's Giftcard – gift card form and balance checker. Uses theme colours where it can. */
.tlpg-fields {
	display: grid;
	gap: 1rem;
	margin: 0 0 1.25rem;
	width: 100%;
}

.tlpg-fields p {
	margin: 0;
}

.tlpg-fields label,
.tlpg-fields legend {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
}

.tlpg-fields input[type="text"],
.tlpg-fields input[type="email"],
.tlpg-fields input[type="number"],
.tlpg-fields input[type="date"],
.tlpg-fields textarea {
	font: inherit;
	width: 100%;
	max-width: 26rem;
	box-sizing: border-box;
}

.tlpg-fields input[type="number"] {
	max-width: 10rem;
}

.tlpg-hint {
	display: block;
	margin-top: 0.3rem;
	font-size: 0.875em;
	opacity: 0.75;
}

.tlpg-presets {
	border: 0;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.tlpg-presets legend {
	width: 100%;
	padding: 0;
}

.tlpg-chip {
	position: relative;
	margin: 0 !important;
	font-weight: 600;
	cursor: pointer;
}

.tlpg-chip input {
	position: absolute;
	opacity: 0;
	inset: 0;
	cursor: pointer;
}

.tlpg-chip > span {
	display: inline-block;
	min-width: 4.5rem;
	padding: 0.65rem 1rem;
	text-align: center;
	border: 2px solid currentColor;
	border-radius: 999px;
	opacity: 0.65;
	transition: opacity 0.15s, background-color 0.15s;
}

.tlpg-chip:hover > span {
	opacity: 1;
}

.tlpg-chip input:focus-visible + span {
	outline: 3px solid currentColor;
	outline-offset: 2px;
}

.tlpg-chip input:checked + span {
	opacity: 1;
	background: rgba(127, 127, 127, 0.2);
	box-shadow: 0 0 0 2px currentColor;
}

.tlpg-count {
	text-align: right;
	font-size: 0.8em;
	opacity: 0.7;
}

/* Balance checker */
.tlpg-balance-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.tlpg-balance-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.tlpg-balance-row input {
	flex: 1 1 14rem;
	font: inherit;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.tlpg-balance-card {
	margin-top: 1rem;
	padding: 1.25rem 1.5rem;
	border-radius: 12px;
	background: #14213d;
	color: #fff;
}

.tlpg-balance-amount {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.1;
}

.tlpg-balance-amount .amount,
.tlpg-balance-amount bdi {
	color: inherit;
}

.tlpg-balance-meta {
	margin-top: 0.35rem;
	opacity: 0.85;
}

.tlpg-note {
	margin-top: 1rem;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	background: rgba(127, 127, 127, 0.12);
}

.tlpg-note--error {
	border-left: 4px solid #b32d2e;
}

/* Chip internals: never style the price's own spans. */
.tlpg-chip > span * {
	border: 0;
	background: none;
	padding: 0;
	margin: 0;
	box-shadow: none;
	color: inherit;
	font: inherit;
}

/* Fields follow the theme: light border, flat corners, no heavy default look. */
.tlpg-fields input[type="text"],
.tlpg-fields input[type="email"],
.tlpg-fields input[type="number"],
.tlpg-fields input[type="date"],
.tlpg-fields textarea {
	padding: 0.7rem 0.8rem;
	border: 1px solid currentColor;
	border-color: rgba(127, 127, 127, 0.4);
	border-radius: 0;
	background: rgba(255, 255, 255, 0.55);
	color: inherit;
	font: inherit;
	box-shadow: none;
}

.tlpg-fields input:focus,
.tlpg-fields textarea:focus {
	outline: none;
	border-color: currentColor;
}

.tlpg-fields label,
.tlpg-fields legend {
	font-size: 0.78em;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.tlpg-chip > span {
	border-width: 1px;
	opacity: 1;
	border-color: rgba(127, 127, 127, 0.45);
	color: inherit;
}

.tlpg-chip:hover > span {
	border-color: currentColor;
}

.tlpg-chip input:checked + span {
	background: #2a241c;
	color: #fffdf9;
	border-color: #2a241c;
	box-shadow: none;
}

/* Express wallet buttons skip this form (amount, recipient, message): hide them. */
.tlpg-gift-product .wc_stripe_product_payment_methods,
.tlpg-gift-product .wcpay-express-checkout-wrapper,
.tlpg-gift-product .wc-block-components-express-payment {
	display: none !important;
}
