/**
 * Gift cards on the site: the buy form and the balance check. The theme's colours and type where
 * it sets them (--cst-*), plain fallbacks where not. Phone width first.
 */
.tg {
	--tg-gold: var(--cst-gold, #d8a83e);
	--tg-line: var(--cst-rule-line, rgba(127, 127, 127, 0.35));
	--tg-soft: var(--cst-soft, #6b6b6b);
	--tg-radius: var(--cst-radius, 6px);
	max-width: 40rem;
	margin-inline: auto;
}

.tg-form {
	display: block;
}

.tg .tg-field {
	margin: 0 0 1rem;
}

.tg .tg-field label,
.tg fieldset legend {
	display: block;
	margin-bottom: 0.3rem;
	font-size: 0.9rem;
	font-weight: 700;
}

.tg .tg-field input[type="text"],
.tg .tg-field input[type="email"],
.tg .tg-field textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 2.75rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--tg-line);
	border-radius: var(--tg-radius);
	background: transparent;
	color: inherit;
	font: inherit;
}

.tg .tg-field textarea {
	min-height: 5.5rem;
	resize: vertical;
}

.tg .tg-field input:focus,
.tg .tg-field textarea:focus {
	border-color: var(--tg-gold);
	outline: 2px solid var(--tg-gold);
	outline-offset: 0;
}

.tg fieldset {
	margin: 0 0 1.25rem;
	padding: 0;
	border: 0;
	min-width: 0;
}

.tg-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.tg-chip {
	position: relative;
	cursor: pointer;
}

.tg-chip input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.tg-chip span {
	display: inline-block;
	min-width: 5.5rem;
	padding: 0.65rem 1rem;
	border: 1px solid var(--tg-line);
	border-radius: var(--tg-radius);
	text-align: center;
	font-weight: 700;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.tg-chip input:checked + span {
	border-color: var(--tg-gold);
	background: color-mix(in srgb, var(--tg-gold) 18%, transparent);
	box-shadow: inset 0 0 0 1px var(--tg-gold);
}

.tg-chip input:focus-visible + span {
	outline: 2px solid var(--tg-gold);
	outline-offset: 2px;
}

.tg-dollar {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	max-width: 12rem;
	font-weight: 700;
}

.tg-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
	gap: 0 1rem;
}

.tg-help,
.tg-muted {
	margin: 0.3rem 0 0;
	font-size: 0.875rem;
	color: var(--tg-soft);
}

.tg-error {
	margin: 0.3rem 0 0;
	font-size: 0.875rem;
	font-weight: 700;
	color: #d63638;
}

.tg .is-error input,
.tg .is-error textarea {
	border-color: #d63638;
}

.tg-alert {
	margin: 0 0 1.25rem;
	padding: 0.75rem 1rem;
	border-left: 4px solid #d63638;
	background: color-mix(in srgb, #d63638 10%, transparent);
	font-weight: 600;
}

.tg-note {
	margin: 0 0 1rem;
	padding: 0.5rem 0.75rem;
	border: 1px dashed var(--tg-gold);
	font-weight: 600;
}

.tg-trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.tg-summary {
	margin: 0 0 1.5rem;
	padding: 1.25rem;
	border: 1px solid var(--tg-line);
	border-top: 4px solid var(--tg-gold);
	border-radius: var(--tg-radius);
}

.tg-summary p {
	margin: 0 0 0.4rem;
}

.tg-summary__amount {
	font-family: var(--cst-heading, inherit);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.1;
}

.tg-summary__amount span {
	font-size: 1rem;
	font-weight: 400;
	color: var(--tg-soft);
}

.tg-summary__message {
	font-style: italic;
}

.tg-pay .tp-card {
	margin: 0 0 1rem;
}

.tg-back {
	margin-top: 1rem;
}

.tg-lead {
	font-size: 1.15rem;
}

.tg-done__title {
	margin-top: 0;
}

.tg-code-input {
	font-family: Menlo, Consolas, "Courier New", monospace;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.tg-result {
	margin: 0 0 1.5rem;
	padding: 1.25rem;
	border: 1px solid var(--tg-line);
	border-top: 4px solid var(--tg-gold);
	border-radius: var(--tg-radius);
}

.tg-result__label {
	margin: 0;
	font-size: 0.9rem;
	color: var(--tg-soft);
}

.tg-result__balance {
	margin: 0.2rem 0 0.75rem;
	font-family: var(--cst-heading, inherit);
	font-size: 2.25rem;
	font-weight: 700;
	line-height: 1.1;
}

.tg-result__balance span {
	display: block;
	font-size: 0.9rem;
	font-weight: 400;
	color: var(--tg-soft);
}

.tg-lines {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.tg-lines caption {
	text-align: left;
	font-weight: 700;
	padding-bottom: 0.25rem;
}

.tg-lines td {
	padding: 0.4rem 0.5rem 0.4rem 0;
	border-top: 1px solid var(--tg-line);
}

.tg-num {
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.tg.is-js [hidden] {
	display: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.tg-chip span {
		transition: none;
	}
}

.tg-done .tg-muted,
.tg-result .tg-muted {
	margin-bottom: 1rem;
}
