/**
 * Frontend styles for the FH Salesforce Donations form.
 */

.fh-sd-donation-form {
	--fh-sd-green: #4f7f3f;
	--fh-sd-green-hover: #3f6633;
	--fh-sd-hero-height: 220px;
	--fh-sd-form-group-margin-inline: 0;
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	margin-inline: 0;
}

.fh-sd-visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.fh-sd-hero {
	display: block;
	width: 100%;
	margin: 0 0 1rem;
}

.fh-sd-hero-image {
	display: block;
	position: relative;
	width: 100%;
	height: var(--fh-sd-hero-height, 220px);
	min-height: 80px;
	overflow: hidden;
	background-color: #e8e8e8;
	background-image: var(--fh-sd-hero-image);
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
}

.fh-sd-form-heading {
	margin: 0 0 0.5rem;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.25;
	color: inherit;
}

.fh-sd-form-description {
	margin: 0 0 1.25rem;
	line-height: 1.5;
	color: inherit;
}

.fh-sd-frequency {
	margin: 0 0 1.25rem;
	padding: 0;
	border: 0;
	min-width: 0;
}

.fh-sd-frequency-options {
	--fh-sd-layout-mode: auto;
	box-sizing: border-box;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0.75rem;
	width: var(--fh-sd-button-groups-width, 100%);
	max-width: 100%;
	margin-inline: var(--fh-sd-form-group-margin-inline, 0);
}

.fh-sd-frequency-option {
	position: relative;
	box-sizing: border-box;
	flex: 1 1 0%;
	width: auto;
	max-width: 100%;
	margin: 0;
	min-width: 0;
}

