/* Verify a batch (/check/). Owner: verify area. Mobile first.
   Figma: Verify — Mobile 32730:1680, Desktop 32740:2463, result states 32731:1862.
   Status colours: success uses --stock-in-t, error uses --stock-out-t (tokens have no separate status pair). */

.vfy { background: var(--wash); }
.vfy-star { color: var(--accent); }

/* ---------- Section headings ---------- */
.vfy-sechead { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-bottom: 32px; text-align: center; }
.vfy-sechead__lead { max-width: 640px; margin: 0; font-size: 18px; line-height: 1.2; }

/* ---------- Lookup ---------- */
.vfy-lookup { padding: 32px 0 64px; }
.vfy-lookup__inner { display: flex; flex-direction: column; gap: 32px; max-width: 720px; }
.vfy-head { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.vfy-head__title { font: 400 42px/.86 var(--font-display); letter-spacing: -.05em; }
.vfy-head__lead { margin: 0; font-size: 18px; line-height: 1.2; text-wrap: pretty; }

.vfy-form {
	display: flex; flex-direction: column; gap: 16px; padding: 24px;
	border-radius: var(--r-img); background: var(--paper); box-shadow: var(--sh);
}
.vfy-field { display: flex; flex-direction: column; gap: 8px; }
.vfy-field__label { font-size: 14px; line-height: 1.2; }
.vfy-field__input {
	width: 100%; min-height: 48px; padding: 12px; border: 1px solid var(--line); border-radius: 6px;
	background: var(--wash); font-size: 16px; line-height: 1.3; letter-spacing: .02em;
	text-transform: uppercase; font-variant-numeric: tabular-nums;
}
.vfy-field__input::placeholder { color: var(--ink-70); text-transform: none; letter-spacing: 0; }
.vfy-field__input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.vfy-field__input[aria-invalid="true"] { border: 1.5px solid var(--stock-out-t); }
.vfy-field__help { display: flex; gap: 6px; margin: 0; color: var(--stock-out-t); font-size: 12px; line-height: 1.3; }
.vfy-field__help[hidden] { display: none; }
.vfy-field__icon { flex: none; width: 14px; height: 14px; margin-top: 1px; }
.vfy-form__btn { width: 100%; min-height: 48px; }
.vfy-spinner { display: none; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: vfy-spin .8s linear infinite; }
.vfy-form[aria-busy="true"] .vfy-spinner { display: block; }
.vfy-form[aria-busy="true"] .vfy-form__btn .btn__icon { display: none; }
.vfy-form[aria-busy="true"] .vfy-form__btn { pointer-events: none; }
@keyframes vfy-spin { to { transform: rotate(360deg); } }

.vfy-result:empty { display: none; }
.vfy-code { font: inherit; font-weight: 500; letter-spacing: .02em; white-space: nowrap; }

/* ---------- Result panel ---------- */
.vfy-panel {
	display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px;
	border: 1px solid var(--line); border-radius: var(--r-card); background: var(--paper);
}
.vfy-panel:focus { outline: none; }
.vfy-panel--ok { gap: 24px; border-color: var(--stock-in-t); }
.vfy-panel--error { border-color: var(--stock-out-t); }
.vfy-panel--warn { border: 1.5px solid var(--accent); }
.vfy-panel__head { display: flex; align-items: center; gap: 16px; width: 100%; }
.vfy-panel__title { font: 500 20px/24px var(--font-display); letter-spacing: -.03em; }
.vfy-panel__title--lg { font-size: 28px; line-height: .96; }
.vfy-panel__lead { margin: -8px 0 0; font-size: 18px; line-height: 1.2; }
.vfy-panel__text { margin: 0; font-size: 14px; line-height: 1.3; }
.vfy-panel__hint { margin: 0; color: var(--ink-70); font-size: 12px; line-height: 1.3; }
.vfy-panel__strong { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.2; }
.vfy-panel .btn--sm { min-height: 44px; padding-inline: 20px; }
.vfy-panel__files { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.vfy-panel__btn { min-height: 48px; text-align: center; white-space: normal; }

.vfy-dot { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
.vfy-dot__svg { width: 20px; height: 20px; }
.vfy-dot--ok { background: var(--stock-in-t); color: var(--paper); }
.vfy-dot--error { background: var(--stock-out-t); color: var(--paper); }
.vfy-dot--warn { background: var(--orange-100); color: var(--ink); }

.vfy-panel__grid { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.vfy-product {
	display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px;
	border: 1px solid var(--line); border-radius: var(--r-img); text-decoration: none;
}
.vfy-product__img { flex: none; width: 64px; height: 64px; border-radius: 8px; background: var(--grad-tile); object-fit: cover; }
.vfy-product__text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.vfy-product__label { color: var(--ink-70); font-size: 12px; line-height: 1.3; }
.vfy-product__name { font: 500 20px/24px var(--font-display); letter-spacing: -.03em; }
.vfy-product__arrow { flex: none; width: 18px; height: 18px; color: var(--accent); }

.vfy-facts { display: grid; align-content: start; gap: 0; margin: 0; }
.vfy-facts__row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.3; }
.vfy-facts__row:first-child { padding-top: 0; }
.vfy-facts dt { color: var(--ink-70); }
.vfy-facts dd { flex: none; max-width: 62%; margin: 0; font-weight: 500; text-align: end; }

.vfy-checks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.vfy-checks__row {
	display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
	padding: 10px 12px; border-radius: var(--r-img); background: var(--wash); font-size: 14px; line-height: 1.3;
}
.vfy-checks__icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--stock-in-t); color: var(--paper); }
.vfy-checks__svg { width: 14px; height: 14px; }
.vfy-checks__value { font-weight: 500; text-align: end; }
.vfy-checks__note { display: block; font-weight: 400; font-size: 13px; color: var(--ink-70); }
.vfy-checks__icon--warn { background: var(--orange-100); color: var(--ink); }
.vfy-checks__sub { grid-column: 2 / -1; display: grid; gap: 6px; margin: 0; }
.vfy-checks__subrow { display: flex; justify-content: space-between; gap: 12px; }
.vfy-checks__subrow dt { min-width: 0; color: var(--ink-70); }
.vfy-checks__subrow dd { flex: none; margin: 0; font-weight: 500; text-align: end; }

.vfy-btn-wash { background: var(--wash); color: var(--ink); }
.vfy-btn-wash:hover { color: var(--ink); }

/* Loading skeleton */
.vfy-skel { gap: 14px; }
.vfy-skel > span { display: block; border-radius: 6px; background: var(--wash); }
.vfy-skel__head { width: 60%; height: 40px; border-radius: 20px !important; }
.vfy-skel__line { width: 100%; height: 14px; }
.vfy-skel__line--short { width: 66%; }
.vfy-skel__rule { width: 100%; height: 1px; background: var(--line) !important; }
@media (prefers-reduced-motion: no-preference) {
	.vfy-skel > span { animation: vfy-pulse 1.2s ease-in-out infinite alternate; }
	.vfy-panel:not(.vfy-skel) { animation: vfy-in .4s var(--ease); }
}
@keyframes vfy-pulse { to { opacity: .5; } }
@keyframes vfy-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- How to find the lot number ---------- */
.vfy-how { padding: 0; }
.vfy-how__panel { padding: 64px 16px; background: var(--paper); }
.vfy-how__grid { display: flex; flex-direction: column; gap: 24px; width: min(1180px, 100%); margin-inline: auto; }
.vfy-diagram { margin: 0; padding: 16px; border-radius: var(--r-card); background: var(--wash); }
.vfy-diagram__svg { width: 100%; height: auto; aspect-ratio: 560 / 448; }
.vfy-diagram .lbl-line { fill: var(--paper); stroke: var(--ink-80); stroke-width: 2; stroke-linejoin: round; }
.vfy-diagram .lbl-cap { fill: var(--ink-80); }
.vfy-diagram .lbl-label { fill: var(--paper); stroke: var(--ink-80); stroke-width: 2; }
.vfy-diagram .lbl-bar, .vfy-diagram .lbl-barcode rect { fill: var(--line-2); }
.vfy-diagram .lbl-brand { font: 500 18px var(--font-display); letter-spacing: .08em; fill: var(--ink); }
.vfy-diagram .lbl-lot { font: 500 12px var(--font-text); fill: var(--ink); }
.vfy-diagram .lbl-hi { fill: var(--wash-accent); stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 6 4; }
.vfy-diagram .lbl-caption { font: 500 16px var(--font-text); fill: var(--ink-70); }
@media (prefers-reduced-motion: no-preference) {
	.vfy-how:has(.vfy-step--1:hover) .lbl-hi { animation: vfy-pulse .6s ease-in-out 2 alternate; }
}

.vfy-steps { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.vfy-step { display: flex; align-items: flex-start; gap: 16px; padding-block: 16px; border-top: 1px solid var(--line); }
.vfy-step:first-child { border-top: 0; padding-top: 0; }
.vfy-step__n {
	display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 50%;
	background: var(--orange-100); font: 500 20px/20px var(--font-display); letter-spacing: -.03em;
}
.vfy-step--2 .vfy-step__n { background: var(--orange-300); }
.vfy-step--3 .vfy-step__n { background: var(--accent); color: var(--paper); }
.vfy-step__body { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.vfy-step__title { font: 500 20px/24px var(--font-display); letter-spacing: -.03em; }
.vfy-step__text { font-size: 14px; line-height: 1.2; }

/* ---------- What we test ---------- */
.vfy-tests { padding-block: 64px; }
.vfy-tests__grid { display: flex; flex-direction: column; gap: 12px; }
.vfy-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.vfy-tile {
	display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px;
	border: 1px solid var(--line); border-radius: var(--r-card); background: var(--paper);
}
/* .vfy-tile__icon is an .icon-circle (base.css) */
.vfy-tile--2 .vfy-tile__icon { background: var(--orange-200); }
.vfy-tile--3 .vfy-tile__icon { background: var(--orange-300); }
.vfy-tile--4 .vfy-tile__icon { background: var(--orange-400); }
.vfy-tile__title { font: 500 18px/1.2 var(--font-text); }
.vfy-tile__sub { color: var(--ink-70); font-size: 14px; line-height: 1.2; }

.vfy-dark {
	display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 32px 24px;
	border-radius: var(--r-card); background: var(--ink); color: var(--paper);
}
.vfy-dark__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--paper); }
.vfy-dark__svg { width: 24px; height: 24px; }
.vfy-dark__title { font: 500 28px/.96 var(--font-display); letter-spacing: -.03em; }
.vfy-dark__text { position: relative; margin: 0; padding-left: 17px; color: var(--on-dark); font-size: 18px; line-height: 1.2; }
.vfy-dark__text::before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ---------- Signs a product may not be genuine ---------- */
.vfy-signs { padding-block: 64px; background: var(--paper); }
.vfy-signs__list { margin: 0; padding: 0; list-style: none; }
.vfy-sign { display: flex; align-items: center; gap: 16px; padding-block: 16px; border-top: 1px solid var(--line); font-size: 18px; line-height: 1.2; }
.vfy-sign:last-child { border-bottom: 1px solid var(--line); }
.vfy-signs__cta { display: flex; justify-content: center; margin: 32px 0 0; }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
	.vfy-form { flex-direction: row; align-items: flex-start; padding: 24px; }
	.vfy-field { flex: 1; }
	.vfy-form__btn { width: auto; margin-top: 25px; }
	.vfy-panel__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; }
	.vfy-product { grid-column: 1 / -1; }
	.vfy-panel__files { flex-direction: row; flex-wrap: wrap; }
	.vfy-panel__btn { flex: 1 1 auto; }
	.vfy-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.vfy-signs__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.vfy-sign, .vfy-sign:last-child { border: 0; }
	.vfy-sign { flex-direction: column; align-items: flex-start; padding: 24px; border: 0; border-radius: var(--r-card); background: var(--paper); }
	.vfy-signs { background: var(--wash); }
}

/* ---------- Desktop ---------- */
@media (min-width: 860px) {
	.vfy-lookup { padding: 80px 0 120px; }
	.vfy-head__title { font-size: clamp(42px, 4.8vw, 64px); }
	.vfy-sechead { gap: 20px; margin-bottom: 64px; }
	.vfy-how { padding-inline: 16px; }
	.vfy-how__panel { padding: 96px 48px 120px; border-radius: var(--r-xl); }
	.vfy-how__grid { display: grid; grid-template-columns: minmax(0, 560fr) minmax(0, 560fr); align-items: center; gap: 64px; }
	.vfy-tests, .vfy-signs { padding-block: 120px; }
	.vfy-signs { padding-top: 0; }
	.vfy-tests__grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: stretch; }
	.vfy-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.vfy-dark { justify-content: center; padding: 32px; }
	.vfy-signs__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
