/*
 * Independent-testing panel (product pages) and results tables (Quality & Testing page).
 * Markup: template-parts/product/testing-panel.php, template-parts/quality/results.php.
 */

.nv-tp {
	--tp-ink: #1b1740;
	--tp-card: #262057;
	--tp-lilac: #c9bff5;
	--tp-soft: rgba(255, 255, 255, 0.84);
	--tp-faint: rgba(255, 255, 255, 0.72);
	--tp-rule: rgba(255, 255, 255, 0.12);
	padding-block: var(--nv-section);
}

.nv-tp__panel {
	position: relative;
	overflow: hidden;
	border-radius: var(--nv-radius);
	background: var(--tp-ink);
	color: #fff;
	padding: clamp(1.5rem, 1rem + 2.5vw, 3.5rem);
	display: flex;
	flex-direction: column;
	gap: clamp(1.25rem, 1rem + 1vw, 1.75rem);
}

.nv-tp__panel::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 4px;
	background: var(--nv-spectrum);
}

.nv-tp__top {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem 1.5rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--tp-rule);
}

.nv-tp__brand {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	line-height: 1.6;
	text-transform: uppercase;
	color: var(--tp-lilac);
}

.nv-tp__batch {
	margin: 0;
	padding: 0.5rem 0.875rem;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 500;
}

.nv-tp__head {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
	max-width: 56rem;
}

.nv-tp__heading {
	margin: 0;
	font-family: var(--nv-heading);
	font-size: clamp(1.875rem, 1.3rem + 2.2vw, 2.875rem);
	font-weight: 800;
	line-height: 1.1;
	color: #fff;
}

.nv-tp__intro {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--tp-soft);
}

.nv-tp__cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: 1.25rem;
}

