/**
 * Product Authenticity Verification - Scoped Frontend Shortcode Styles
 * Strictly scoped under .pv-verify to remain independent of any theme or page builder.
 */

.pv-verify {
	--pv-accent: #1d4ed8;
	--pv-surface: #ffffff;
	--pv-surface-subtle: #f8fafc;
	--pv-border: #cbd5e1;
	--pv-border-subtle: #e2e8f0;
	--pv-text: #0f172a;
	--pv-text-muted: #475569;
	--pv-radius: 8px;
	--pv-success-bg: #ecfdf5;
	--pv-success-border: #a7f3d0;
	--pv-success-accent: #047857;
	--pv-success-text: #065f46;
	--pv-warning-bg: #fffbeb;
	--pv-warning-border: #fde68a;
	--pv-warning-accent: #b45309;
	--pv-warning-text: #92400e;
	--pv-error-bg: #fef2f2;
	--pv-error-border: #fecaca;
	--pv-error-accent: #b91c1c;
	--pv-error-text: #991b1b;
	width: 100%;
	max-width: 100%;
	font-family: inherit;
	color: var(--pv-text);
	text-align: start;
	line-height: 1.5;
}

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

.pv-verify [hidden] {
	display: none !important;
}

.pv-verify .pv-verify__form {
	margin: 0;
	padding: 0;
}

.pv-verify .pv-verify__field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.pv-verify .pv-verify__label {
	display: block;
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--pv-text);
}

.pv-verify .pv-verify__controls {
	display: flex;
	align-items: stretch;
	gap: 10px;
	width: 100%;
}

.pv-verify .pv-verify__input {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 10px 14px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 15px;
	line-height: 1.4;
	color: var(--pv-text);
	background: var(--pv-surface);
	border: 1px solid var(--pv-border);
	border-radius: var(--pv-radius);
	direction: ltr;
	unicode-bidi: isolate;
	text-align: left;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	appearance: none;
}

.pv-verify--rtl .pv-verify__input::placeholder {
	direction: rtl;
	text-align: right;
	font-family: inherit;
}

.pv-verify .pv-verify__input:focus {
	outline: none;
	border-color: var(--pv-accent);
	box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--pv-accent) 22%, transparent);
}

.pv-verify .pv-verify__button {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	margin: 0;
	padding: 10px 22px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: #ffffff;
	background: var(--pv-accent);
	border: 1px solid var(--pv-accent);
	border-radius: var(--pv-radius);
	cursor: pointer;
	white-space: nowrap;
	transition: filter 0.15s ease, opacity 0.15s ease;
}

.pv-verify .pv-verify__button:hover:not(:disabled) {
	filter: brightness(0.92);
}

.pv-verify .pv-verify__button:focus-visible {
	outline: 2px solid var(--pv-accent);
	outline-offset: 2px;
}

.pv-verify .pv-verify__button:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.pv-verify .pv-verify__spinner {
	display: none;
	width: 15px;
	height: 15px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: pv-verify-spin 0.65s linear infinite;
}

.pv-verify .pv-verify__button.is-loading .pv-verify__spinner {
	display: inline-block;
}

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

.pv-verify .pv-verify__help {
	margin: 0;
	font-size: 13px;
	color: var(--pv-text-muted);
}

.pv-verify .pv-verify__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

/* Result Container */
.pv-verify .pv-verify__result {
	margin-top: 16px;
	padding: 16px 18px;
	border: 1px solid var(--pv-border-subtle);
	border-inline-start-width: 4px;
	border-radius: var(--pv-radius);
	background: var(--pv-surface-subtle);
}

.pv-verify .pv-verify__result--registered {
	background: var(--pv-success-bg);
	border-color: var(--pv-success-border);
	border-inline-start-color: var(--pv-success-accent);
	color: var(--pv-success-text);
}

