/**
 * COA lookup page template (templates/coa-lookup.php).
 * Vocabulary transcribed from shop-desktop.html (title block, result rows,
 * empty state) and login-gate.html (search card, field labels).
 */

.bm-coa {
	padding-bottom: 48px;
}

/* ------------------------------------------------------------------ *
 * Title block
 * ------------------------------------------------------------------ */

.bm-coa__head {
	padding: 36px 0 24px;
}

/* The title block is the shop-desktop.html title block, whose kicker sits at
   10px — 2px looser than the base .bm-kicker. Matches .bm-catalog__title. */
.bm-coa__head .bm-kicker {
	margin-bottom: 10px;
}

.bm-coa__title {
	font-size: clamp(28px, 4vw, 40px);
	font-weight: 600;
	letter-spacing: -0.025em;
	line-height: 1.05;
	margin: 0 0 8px;
}

.bm-coa__sub {
	font-size: 15px;
	color: var(--bm-text-soft);
	max-width: 560px;
}

.bm-coa__sub p {
	margin: 0;
}

/* ------------------------------------------------------------------ *
 * Search card
 * ------------------------------------------------------------------ */

.bm-coa-card {
	background: var(--bm-surface);
	border: 1px solid var(--bm-border);
	border-radius: var(--bm-r-5xl);
	padding: clamp(28px, 4vw, 48px);
}

.bm-coa-form {
	display: flex;
	align-items: flex-end;
	gap: 12px;
}

.bm-coa-form__field {
	flex: 1;
	min-width: 0;
}

/* The lookup field is the page's primary control — 50px, taller than the base input. */
.bm-coa-form .bm-input {
	height: 50px;
}

.bm-coa-form__submit {
	height: 50px;
	flex: none;
}

/* ------------------------------------------------------------------ *
 * "Batches on file" chips
 * ------------------------------------------------------------------ */

.bm-coa-hint {
	margin-top: 22px;
	padding-top: 20px;
	border-top: 1px solid var(--bm-border-faint);
}

.bm-coa-hint__label {
	font-family: var(--bm-mono);
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--bm-text-muted);
	margin-bottom: 10px;
}

.bm-coa-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.bm-coa-chip {
	display: inline-block;
	font-family: var(--bm-mono);
	font-size: 11.5px;
	font-weight: 500;
	line-height: 1.5;
	padding: 4px 10px;
	border: 1px solid var(--bm-border-strong);
	border-radius: 7px;
	background: var(--bm-surface);
	color: var(--bm-text-mid);
	white-space: nowrap;
	transition: border-color var(--bm-t), color var(--bm-t), background var(--bm-t);
}

a.bm-coa-chip:hover,
a.bm-coa-chip:focus {
	border-color: var(--bm-teal);
	background: var(--bm-teal-tint-05);
	color: var(--bm-teal-hover);
}

.bm-coa-chip.is-active,
a.bm-coa-chip.is-active:hover {
	background: var(--bm-teal);
	border-color: var(--bm-teal);
	color: #fff;
}

.bm-coa-chip--static {
	background: var(--bm-surface-sunken);
	border-color: var(--bm-border-faint);
	color: var(--bm-text-soft-2);
}

/* ------------------------------------------------------------------ *
 * Results
 * ------------------------------------------------------------------ */

.bm-coa-results {
	margin-top: 28px;
}

.bm-coa-results__count {
	font-family: var(--bm-mono);
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--bm-text-muted);
	padding: 0 4px 12px;
}

.bm-coa-result {
	display: flex;
	align-items: center;
	gap: 18px;
	background: var(--bm-surface);
	border: 1px solid var(--bm-border);
	border-radius: var(--bm-r-3xl);
	padding: 18px 20px;
	transition: box-shadow var(--bm-t), border-color var(--bm-t);
}

.bm-coa-result:hover {
	box-shadow: var(--bm-shadow-row);
	border-color: #D6E1E6; /* Row hover border from shop-desktop.html — no token. */
}

.bm-coa-result + .bm-coa-result {
	margin-top: 10px;
}

.bm-coa-result__media {
	flex: none;
	display: block;
}

.bm-coa-result__img {
	width: 76px;
	height: 76px;
	border-radius: 13px;
	border: 1px solid var(--bm-border-faintest);
}

.bm-coa-result__body {
	flex: 1;
	min-width: 0;
}

.bm-coa-result__name {
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.3;
	margin: 0;
}

.bm-coa-result__name a {
	color: var(--bm-ink);
}

.bm-coa-result__name a:hover {
	color: var(--bm-teal);
}

.bm-coa-result__meta {
	font-family: var(--bm-mono);
	font-size: 11.5px;
	color: var(--bm-text-muted);
	margin-top: 3px;
}

.bm-coa-result__tags {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.bm-coa-result__action {
	flex: none;
	max-width: 264px;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
	text-align: right;
}

.bm-coa-result__note {
	font-size: 11.5px;
	line-height: 1.5;
	color: var(--bm-text-muted);
	margin: 0;
}

/* ------------------------------------------------------------------ *
 * Empty state
 * ------------------------------------------------------------------ */

.bm-coa-empty {
	text-align: center;
	padding: 60px 0;
}

.bm-coa-empty__title {
	font-size: 15px;
	color: var(--bm-text-muted);
	margin: 0 0 8px;
}

.bm-coa-empty__hint {
	font-size: 13px;
	line-height: 1.6;
	color: var(--bm-text-faint);
	max-width: 430px;
	margin: 0 auto;
}

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */

@media (max-width: 680px) {
	.bm-coa-result {
		align-items: flex-start;
		gap: 14px;
		flex-wrap: wrap;
	}

	.bm-coa-result__action {
		width: 100%;
		max-width: none;
		align-items: stretch;
		text-align: left;
	}

	.bm-coa-result__action .bm-btn {
		width: 100%;
	}
}

@media (max-width: 560px) {
	.bm-coa-form {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
	}

	.bm-coa-form__submit {
		width: 100%;
	}
}