@media (min-width: 56em) {
	.nv-tp__cards--hero {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.nv-tp__stack {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: 1.25rem;
}

.nv-tp__cards--hero .nv-tp__stack {
	grid-template-columns: minmax(0, 1fr);
}

.nv-tp-card {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	padding: 1.5rem 1.75rem;
	border-radius: 1rem;
	background: var(--tp-card);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.nv-tp-card--hero {
	padding: clamp(1.5rem, 1rem + 1.5vw, 2rem);
	background: linear-gradient(160deg, #2e2768 0%, var(--tp-card) 60%);
	border-color: rgba(201, 191, 245, 0.3);
}

.nv-tp-card--pending {
	background: transparent;
	border-style: dashed;
	border-color: rgba(255, 255, 255, 0.28);
}

.nv-tp-card__top {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
}

.nv-tp-card__label {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tp-lilac);
}

.nv-tp-card__badges {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
}

.nv-tp-card__figure {
	margin: 0;
	font-family: var(--nv-heading);
	font-size: clamp(2rem, 1.5rem + 1.5vw, 2.5rem);
	font-weight: 800;
	line-height: 1.05;
	color: #fff;
	overflow-wrap: anywhere;
}

.nv-tp-card--hero .nv-tp-card__figure {
	font-size: clamp(4rem, 2.5rem + 5vw, 7rem);
	letter-spacing: -0.02em;
}

.nv-tp-card__figure--italic {
	font-style: italic;
}

.nv-tp-card__line {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
}

.nv-tp-card--hero .nv-tp-card__line {
	font-size: 1.125rem;
}

.nv-tp-card__text {
	margin: 0;
	flex-grow: 1;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: var(--tp-soft);
}

.nv-tp-card__source {
	margin: 0;
	padding-top: 0.875rem;
	border-top: 1px solid var(--tp-rule);
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--tp-faint);
}

/* Badges: each type differs in lightness as well as colour, and always carries its word. */
.nv-tp-badge {
	display: inline-block;
	padding: 0.25rem 0.625rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.3;
	white-space: nowrap;
}

.nv-tp-badge--measured { background: #00b5cb; color: #10213a; }
.nv-tp-badge--confirmed { background: #00b5cb; color: #10213a; }
.nv-tp-badge--not-detected { background: #fff; color: #1b1740; }
.nv-tp-badge--below-limit { background: #c9bff5; color: #1b1740; }
.nv-tp-badge--calculated { background: #b8006a; color: #fff; }
.nv-tp-badge--in-progress { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5); }

.nv-tp__strips {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
	gap: 1rem;
}

.nv-tp__strip {
	margin: 0;
	padding: 0.875rem 1.125rem;
	border-radius: 0.75rem;
	background: rgba(255, 255, 255, 0.06);
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--tp-soft);
}

.nv-tp__strip strong {
	color: #fff;
}

.nv-tp__foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 1rem 1.5rem;
}

.nv-tp__legend {
	margin: 0;
	max-width: 44rem;
	font-size: 0.8125rem;
	line-height: 1.55;
	color: var(--tp-faint);
}

.nv-tp__legend strong {
	color: #fff;
}

/* .nv-tp prefix: outranks the theme's ".nv a { color: inherit }". */
.nv-tp .nv-tp__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 2.75rem;
	padding: 0 1.375rem;
	border-radius: 999px;
	background: #fff;
	color: var(--tp-ink);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
}

.nv-tp .nv-tp__link:hover,
.nv-tp .nv-tp__link:focus-visible {
	background: var(--tp-lilac);
	color: var(--tp-ink);
}

.nv-tp .nv-tp__link svg {
	width: 1rem;
	height: 1rem;
}

@media (max-width: 40em) {
	.nv-tp .nv-tp__link {
		width: 100%;
		justify-content: center;
		min-height: 3rem;
	}
}

.nv-tp-table-wrap:focus-visible {
	outline: 2px solid #4e2583;
	outline-offset: 2px;
}

/* Downloadable certificates in the product panel. */
.nv-tp__certs {
	margin: 0 0 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.nv-tp__certs-label {
	margin: 0 0 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tp-faint);
}

.nv-tp__certs-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nv-tp .nv-tp-cert {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 2.75rem;
	padding: 0 1.125rem;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 999px;
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
}

.nv-tp .nv-tp-cert:hover,
.nv-tp .nv-tp-cert:focus-visible {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.nv-tp .nv-tp-cert svg {
	flex: none;
	width: 1.125rem;
	height: 1.125rem;
}

.nv-tp__certs-note {
	margin: 0.75rem 0 0;
	font-size: 0.75rem;
	color: var(--tp-faint);
}

@media (max-width: 40em) {
	.nv-tp__certs-list li,
	.nv-tp .nv-tp-cert {
		width: 100%;
	}

	.nv-tp .nv-tp-cert {
		justify-content: center;
		min-height: 3rem;
		text-align: center;
	}
}

/* Quality & Testing page: full results tables. */
.nv-tp-results {
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
	margin-top: 1.75rem;
}

.nv-tp-report {
	border: 1px solid var(--nv-line);
	border-radius: var(--nv-radius-s);
	padding: clamp(1rem, 0.75rem + 1vw, 1.5rem);
	background: #fff;
}

.nv-tp-report__head {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin-bottom: 1rem;
}

.nv-tp-report__eyebrow {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #4e2583;
}

.nv-tp-report__title {
	margin: 0;
	font-family: var(--nv-heading);
	font-size: 1.125rem;
	color: var(--nv-ink-deep);
}

.nv-tp-report__meta,
.nv-tp-report__sample {
	margin: 0;
	font-size: 0.875rem;
	color: var(--nv-muted);
}

.nv-tp-report__sample span {
	font-weight: 600;
	color: var(--nv-text);
}

.nv-tp-table-wrap {
	overflow-x: auto;
}

.nv-tp-table {
	width: 100%;
	min-width: 36rem;
	border-collapse: collapse;
	font-size: 0.875rem;
}

.nv-tp-table th,
.nv-tp-table td {
	padding: 0.625rem 0.75rem;
	border-bottom: 1px solid var(--nv-line);
	text-align: left;
	vertical-align: top;
	line-height: 1.45;
}

.nv-tp-table thead th {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--nv-muted);
	background: #f6f5fb;
}

.nv-tp-table tbody th {
	font-weight: 500;
	color: var(--nv-text);
}

.nv-tp-table__result {
	font-weight: 700;
	color: var(--nv-ink-deep);
	white-space: nowrap;
}

.nv-tp-table__calc {
	background: #faf8ff;
}

/* On white, light badges get an outline so they stay visible. */
.nv-tp-table .nv-tp-badge--not-detected,
.nv-tp-table .nv-tp-badge--in-progress {
	box-shadow: inset 0 0 0 1px rgba(43, 37, 94, 0.35);
	color: var(--nv-ink-deep);
}

.nv-tp-report__explain,
.nv-tp-report__note,
.nv-tp-results__foot {
	margin: 0.875rem 0 0;
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--nv-muted);
}

.nv-tp-report__explain strong {
	color: var(--nv-text);
}

/* 0.25.2: the large card spreads its spare height evenly above and below its
   figure instead of leaving one gap under the text. */
.nv-tp-card--hero .nv-tp-card__figure {
	margin-top: auto;
}

.nv-tp-card--hero .nv-tp-card__text {
	flex-grow: 0;
}

.nv-tp-card--hero .nv-tp-card__source {
	margin-top: auto;
}

/* 0.25.2: keep the results inside narrow screens; only the table scrolls sideways. */
.nv-tp-results,
.nv-tp-results > *,
.nv-tp-report,
.nv-tp-table-wrap {
	min-width: 0;
	max-width: 100%;
}

.nv-tp-report__explain,
.nv-tp-report__note,
.nv-tp-results__foot,
.nv-tp-report__sample {
	overflow-wrap: anywhere;
}

/* 0.25.2: product evidence summary and report link. */
.nv-tp-summary {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: clamp(1rem, 0.75rem + 1vw, 1.5rem);
	border-radius: var(--nv-radius-s);
	background: #1b1740;
	color: #fff;
}

.nv-tp-summary__facts {
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
	gap: 0.75rem 1.5rem;
}

.nv-tp-summary__facts dt {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #c9bff5;
}

.nv-tp-summary__facts dd {
	margin: 0.25rem 0 0;
	font-size: 0.9375rem;
	line-height: 1.45;
}

.nv-tp-summary__key {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
	gap: 0.75rem;
}

.nv-tp-summary__key li {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.375rem;
	padding: 0.875rem 1rem;
	border-radius: 0.75rem;
	background: #262057;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.nv-tp-summary__figure {
	font-family: var(--nv-heading);
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.1;
	overflow-wrap: anywhere;
}

.nv-tp-summary__label {
	font-size: 0.875rem;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.84);
}

.nv-tp-report__pdf {
	margin: 0.75rem 0 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.875rem;
}

.nv-tp-results .nv-tp-pdf {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 2.75rem;
	padding: 0 1.125rem;
	border-radius: 999px;
	background: #1b1740;
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
}

.nv-tp-results .nv-tp-pdf:hover,
.nv-tp-results .nv-tp-pdf:focus-visible {
	background: #4e2583;
	color: #fff;
}

.nv-tp-results .nv-tp-pdf svg {
	width: 1.125rem;
	height: 1.125rem;
}

.nv-tp-report__pdfnote {
	font-size: 0.8125rem;
	color: var(--nv-muted);
}

.nv-tp-report__preview {
	font-size: 0.75rem;
	font-weight: 600;
	color: #b8006a;
}

/* 0.25.8: certificates as cards (laboratory, report, date, accreditation,
   download), the About page's label style above them. */
.nv-tp .nv-tp__certs-list--cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
	gap: 0.75rem;
}

