.sa-verify-form-wrap {
	box-sizing: border-box;
}

.sa-verify-form-wrap:has(.sa-certificate:not([hidden])) {
	max-width: none;
}

.sa-verify-form,
.sa-verify-form *,
.sa-verify-form *::before,
.sa-verify-form *::after {
	box-sizing: border-box;
}

.sa-verify-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1em;
	width: 100%;
	max-width: 100%;
}

.sa-verify-form[hidden] {
	display: none;
}

.sa-verify-form .sa-field {
	margin-bottom: 1em;
	flex: 0 0 100%;
}

.sa-verify-form .sa-field-half {
	flex-basis: calc(50% - 0.5em);
}

.sa-verify-form .sa-field-third {
	flex-basis: calc(33.333% - 0.667em);
}

.sa-verify-form label {
	display: block;
	margin-bottom: 0.25em;
	font-weight: 600;
}

.sa-verify-form input[type="text"] {
	width: 100%;
	padding: 0.5em;
	box-sizing: border-box;
}

/*
 * Custom div-based dropdown base rules (see public.js buildCustomSelect());
 * only the "hide the native select" behavior lives here so it works with
 * or without the customization/ skin — full visual styling of the trigger
 * and options list is expected to come from a skin like
 * customization/css/verify-form-custom.css.
 */
.sa-custom-select {
	position: relative;
}

