.spd-form-wrapper {
	/* Every one of these has a sensible default but is overridden inline
	   per-form from the admin's Appearance settings — see class-spd-shortcode.php. */
	--spd-accent: #635bff;
	--spd-accent-hover: #534adb;
	--spd-btn-text: #ffffff;
	--spd-border: #dcdfe4;
	--spd-input-bg: #ffffff;
	--spd-radius: 8px;
	--spd-font-size: 16px;

	max-width: 480px;
	box-sizing: border-box;
	/* Deliberately inherit color and font-family from the theme rather than
	   setting our own, so the form blends into whatever page it's placed on
	   instead of looking like a foreign embedded widget. */
	font-family: var(--spd-font-family, inherit);
	font-size: var(--spd-font-size);
	color: inherit;
}
.spd-form-wrapper *,
.spd-form-wrapper *::before,
.spd-form-wrapper *::after {
	box-sizing: border-box;
}
.spd-wallet-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 16px;
}
.spd-wallet-button {
	min-height: 44px;
	width: 100%;
}
.spd-apple-pay-button {
	background: #000;
	color: #fff;
	border: none;
	border-radius: var(--spd-radius);
	cursor: pointer;
	font-family: inherit;
	font-size: 1em;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
}
.spd-apple-pay-button:hover {
	background: #1a1a1a;
}
.spd-apple-pay-button::before {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='%23fff' d='M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='%23fff' d='M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z'/%3E%3C/svg%3E") no-repeat center / contain;
	background-color: #fff;
}
.spd-wallet-divider {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 4px 0 12px;
	font-size: 0.8em;
	opacity: 0.6;
}
.spd-wallet-divider::before,
.spd-wallet-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--spd-border);
}

.spd-sandbox-banner {
	background: #fff3cd;
	color: #664d03;
	border: 1px solid #ffe69c;
	border-radius: var(--spd-radius);
	padding: 8px 12px;
	font-size: 0.85em;
	margin-bottom: 14px;
}

.spd-description {
	margin: 0 0 16px;
	font-size: 0.95em;
	line-height: 1.5;
}
.spd-field-group {
	margin-bottom: 16px;
}
.spd-field-group label {
	display: block;
	font-weight: 600;
	font-size: 0.9em;
	margin-bottom: 6px;
}
.spd-form input[type="text"],
.spd-form input[type="email"],
.spd-form input[type="tel"],
.spd-form input[type="number"],
.spd-form select,
.spd-form textarea {
	display: block !important;
	width: 100% !important;
	padding: 10px 12px !important;
	border: 1px solid var(--spd-border) !important;
	border-radius: var(--spd-radius) !important;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none !important;
	font-family: inherit;
	font-size: 0.95em;
	background: var(--spd-input-bg) !important;
	color: inherit;
	transition: border-color 0.15s ease;
}
.spd-form input:hover,
.spd-form select:hover,
.spd-form textarea:hover {
	border-color: color-mix( in srgb, var(--spd-border) 60%, var(--spd-accent) 40% );
}
.spd-form input:focus,
.spd-form select:focus,
.spd-form textarea:focus {
	outline: 2px solid var(--spd-accent);
	outline-offset: 1px;
	border-color: var(--spd-accent);
}
.spd-places-mount {
	margin-bottom: 6px;
}
.spd-places-mount gmp-place-autocomplete {
	width: 100%;
}
.spd-places-hint {
	margin: 0 0 8px;
	font-size: 0.8em;
	opacity: 0.65;
}
.spd-address-row {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 8px;
	margin-top: 8px;
}

.spd-payment-type-toggle {
	display: flex !important;
	width: 100%;
	border: 1px solid var(--spd-border) !important;
	border-radius: 999px !important;
	padding: 3px !important;
	margin-bottom: 20px;
	gap: 4px;
	background: transparent;
}
.spd-toggle-btn {
	flex: 1 1 0;
	border: none !important;
	box-shadow: none !important;
	background: transparent !important;
	padding: 8px 18px !important;
	margin: 0 !important;
	border-radius: 999px !important;
	font-family: inherit;
	font-size: 0.9em;
	font-weight: 600;
	cursor: pointer;
	color: inherit !important;
	transition: background-color 0.15s ease, color 0.15s ease;
	white-space: nowrap;
	text-align: center;
}
.spd-toggle-btn:hover:not(.is-active) {
	background: color-mix( in srgb, var(--spd-accent) 12%, transparent ) !important;
}
.spd-toggle-btn.is-active {
	background: var(--spd-accent) !important;
	color: var(--spd-btn-text) !important;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}
