/*
 * NovoVerify check form.
 * Every selector is prefixed with .novoverify- so themes and page
 * builders are not affected.
 * Logical properties keep the layout correct in right-to-left languages.
 */

.novoverify-check {
	--novoverify-primary: #1d4ed8;
	--novoverify-text: #1f2937;
	--novoverify-muted: #4b5563;
	--novoverify-border: #d1d5db;
	--novoverify-surface: #fff;
	--novoverify-radius: 14px;
	--novoverify-focus: 0 0 0 3px #fff, 0 0 0 5px var(--novoverify-primary);

	box-sizing: border-box;
	margin-block: 1.5rem;
	color: var(--novoverify-text);
	font-size: 1rem;
	line-height: 1.55;
	text-align: start;
}

.novoverify-check.alignwide .novoverify-check__card,
.novoverify-check.alignfull .novoverify-check__card {
	max-inline-size: none;
}

.novoverify-check *,
.novoverify-check *::before,
.novoverify-check *::after {
	box-sizing: inherit;
}

/*
 * The width limit sits on the inner card, so theme rules for
 * content blocks cannot stretch it.
 */
.novoverify-check__card {
	max-inline-size: 36rem;
	margin-inline: auto;
	background: var(--novoverify-surface);
	border: 1px solid #e5e7eb;
	border-radius: var(--novoverify-radius);
	box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05), 0 8px 24px rgba(17, 24, 39, 0.06);
	padding: clamp(1.25rem, 4vw, 2rem);
}

.novoverify-check .novoverify-check__title {
	margin: 0 0 0.35rem;
	padding: 0;
	color: var(--novoverify-text);
	font-size: clamp(1.25rem, 3.5vw, 1.5rem);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	text-transform: none;
}

.novoverify-check .novoverify-check__description {
	margin: 0 0 1.25rem;
	color: var(--novoverify-muted);
	font-size: 0.95rem;
}

.novoverify-check__form {
	margin: 0;
}

.novoverify-check .novoverify-check__label {
	display: block;
	margin-block-end: 0.4rem;
	color: var(--novoverify-text);
	font-size: 0.9rem;
	font-weight: 600;
}