.sa-verify-form select.sa-custom-select-native {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.sa-custom-select-trigger {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.5em;
	cursor: pointer;
}

.sa-custom-select-list {
	position: absolute;
	z-index: 20;
	top: 100%;
	left: 0;
	right: 0;
	max-height: 240px;
	overflow-y: auto;
	background: #ffffff;
	border: 1px solid #d1d5db;
}

.sa-custom-select-list[hidden] {
	display: none;
}

.sa-custom-select-option {
	padding: 0.5em;
	cursor: pointer;
}

.sa-custom-select-option:hover,
.sa-custom-select-option-active {
	background: #f3f4f6;
}

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

.sa-verify-submit,
.sa-certificate-reset {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	background: #1b3a5c;
	background-image: linear-gradient(135deg, #1b3a5c 0%, #142c47 100%);
	color: #ffffff;
	border: none;
	border-radius: 999px;
	padding: 14px 32px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.sa-verify-submit:hover,
.sa-certificate-reset:hover {
	opacity: 0.92;
}

.sa-verify-submit.sa-loading {
	cursor: not-allowed;
	opacity: 0.8;
}

.sa-verify-submit.sa-loading::after {
	content: "";
	width: 1em;
	height: 1em;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	display: inline-block;
	animation: sa-spin 0.6s linear infinite;
}

@keyframes sa-spin {
	to {
		transform: rotate(360deg);
	}
}

.sa-verify-result {
	margin-top: 1em;
	padding: 0.75em;
	border-radius: 4px;
}

.sa-verify-result:empty {
	display: none;
}

.sa-verify-success {
	background: #ecfdf3;
	color: #036b26;
}

.sa-verify-error {
	background: #fef3f2;
	color: #b42318;
}

/* ==========================================================================
   Verification Certificate
   ========================================================================== */

.sa-certificate {
	position: relative;
	margin: 0 auto;
	padding: 3px;
	background: linear-gradient(135deg, #d9bf83 0%, #8a7239 45%, #b89b5e 55%, #e7d3a1 100%);
	border-radius: 18px;
	box-shadow: 0 20px 50px -12px rgba(27, 58, 92, 0.35), 0 0 0 1px rgba(184, 155, 94, 0.4);
}

.sa-certificate[hidden] {
	display: none;
}

.sa-certificate-inner {
	position: relative;
	display: grid;
	grid-template-columns: 34% 1px 1fr;
	align-items: center;
	background: #fbfaf7;
	background-image:
		radial-gradient(circle at 20% 50%, rgba(184, 155, 94, 0.08), transparent 55%),
		repeating-linear-gradient(135deg, rgba(27, 58, 92, 0.015) 0px, rgba(27, 58, 92, 0.015) 1px, transparent 1px, transparent 6px);
	border-radius: 16px;
	padding: 44px 40px;
	overflow: hidden;
}

.sa-certificate-brand {
	text-align: center;
	padding-right: 32px;
}

.sa-certificate-body {
	padding-left: 32px;
	text-align: left;
}

.sa-certificate-corner {
	position: absolute;
	width: 56px;
	height: 56px;
	border: 2px solid #b89b5e;
	opacity: 0.6;
}

.sa-certificate-corner-tl {
	top: 14px;
	left: 14px;
	border-right: none;
	border-bottom: none;
	border-top-left-radius: 8px;
}

.sa-certificate-corner-tr {
	top: 14px;
	right: 14px;
	border-left: none;
	border-bottom: none;
	border-top-right-radius: 8px;
}

.sa-certificate-corner-bl {
	bottom: 14px;
	left: 14px;
	border-right: none;
	border-top: none;
	border-bottom-left-radius: 8px;
}

.sa-certificate-corner-br {
	bottom: 14px;
	right: 14px;
	border-left: none;
	border-top: none;
	border-bottom-right-radius: 8px;
}

.sa-certificate-logo {
	max-width: 56px;
	max-height: 56px;
	margin: 0 auto 10px;
	display: block;
}

.sa-certificate-org {
	margin: 0 0 28px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #6b7280;
}

.sa-certificate-seal {
	width: 104px;
	height: 104px;
	margin: 0 auto 24px;
	filter: drop-shadow(0 8px 16px rgba(184, 155, 94, 0.4));
}

.sa-certificate-seal svg {
	width: 100%;
	height: 100%;
}

.sa-seal-ring-outer {
	fill: none;
	stroke: #b89b5e;
	stroke-width: 2.5;
}

.sa-seal-ring-inner {
	fill: #1b3a5c;
	stroke: #b89b5e;
	stroke-width: 1.5;
}

.sa-seal-check {
	fill: none;
	stroke: #ffffff;
	stroke-width: 6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.sa-certificate-title {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 32px;
	font-weight: 400;
	color: #1b3a5c;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.sa-certificate-title em {
	font-style: italic;
	color: #8a7239;
}

.sa-certificate-message {
	margin: 0 0 24px;
	font-size: 14px;
	color: #6b7280;
	line-height: 1.6;
}

.sa-certificate-divider {
	align-self: stretch;
	width: 1px;
	margin: 0 4px;
	background: linear-gradient(180deg, transparent, #b89b5e, transparent);
}

.sa-certificate-details {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 18px 28px;
	margin: 0 0 28px;
	text-align: left;
}

.sa-certificate-details:empty {
	display: none;
	margin: 0;
}

.sa-certificate-details dt {
	margin: 0 0 3px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #8a7239;
}

.sa-certificate-details dd {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #1b3a5c;
	line-height: 1.3;
}

.sa-certificate-serial {
	margin: 0 0 24px;
	padding: 20px 24px;
	background: #1b3a5c;
	background-image: linear-gradient(135deg, #1b3a5c 0%, #142c47 100%);
	border-radius: 12px;
	color: #ffffff;
}

.sa-certificate-serial-label {
	display: block;
	margin-bottom: 8px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #d9bf83;
}

.sa-certificate-serial-value {
	display: block;
	font-family: "Courier New", monospace;
	font-size: 28px;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.2;
	word-break: break-all;
}

.sa-certificate-footer {
	margin: 0 0 20px;
	font-size: 11px;
	font-style: italic;
	color: #9ca3af;
}

.sa-certificate-footer:empty {
	display: none;
	margin: 0;
}

.sa-certificate-reset-wrap {
	margin: 30px 0;
	text-align: center;
}

.sa-certificate-reset-wrap[hidden] {
	display: none;
}

@media (max-width: 700px) {
	.sa-certificate-inner {
		grid-template-columns: 1fr;
		padding: 36px 28px 28px;
	}

	.sa-certificate-brand {
		padding-right: 0;
		margin-bottom: 28px;
	}

	.sa-certificate-logo {
		max-width: 48px;
		max-height: 48px;
	}

	.sa-certificate-seal {
		width: 88px;
		height: 88px;
		margin: 0 auto 20px;
	}

	.sa-certificate-title {
		font-size: 26px;
	}

	.sa-certificate-divider {
		width: auto;
		height: 1px;
		margin: 0 0 24px;
		background: linear-gradient(90deg, transparent, #b89b5e, transparent);
	}

	.sa-certificate-body {
		padding-left: 0;
		text-align: center;
	}

	.sa-certificate-details {
		text-align: left;
	}

	.sa-certificate-serial-value {
		font-size: 22px;
	}
}

@media (max-width: 480px) {
	.sa-certificate-inner {
		padding: 32px 20px 24px;
	}

	.sa-certificate-title {
		font-size: 22px;
	}

	.sa-certificate-seal {
		width: 76px;
		height: 76px;
	}

	.sa-certificate-details {
		gap: 14px 16px;
	}

	.sa-certificate-details dd {
		font-size: 15px;
	}

	.sa-certificate-serial {
		padding: 16px 18px;
	}

	.sa-certificate-serial-value {
		font-size: 18px;
	}
}

.sa-verify-form .sa-field-help {
	display: block;
	margin-top: 0.25em;
	font-size: 0.85em;
	color: #6b7280;
}