.spd-toggle-btn.is-active::before {
	content: "\2713\0020";
}

.spd-amount-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.spd-amount-btn {
	border: 1px solid var(--spd-border) !important;
	background: var(--spd-input-bg) !important;
	padding: 10px 16px !important;
	margin: 0 !important;
	border-radius: var(--spd-radius) !important;
	box-shadow: none !important;
	font-family: inherit;
	font-size: 0.95em;
	font-weight: 600;
	cursor: pointer;
	color: inherit !important;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.spd-amount-btn:hover:not(.is-active) {
	border-color: var(--spd-accent) !important;
}
.spd-amount-btn.is-active {
	border-color: var(--spd-accent) !important;
	background: var(--spd-accent) !important;
	color: var(--spd-btn-text) !important;
}
.spd-amount-btn.is-active::before {
	content: "\2713\0020";
}
.spd-custom-amount-wrap {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--spd-border);
	border-radius: var(--spd-radius);
	overflow: hidden;
}
.spd-currency-prefix {
	padding: 0 8px;
	font-size: 0.85em;
	opacity: 0.65;
	background: color-mix( in srgb, var(--spd-border) 35%, transparent );
	align-self: stretch;
	display: flex;
	align-items: center;
}
.spd-custom-amount {
	border: none !important;
	width: 130px !important;
}

.spd-checkbox-label {
	display: flex !important;
	align-items: flex-start;
	gap: 8px;
	font-weight: 400 !important;
	font-size: 0.88em;
	cursor: pointer;
	line-height: 1.4;
}
.spd-checkbox-label input[type="checkbox"] {
	margin-top: 2px;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	accent-color: var(--spd-accent);
}
.spd-disclaimer-group {
	margin-bottom: 16px;
}
.spd-disclaimer-text {
	font-size: 0.85em;
	opacity: 0.85;
	line-height: 1.4;
}
.spd-disclaimer-static {
	margin: 0;
}
.spd-disclaimer-text a {
	color: var(--spd-accent);
	text-decoration: underline;
}

.spd-summary-group {
	background: color-mix( in srgb, var(--spd-border) 20%, transparent );
	border: 1px solid var(--spd-border);
	border-radius: var(--spd-radius);
	padding: 14px 16px;
	margin: 4px 0 16px;
}
.spd-summary-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
	font-size: 0.92em;
}
.spd-summary-row + .spd-summary-row {
	border-top: 1px dashed var(--spd-border);
}
.spd-summary-fee-row {
	align-items: flex-start;
}
.spd-summary-fee-row .spd-checkbox-label {
	margin: 0;
}
.spd-summary-total-row {
	font-weight: 700;
	font-size: 1.05em;
	padding-top: 10px;
}
.spd-summary-total-row .spd-total-amount {
	font-size: 1.15em;
}

.spd-card-container {
	padding: 2px;
	min-height: 40px;
}

.spd-hp-field {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.spd-submit-btn {
	display: block !important;
	width: 100% !important;
	background: var(--spd-accent) !important;
	color: var(--spd-btn-text) !important;
	border: none !important;
	box-shadow: none !important;
	border-radius: var(--spd-radius) !important;
	font-family: inherit;
	padding: 13px 20px !important;
	font-size: 1em;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.05s ease;
}
.spd-submit-btn:hover {
	background: var(--spd-accent-hover) !important;
}
.spd-submit-btn:active {
	transform: scale(0.99);
}
.spd-submit-btn.is-busy {
	opacity: 0.6;
	cursor: default;
}

.spd-payment-status {
	min-height: 20px;
	font-size: 0.88em;
	margin-bottom: 12px;
}
.spd-payment-status.spd-status-error {
	color: #c0392b;
}
.spd-payment-status.spd-status-info {
	opacity: 0.7;
}

.spd-success-message {
	padding: 16px;
	border-radius: var(--spd-radius);
	background: #edf9f0;
	border: 1px solid #b7e4c7;
	color: #1e5631;
}
