/**
 * WHSPTO Donation form — pill-button radios.
 *
 * Applied to Gravity Forms radio fields carrying the `whspto-pills` class
 * (Donation Frequency and the preset Donation Amount choices). The native
 * radio input stays in the DOM for accessibility; the label is styled as the
 * visible control. Works with the Orbital theme markup (.gchoice > input + label).
 */

.gform_wrapper .gfield.whspto-pills .gfield_radio {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px;
}

.gform_wrapper .gfield.whspto-pills .gchoice {
	position: relative;
	margin: 0;
	flex: 0 0 auto;
}

.gform_wrapper .gfield.whspto-pills .gchoice input[type="radio"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.gform_wrapper .gfield.whspto-pills .gchoice label.gform-field-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 5.5em;
	margin: 0;
	padding: 10px 18px;
	border: 2px solid var(--wp--preset--color--contrast-3, #a4a4a4);
	border-radius: 999px;
	background: var(--wp--preset--color--base-2, #fff);
	color: var(--wp--preset--color--contrast, #111);
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gform_wrapper .gfield.whspto-pills .gchoice:hover label.gform-field-label {
	border-color: var(--wp--preset--color--contrast, #111);
}

.gform_wrapper .gfield.whspto-pills .gchoice input[type="radio"]:checked + label.gform-field-label {
	background: #c10304;
	border-color: #c10304;
	color: #fff;
}

.gform_wrapper .gfield.whspto-pills .gchoice input[type="radio"]:focus-visible + label.gform-field-label {
	outline: 2px solid var(--wp--preset--color--contrast, #111);
	outline-offset: 2px;
}

/* Frequency toggle: two equal halves on small screens. */
@media (max-width: 480px) {
	.gform_wrapper .gfield.whspto-frequency .gchoice {
		flex: 1 1 calc(50% - 4px);
	}
	.gform_wrapper .gfield.whspto-frequency .gchoice label.gform-field-label {
		width: 100%;
	}
}