.nv-tp .nv-tp-certcard {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0.85rem 1rem;
	align-items: start;
	padding: 1.1rem 1.15rem;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 1rem;
	background: rgba(255, 255, 255, 0.05);
}

.nv-tp .nv-tp-certcard__icon {
	display: grid;
	place-items: center;
	inline-size: 2.5rem;
	block-size: 2.5rem;
	border-radius: 0.75rem;
	background: rgba(201, 191, 240, 0.14);
	color: #c9bff0;
}

.nv-tp .nv-tp-certcard__icon svg {
	inline-size: 1.15rem;
	block-size: 1.15rem;
}

.nv-tp .nv-tp-certcard__body {
	display: grid;
	gap: 0.15rem;
	min-inline-size: 0;
}

.nv-tp .nv-tp-certcard__lab {
	color: #fff;
	font-family: var(--nv-heading);
	font-size: 1rem;
	font-weight: 600;
}

.nv-tp .nv-tp-certcard__meta,
.nv-tp .nv-tp-certcard__accr {
	color: rgba(255, 255, 255, 0.72);
	font-size: 0.8125rem;
	line-height: 1.45;
}

.nv-tp .nv-tp-certcard .nv-tp-cert {
	grid-column: 1 / -1;
	justify-content: center;
	inline-size: 100%;
	border-color: rgba(255, 255, 255, 0.5);
	background: #fff;
	color: #1b1740;
}

.nv-tp .nv-tp-certcard .nv-tp-cert:hover,
.nv-tp .nv-tp-certcard .nv-tp-cert:focus-visible {
	border-color: #fff;
	background: #ece9f6;
	color: #1b1740;
}

.nv-tp .nv-tp__brand.nv-kicker,
.nv-tp .nv-tp__certs-label.nv-kicker {
	margin-block-end: 0;
}

.nv-tp .nv-tp__certs-label.nv-kicker {
	margin-block-end: 0.9rem;
}

.nv-tp .nv-tp__certs-list--cards + .nv-tp__certs-note {
	margin-block-start: 0.9rem;
}