.fh-sd-frequency-radio {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.fh-sd-frequency-label {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	padding: 0.65rem 1.1rem;
	border: 2px solid var(--fh-sd-green);
	border-radius: 0.35rem;
	background-color: #fff;
	color: var(--fh-sd-green);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.fh-sd-frequency-label:hover {
	background-color: #f3f7f1;
	border-color: var(--fh-sd-green-hover);
	color: var(--fh-sd-green-hover);
}

.fh-sd-frequency-option .fh-sd-frequency-radio:checked + .fh-sd-frequency-label {
	background-color: var(--fh-sd-green);
	border-color: var(--fh-sd-green);
	color: #fff;
}

.fh-sd-frequency-option .fh-sd-frequency-radio:focus-visible + .fh-sd-frequency-label {
	outline: 2px solid var(--fh-sd-green);
	outline-offset: 3px;
}

.fh-sd-frequency-options.fh-sd-layout-stacked {
	flex-direction: column !important;
	flex-wrap: nowrap !important;
}

.fh-sd-frequency-options.fh-sd-layout-stacked > .fh-sd-frequency-option {
	flex: 0 0 auto !important;
	width: 100% !important;
	max-width: 100% !important;
}

.fh-sd-frequency-options.fh-sd-layout-measuring > .fh-sd-frequency-option {
	flex: 0 0 auto;
	width: auto;
	max-width: none;
}

.fh-sd-donation-amounts {
	margin: 0 0 1.25rem;
	padding: 0;
	border: 0;
	min-width: 0;
}

.fh-sd-donation-options {
	box-sizing: border-box;
	display: grid;
	grid-template-columns: repeat(var(--fh-sd-preset-count, 1), minmax(0, 1fr));
	align-items: stretch;
	gap: 0.75rem;
	width: var(--fh-sd-button-groups-width, 100%);
	max-width: 100%;
	margin: 0 0 1.25rem;
	margin-inline: var(--fh-sd-form-group-margin-inline, 0);
}

.fh-sd-donation-option {
	position: relative;
	box-sizing: border-box;
	width: auto;
	max-width: 100%;
	margin: 0;
	min-width: 0;
}

.fh-sd-donation-option .fh-sd-donation-amount-radio {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.fh-sd-donation-option-label {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	padding: 0.65rem 1.1rem;
	border: 2px solid var(--fh-sd-green);
	border-radius: 0.35rem;
	background-color: #fff;
	color: var(--fh-sd-green);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	overflow-wrap: anywhere;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.fh-sd-donation-option-label:hover {
	background-color: #f3f7f1;
	border-color: var(--fh-sd-green-hover);
	color: var(--fh-sd-green-hover);
}

.fh-sd-donation-option .fh-sd-donation-amount-radio:checked + .fh-sd-donation-option-label {
	background-color: var(--fh-sd-green);
	border-color: var(--fh-sd-green);
	color: #fff;
}

.fh-sd-donation-option .fh-sd-donation-amount-radio:focus-visible + .fh-sd-donation-option-label {
	outline: 2px solid var(--fh-sd-green);
	outline-offset: 3px;
}

.fh-sd-donation-options.fh-sd-layout-stacked {
	grid-template-columns: minmax(0, 1fr);
}

.fh-sd-donation-options.fh-sd-layout-measuring {
	grid-template-columns: repeat(var(--fh-sd-preset-count, 1), max-content);
}

.fh-sd-donation-options.fh-sd-layout-measuring > .fh-sd-donation-option {
	width: auto;
	max-width: none;
}

.fh-sd-other-amount-wrapper {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	margin: 0;
}

.fh-sd-other-amount-wrapper .fh-sd-donation-amount-radio-other {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.fh-sd-other-amount-field {
	box-sizing: border-box;
	display: flex;
	align-items: stretch;
	width: 100%;
	min-width: 0;
	border: 1px solid #8a8a8a;
	border-radius: 0.35rem;
	background-color: #fff;
	overflow: hidden;
	color: inherit;
}

.fh-sd-other-amount-field:focus-within {
	border-color: var(--fh-sd-green);
	outline: 2px solid var(--fh-sd-green);
	outline-offset: 2px;
}

.fh-sd-amount-field {
	cursor: text;
}

.fh-sd-currency-code {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	padding: 0.65rem 0.75rem;
	border-right: 1px solid #c8c8c8;
	background-color: #f3f3f3;
	color: #444;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	user-select: none;
	pointer-events: none;
}

.fh-sd-currency-symbol,
.fh-sd-other-amount-prefix {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	padding: 0.65rem 0.2rem 0.65rem 0.75rem;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	line-height: inherit;
	user-select: none;
	pointer-events: none;
}

.fh-sd-other-amount-input {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0.65rem 0.75rem 0.65rem 0.25rem;
	border: 0 !important;
	border-radius: 0;
	outline: 0 !important;
	outline-offset: 0;
	box-shadow: none !important;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 1rem;
	line-height: 1.2;
	-webkit-appearance: none;
	appearance: none;
}

.fh-sd-other-amount-input:focus,
.fh-sd-other-amount-input:focus-visible {
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
}

.fh-sd-donation-submit {
	margin: 0;
	width: 100%;
}

.fh-sd-donation-submit-button {
	box-sizing: border-box;
	display: inline-block;
	width: 100%;
	padding: 0.75rem 1.5rem;
	border: 2px solid var(--fh-sd-green);
	border-radius: 0.35rem;
	background-color: var(--fh-sd-green);
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.fh-sd-donation-submit-button:hover,
.fh-sd-donation-submit-button:focus {
	background-color: var(--fh-sd-green-hover);
	border-color: var(--fh-sd-green-hover);
	color: #fff;
}

.fh-sd-donation-submit-button:focus-visible {
	outline: 2px solid var(--fh-sd-green);
	outline-offset: 3px;
}

.fh-sd-form-errors {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border: 1px solid #c0392b;
	border-radius: 0.35rem;
	background-color: #fdf0ef;
	color: #7b241c;
	font-size: 0.9375rem;
	line-height: 1.4;
}

.fh-sd-form-errors[hidden] {
	display: none;
}

.fh-sd-debug-panel {
	margin-top: 1.25rem;
	padding: 1rem;
	border: 1px solid #b8b8b8;
	border-radius: 0.35rem;
	background-color: #f5f5f5;
}

.fh-sd-debug-panel[hidden] {
	display: none;
}

.fh-sd-debug-panel-heading {
	margin: 0 0 0.75rem;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.3;
	color: #333;
}

.fh-sd-debug-version-info {
	margin: 0 0 0.75rem;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: #555;
}

.fh-sd-debug-payload {
	margin: 0 0 0.75rem;
	padding: 0.75rem;
	border: 1px solid #d0d0d0;
	border-radius: 0.25rem;
	background-color: #fff;
	color: #1a1a1a;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: 0.8125rem;
	line-height: 1.5;
	overflow-x: auto;
	white-space: pre;
}

.fh-sd-debug-hero-image {
	margin: 0 0 0.75rem;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: #333;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.fh-sd-debug-utm-section {
	margin: 0 0 0.75rem;
}

.fh-sd-debug-utm-heading {
	margin: 0 0 0.5rem;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.3;
	color: #333;
}

.fh-sd-debug-utm-values {
	margin: 0;
	padding: 0.75rem;
	border: 1px solid #d0d0d0;
	border-radius: 0.25rem;
	background-color: #fff;
	color: #1a1a1a;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: 0.8125rem;
	line-height: 1.5;
	overflow-x: auto;
	white-space: pre;
}

.fh-sd-debug-redirect-section {
	margin-top: 1rem;
}

.fh-sd-debug-redirect-section[hidden] {
	display: none;
}

.fh-sd-debug-redirect-heading {
	margin: 0 0 0.5rem;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.3;
	color: #333;
}

.fh-sd-debug-redirect-url {
	margin: 0 0 0.75rem;
	padding: 0.75rem;
	border: 1px solid #d0d0d0;
	border-radius: 0.25rem;
	background-color: #fff;
	color: #1a1a1a;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: 0.8125rem;
	line-height: 1.5;
	overflow-wrap: anywhere;
	word-break: break-word;
	user-select: text;
}

.fh-sd-debug-redirect-link {
	color: #1a5276;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.fh-sd-debug-redirect-link:hover,
.fh-sd-debug-redirect-link:focus {
	color: #154360;
}

.fh-sd-debug-redirect-link:focus-visible {
	outline: 2px solid var(--fh-sd-green);
	outline-offset: 2px;
}

.fh-sd-debug-redirect-test-button {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	border: 2px solid var(--fh-sd-green);
	border-radius: 0.35rem;
	background-color: var(--fh-sd-green);
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.fh-sd-debug-redirect-test-button:hover,
.fh-sd-debug-redirect-test-button:focus {
	background-color: var(--fh-sd-green-hover);
	border-color: var(--fh-sd-green-hover);
	color: #fff;
}

.fh-sd-debug-redirect-test-button:focus-visible {
	outline: 2px solid var(--fh-sd-green);
	outline-offset: 3px;
}