.pv-verify .pv-verify__result--inactive {
	background: var(--pv-warning-bg);
	border-color: var(--pv-warning-border);
	border-inline-start-color: var(--pv-warning-accent);
	color: var(--pv-warning-text);
}

.pv-verify .pv-verify__result--not_found,
.pv-verify .pv-verify__result--validation_error,
.pv-verify .pv-verify__result--rate_limited,
.pv-verify .pv-verify__result--error {
	background: var(--pv-error-bg);
	border-color: var(--pv-error-border);
	border-inline-start-color: var(--pv-error-accent);
	color: var(--pv-error-text);
}

.pv-verify .pv-verify__result-title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: inherit;
}

.pv-verify .pv-verify__result-message {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: inherit;
}

.pv-verify .pv-verify__details {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 6px 14px;
	margin: 12px 0 0;
	padding: 12px 0 0;
	border-top: 1px solid rgba(15, 23, 42, 0.1);
	font-size: 13px;
}

.pv-verify .pv-verify__details dt {
	margin: 0;
	font-weight: 600;
	color: inherit;
	opacity: 0.85;
}

.pv-verify .pv-verify__details dd {
	margin: 0;
	font-weight: 500;
	color: inherit;
	word-break: break-word;
}

.pv-verify .pv-verify__serial-value {
	display: inline-block;
	padding: 1px 6px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 13px;
	background: rgba(255, 255, 255, 0.65);
	border: 1px solid rgba(15, 23, 42, 0.12);
	border-radius: 4px;
	direction: ltr;
	unicode-bidi: isolate;
}

.pv-verify .pv-verify__disclaimer {
	margin: 12px 0 0;
	padding: 10px 0 0;
	border-top: 1px solid rgba(15, 23, 42, 0.1);
	font-size: 12px;
	line-height: 1.55;
	color: inherit;
	opacity: 0.9;
}

@media (max-width: 560px) {
	.pv-verify .pv-verify__controls {
		flex-direction: column;
	}

	.pv-verify .pv-verify__button {
		width: 100%;
	}

	.pv-verify .pv-verify__details {
		grid-template-columns: 1fr;
		gap: 2px;
	}

	.pv-verify .pv-verify__details dd {
		margin-bottom: 6px;
	}
}

/* Two factory-labelled component inputs */
.pv-verify .pv-verify__fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-bottom:12px; }
.pv-verify .pv-verify__form > .pv-verify__button { margin-top:16px; width:100%; }
.pv-verify .pv-verify__result--components { background:transparent; border:0; padding:0; }
.pv-verify .pv-verify__component { border:1px solid var(--pv-border); border-inline-start-width:4px; border-radius:var(--pv-radius); padding:16px 18px; margin-top:12px; }
.pv-verify .pv-verify__component.pv-verify__result--registered { background:var(--pv-success-bg); border-color:var(--pv-success-border); border-inline-start-color:var(--pv-success-accent); color:var(--pv-success-text); }
.pv-verify .pv-verify__component.pv-verify__result--inactive { background:var(--pv-warning-bg); border-color:var(--pv-warning-border); border-inline-start-color:var(--pv-warning-accent); color:var(--pv-warning-text); }
.pv-verify .pv-verify__component.pv-verify__result--not_found, .pv-verify .pv-verify__component.pv-verify__result--error { background:var(--pv-error-bg); border-color:var(--pv-error-border); border-inline-start-color:var(--pv-error-accent); color:var(--pv-error-text); }
.pv-verify--rtl .pv-verify__label { text-align:right; }
@media(max-width:560px) { .pv-verify .pv-verify__fields { grid-template-columns:1fr; } }

/* A single bilingual authenticity notice beneath component results. */
.pv-verify .pv-verify__component-notice {
	margin: 12px 0 0;
	padding: 10px 12px;
	font-size: 12px;
	line-height: 1.6;
	color: var(--pv-text-muted);
	background: var(--pv-surface-subtle);
	border: 1px solid var(--pv-border-subtle);
	border-radius: var(--pv-radius);
}
