.ssc-checkout {
	max-width: 32rem;
	margin: 0 auto;
	padding: 1rem;
	box-sizing: border-box;
}

.ssc-checkout__form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.ssc-checkout__field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.ssc-checkout__label {
	font-size: 0.95rem;
	font-weight: 600;
}

.ssc-checkout__input {
	width: 100%;
	min-height: 2.75rem;
	padding: 0.65rem 0.75rem;
	font-size: 1rem;
	border: 1px solid #c7c7c7;
	border-radius: 0.5rem;
	box-sizing: border-box;
}

.ssc-checkout__input:focus {
	outline: 2px solid #005696;
	outline-offset: 2px;
}

.ssc-checkout__payment-element {
	padding: 0.25rem 0;
}

.ssc-checkout__consent {
	padding: 0.65rem 0.75rem;
	border-radius: 0.5rem;
	background: #ffffff;
}

.ssc-checkout__consent-label {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	margin-top: 0;
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.35;
	color: #111827;
	cursor: pointer;
}

.ssc-checkout__consent-input {
	margin-top: 0 !important;
	flex: 0 0 auto;
	align-self: flex-start;
	position: relative;
	top: 0.35em;
}

.ssc-checkout__consent-link {
	font-weight: 700;
	color: #005696;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ssc-checkout__consent-link:hover,
.ssc-checkout__consent-link:focus {
	filter: brightness(1.05);
}

.ssc-checkout__amount-block {
	margin: 0;
	padding: 0.85rem 1rem;
	border: 1px solid #c7c7c7;
	border-radius: 0.5rem;
	background: #f9fafb;
	color: #111827;
}

.ssc-checkout__amount-title {
	margin: 0 0 0.5rem;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
}

.ssc-checkout__amount-fee {
	margin: 0 0 0.45rem;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
}

.ssc-checkout__amount-note {
	margin: 0;
	font-size: 0.9rem;
	font-weight: 400;
	line-height: 1.45;
	color: #374151;
}

.ssc-checkout__status {
	min-height: 1.25rem;
	margin: 0;
	font-size: 0.95rem;
	color: #b42318;
}

.ssc-checkout__overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	background: rgba(17, 24, 39, 0.6);
}

.ssc-checkout__overlay[hidden] {
	display: none !important;
}

.ssc-checkout__overlay-card {
	width: 100%;
	max-width: 26rem;
	padding: 1.25rem 1.25rem 1rem;
	border-radius: 0.75rem;
	background: #ffffff;
	box-shadow: 0 10px 35px rgba(0, 0, 0, 0.22);
}

.ssc-checkout__overlay-title {
	margin: 0 0 0.35rem;
	font-size: 1.1rem;
	font-weight: 800;
	color: #111827;
}

.ssc-checkout__overlay-message {
	margin: 0;
	font-size: 0.98rem;
	line-height: 1.45;
	color: #374151;
}

.ssc-checkout__overlay-button {
	margin-top: 1rem;
	width: 100%;
	min-height: 2.75rem;
	border: none;
	border-radius: 0.65rem;
	background: #005696;
	color: #ffffff;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
}

.ssc-terms-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	overflow: hidden;
}

body.admin-bar .ssc-terms-modal {
	inset: 0;
}

.ssc-terms-modal[hidden] {
	display: none !important;
}

.ssc-terms-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.6);
}

.ssc-terms-modal__card {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 44rem;
	margin: calc(60px + env(safe-area-inset-top, 0px)) auto calc(60px + env(safe-area-inset-bottom, 0px));
	max-height: calc(100dvh - 120px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
	border-radius: 0.85rem;
	background: #ffffff;
	box-shadow: 0 10px 35px rgba(0, 0, 0, 0.22);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-sizing: border-box;
}

body.admin-bar .ssc-terms-modal__card {
	margin-top: calc(60px + var(--wp-admin--admin-bar--height, 32px) + env(safe-area-inset-top, 0px));
	max-height: calc(100dvh - 120px - var(--wp-admin--admin-bar--height, 32px) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
}

/**
 * Theme overrides: enforce spacing/centering even if theme CSS overrides margins/positioning.
 */
.ssc-terms-modal .ssc-terms-modal__card {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	margin-top: calc(60px + env(safe-area-inset-top, 0px)) !important;
	margin-bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
	margin-left: auto !important;
	margin-right: auto !important;
	top: auto !important;
	bottom: auto !important;
	left: auto !important;
	right: auto !important;
	width: min(44rem, calc(100% - 2rem)) !important;
	max-height: calc((100dvh - 120px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * 0.8) !important;
}


body.admin-bar .ssc-terms-modal .ssc-terms-modal__card {
	margin-top: calc(60px + var(--wp-admin--admin-bar--height, 32px) + env(safe-area-inset-top, 0px)) !important;
}

.ssc-terms-modal__header {
	padding: 1rem 1.1rem 0.75rem;
	border-bottom: 1px solid #e5e7eb;
	flex: 0 0 auto;
}

.ssc-terms-modal__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.3;
	color: #111827;
	text-align: center;
}

.ssc-terms-modal__body {
	padding: 1rem 1.1rem;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	color: #111827;
	flex: 1 1 auto;
	min-height: 0;
}

.ssc-terms-modal__body :first-child {
	margin-top: 0;
}

.ssc-terms-modal__footer {
	padding: 0.85rem 1.1rem;
	border-top: 1px solid #e5e7eb;
	background: #ffffff;
	flex: 0 0 auto;
}

.ssc-terms-modal__button {
	width: 100%;
	min-height: 3rem;
	border: none;
	border-radius: 0.65rem;
	background: #005696;
	color: #ffffff;
	font-size: 1.05rem;
	font-weight: 800;
	cursor: pointer;
}

.ssc-terms-modal__button:focus {
	outline: 3px solid #005696;
	outline-offset: 2px;
}

.ssc-checkout__submit {
	width: 100%;
	min-height: 3rem;
	padding: 0.75rem 1rem;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.2;
	border: none;
	border-radius: 0.65rem;
	background: #005696;
	color: #ffffff;
	cursor: pointer;
	touch-action: manipulation;
}

.ssc-checkout__submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.ssc-checkout__submit:focus {
	outline: 3px solid #005696;
	outline-offset: 2px;
}

@media (min-width: 480px) {
	.ssc-checkout {
		padding: 1.25rem 1.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ssc-checkout__submit {
		transition: none;
	}
}

.ssc-checkout-panel {
	margin-top: 1rem;
	margin-bottom: 1.5rem;
}

.ssc-checkout-reveal-btn {
	font: inherit;
	cursor: pointer;
	display: inline-block;
	margin: 0.5rem 0;
	padding: 0.65rem 1.25rem;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	color: #fff;
	background: #005696;
	border: 1px solid #004578;
	border-radius: 0.5rem;
}

.ssc-checkout-reveal-btn:hover,
.ssc-checkout-reveal-btn:focus-visible {
	background: #0066b3;
	outline: 2px solid #005696;
	outline-offset: 2px;
}