.novoverify-check__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.novoverify-check .novoverify-check__input {
	flex: 1 1 14rem;
	min-inline-size: 0;
	min-block-size: max(3rem, 44px);
	margin: 0;
	padding-block: 0.6rem;
	padding-inline: 0.9rem;
	border: 1.5px solid var(--novoverify-border);
	border-radius: calc(var(--novoverify-radius) - 4px);
	background: #fff;
	color: var(--novoverify-text);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-size: 1.1rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	box-shadow: none;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.novoverify-check .novoverify-check__input::placeholder {
	color: #6b7280;
	text-transform: none;
	letter-spacing: normal;
}

.novoverify-check .novoverify-check__input:focus {
	border-color: var(--novoverify-primary);
	box-shadow: var(--novoverify-focus);
}

.novoverify-check .novoverify-check__input[aria-invalid="true"] {
	border-color: #b42318;
}

.novoverify-check .novoverify-check__button,
.novoverify-check .novoverify-result__again {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	border: 0;
	border-radius: calc(var(--novoverify-radius) - 4px);
	font-family: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
	transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.novoverify-check .novoverify-check__button {
	flex: 0 0 auto;
	min-block-size: max(3rem, 44px);
	padding-block: 0.6rem;
	padding-inline: 1.4rem;
	background: var(--novoverify-primary);
	color: #fff;
	font-size: 1rem;
}

/*
 * Hover and focus repeat the colors so theme and page builder
 * button styles cannot replace them.
 */
.novoverify-check .novoverify-check__button:hover,
.novoverify-check .novoverify-check__button:focus,
.novoverify-check .novoverify-check__button:active {
	background: var(--novoverify-primary);
	color: #fff;
}

.novoverify-check .novoverify-check__button:hover {
	filter: brightness(0.92);
}

.novoverify-check .novoverify-check__button:focus-visible,
.novoverify-check .novoverify-result__again:focus-visible {
	outline: none;
	box-shadow: var(--novoverify-focus);
}

.novoverify-check .novoverify-check__button:disabled {
	cursor: progress;
	opacity: 0.8;
}

.novoverify-check .novoverify-check__hint {
	margin: 0.45rem 0 0;
	color: var(--novoverify-muted);
	font-size: 0.85rem;
}

/* Honeypot: off screen for people, still in the form for bots. */
.novoverify-check__hp {
	position: absolute;
	inset-inline-start: -10000px;
	inline-size: 1px;
	block-size: 1px;
	overflow: hidden;
}

.novoverify-check__noscript {
	margin: 1rem 0 0;
	color: #b42318;
}

@media (max-width: 30rem) {

	.novoverify-check .novoverify-check__button {
		flex-basis: 100%;
	}
}

/* Result */
.novoverify-check__result:empty {
	display: none;
}

.novoverify-check__result {
	margin-block-start: 1.25rem;
}

.novoverify-result {
	--novoverify-state: #374151;
	--novoverify-state-bg: #f3f4f6;
	--novoverify-state-border: #d1d5db;

	display: flex;
	gap: 0.9rem;
	align-items: flex-start;
	padding: 1rem 1.1rem;
	border: 1px solid var(--novoverify-state-border);
	border-inline-start-width: 5px;
	border-inline-start-color: var(--novoverify-state);
	border-radius: calc(var(--novoverify-radius) - 4px);
	background: var(--novoverify-state-bg);
	animation: novoverify-in 0.25s ease-out;
}

.novoverify-result--authentic {
	--novoverify-state: #0a6b33;
	--novoverify-state-bg: #ecfdf3;
	--novoverify-state-border: #abefc6;
}

.novoverify-result--checked-before {
	--novoverify-state: #8a4b00;
	--novoverify-state-bg: #fffaeb;
	--novoverify-state-border: #fedf89;
}

.novoverify-result--suspicious {
	--novoverify-state: #a12d0b;
	--novoverify-state-bg: #fff4ed;
	--novoverify-state-border: #f9b994;
}

.novoverify-result--invalid,
.novoverify-result--error {
	--novoverify-state: #a8180f;
	--novoverify-state-bg: #fef3f2;
	--novoverify-state-border: #fecdca;
}

.novoverify-result--revoked {
	--novoverify-state: #3f3f46;
	--novoverify-state-bg: #f4f4f5;
	--novoverify-state-border: #d4d4d8;
}

.novoverify-result__icon {
	flex: 0 0 auto;
	inline-size: 2.5rem;
	block-size: 2.5rem;
	color: var(--novoverify-state);
}

.novoverify-result__icon svg {
	display: block;
	inline-size: 100%;
	block-size: 100%;
}

.novoverify-result__body {
	flex: 1 1 auto;
	min-inline-size: 0;
}

.novoverify-check .novoverify-result__title {
	margin: 0.15rem 0 0.25rem;
	color: var(--novoverify-state);
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.3;
}

.novoverify-check .novoverify-result__message {
	margin: 0;
	color: var(--novoverify-text);
	font-size: 0.95rem;
}

.novoverify-check .novoverify-result__details {
	display: grid;
	gap: 0.25rem;
	margin: 0.75rem 0 0;
	padding: 0;
	font-size: 0.9rem;
}

.novoverify-result__detail {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: 0.4rem;
}

.novoverify-check .novoverify-result__detail dt {
	margin: 0;
	color: var(--novoverify-muted);
	font-weight: 600;
}

.novoverify-check .novoverify-result__detail dt::after {
	content: ":";
}

.novoverify-check .novoverify-result__detail dd {
	margin: 0;
	color: var(--novoverify-text);
	overflow-wrap: anywhere;
}

.novoverify-check .novoverify-result__again {
	margin-block-start: 0.85rem;
	padding-block: 0.45rem;
	padding-inline: 0.9rem;
	border: 1.5px solid var(--novoverify-state);
	background: transparent;
	color: var(--novoverify-state);
	font-size: 0.9rem;
}

.novoverify-check .novoverify-result__again:hover,
.novoverify-check .novoverify-result__again:focus,
.novoverify-check .novoverify-result__again:active {
	border-color: var(--novoverify-state);
	background: rgba(255, 255, 255, 0.6);
	color: var(--novoverify-state);
}

.novoverify-check .novoverify-check__logo {
	display: block;
	max-inline-size: 160px;
	max-block-size: 56px;
	inline-size: auto;
	block-size: auto;
	margin-block-end: 1rem;
}

.novoverify-check .novoverify-result__image {
	display: block;
	max-inline-size: min(100%, 220px);
	block-size: auto;
	margin-block: 0.75rem 0;
	border-radius: calc(var(--novoverify-radius) - 6px);
	background: #fff;
}

.novoverify-check .novoverify-result__links {
	margin: 0.75rem 0 0;
}

.novoverify-check .novoverify-result__link {
	color: var(--novoverify-state);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.novoverify-check .novoverify-result__link + .novoverify-result__link {
	margin-inline-start: 1rem;
}

@keyframes novoverify-in {

	from {
		opacity: 0;
		transform: translateY(4px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {

	.novoverify-result,
	.novoverify-check .novoverify-check__input,
	.novoverify-check .novoverify-check__button {
		animation: none;
		transition: none;
	}
}

@media (forced-colors: active) {

	.novoverify-result {
		border: 2px solid CanvasText;
	}
}
