/**
 * Test quiz (/tests/{slug}/start/)
 */

.ph-test-quiz__shell {
	padding-top: 2rem;
	padding-bottom: 2rem;
	max-width: 42rem;
}

.ph-test-quiz__shell--wide {
	max-width: min(100%, 52rem);
}

.ph-test-quiz__back {
	margin: 0 0 1.5rem;
}

.ph-test-quiz__back-link {
	font-size: 1rem;
	color: var(--ph-green, #469f10);
	text-decoration: none;
	font-weight: var(--ph-fw-semi, 600);
}

.ph-test-quiz__back-link:hover,
.ph-test-quiz__back-link:focus-visible {
	text-decoration: underline;
}

.ph-test-quiz__head {
	margin-bottom: 2rem;
}

.ph-test-quiz__title {
	font-size: 2rem;
	font-weight: var(--ph-fw-bold, 700);
	line-height: 1.2;
	margin: 0 0 0.75rem;
	color: var(--ph-black, #333);
}

.ph-test-quiz__lead,
.ph-test-quiz__hint {
	font-size: 1.125rem;
	line-height: 1.55;
	color: var(--ph-gray, #555);
	margin: 0;
}

.ph-test-quiz__hint {
	margin-top: 0.75rem;
}

.ph-test-quiz__cta {
	margin: 1.5rem 0 0;
}

.ph-test-quiz__notice {
	padding: 1rem 1.25rem;
	background: rgba(0, 0, 0, 0.04);
	border-radius: 0.75rem;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--ph-gray, #555);
	margin: 0;
}

.ph-test-quiz__notice--admin {
	background: rgba(70, 159, 16, 0.12);
	border: 0.0625rem solid rgba(70, 159, 16, 0.35);
}

.ph-test-quiz__progress {
	margin-bottom: 1.75rem;
}

.ph-test-quiz__progress-track {
	height: 0.5rem;
	border-radius: var(--ph-border-radius-pill, 50px);
	background: rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

.ph-test-quiz__progress-fill {
	height: 100%;
	background: var(--ph-green, #469f10);
	border-radius: inherit;
	transition: width 0.25s ease;
	min-width: 0;
}

.ph-test-quiz__progress-label {
	margin: 0.625rem 0 0;
	font-size: 1rem;
	font-weight: var(--ph-fw-semi, 600);
	color: var(--ph-black, #333);
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.ph-test-quiz__progress-sep {
	margin: 0 0.125rem;
	opacity: 0.7;
}

.ph-test-quiz__questions {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0;
	min-height: 12rem;
}

.ph-test-quiz__question {
	padding: 0;
}

.ph-test-quiz__question[hidden] {
	display: none !important;
}

.ph-test-quiz__nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 0.0625rem solid #e8e8e8;
}

.ph-test-quiz__nav-spacer {
	flex: 1;
	min-width: 0.5rem;
}

.ph-test-quiz__nav .ph-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.ph-test-quiz__next[hidden],
.ph-test-quiz__submit[hidden] {
	display: none !important;
}

.ph-test-quiz__q-title {
	font-size: 1.125rem;
	font-weight: var(--ph-fw-bold, 700);
	margin: 0 0 1rem;
	color: var(--ph-black, #333);
}

.ph-test-quiz__options {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.ph-test-quiz__label {
	display: flex;
	align-items: flex-start;
	gap: 0.625rem;
	font-size: 1rem;
	line-height: 1.45;
	color: var(--ph-black, #333);
	cursor: pointer;
}

.ph-test-quiz__radio {
	margin: 4px 0 0;
    flex-shrink: 0;
    accent-color: var(--ph-green, #469f10);
    cursor: pointer;
    width: 15px;
    height: 15px;
}

.ph-test-quiz__submit-wrap {
	margin-top: 2rem;
}

.ph-test-quiz__form-msg {
	margin-top: 1rem;
	font-size: 1rem;
	color: var(--ph-green-dark, #357d0c);
}

.ph-test-quiz__form-msg[hidden] {
	display: none;
}

/* ----- Results: total table + breakdown table ----- */
.ph-test-results {
	margin-top: 2rem;
}

.ph-test-results--split {
	overflow: visible;
	border: 0;
}

.ph-test-results__block {
	margin-bottom: 1.75rem;
	overflow-x: auto;
}

.ph-test-results__block:last-child {
	margin-bottom: 0;
}

.ph-test-results__block-title {
	font-size: 1.0625rem;
	font-weight: var(--ph-fw-semi, 600);
	margin: 0 0 0.625rem;
	color: var(--ph-black, #333);
	letter-spacing: 0.01em;
}

.ph-test-results__table {
	width: 100%;
	max-width: 100%;
	border-collapse: collapse;
	min-width: 36rem;
	font-size: 1rem;
	line-height: 1.45;
	color: var(--ph-black, #333);
	background: var(--ph-white, #fff);
	border: 0.0625rem solid #e0e0e0;
	border-radius: 0.5rem;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ph-test-results--split .ph-test-results__table {
	overflow-x: auto;
    border: 1px solid var(--ph-green);
}

.ph-test-results__table--total {
	margin-bottom: 0;
}

.ph-test-results__corner {
	width: 40%;
	min-width: 10rem;
	background: #fafafa;
	border-bottom: 0.0625rem solid #e0e0e0;
}

.ph-test-results__col-head {
	padding: 0.75rem 1rem;
	text-align: center;
	font-weight: var(--ph-fw-bold, 700);
	background: #fafafa;
	border-left: 0.0625rem solid #e0e0e0;
	border-bottom: 0.0625rem solid #e0e0e0;
}

.ph-test-results__row th,
.ph-test-results__row td {
	padding: 0.625rem 1rem;
	border-bottom: 0.0625rem solid #e8e8e8;
	vertical-align: middle;
}

.ph-test-results__row:last-child th,
.ph-test-results__row:last-child td {
	border-bottom: none;
}

.ph-test-results__num--na {
	font-weight: var(--ph-fw-regular, 400);
	color: var(--ph-text-muted, #6b6b6b);
}

.ph-test-results__row--total .ph-test-results__label,
.ph-test-results__row--total .ph-test-results__num {
	font-weight: var(--ph-fw-bold, 700);
	background: rgba(70, 159, 16, 0.06);
}

.ph-test-results__row--total .ph-test-results__num.ph-test-results__num--na {
	font-weight: var(--ph-fw-regular, 400);
	color: var(--ph-text-muted, #6b6b6b);
}

.ph-test-results__label {
	text-align: left;
	font-weight: var(--ph-fw-semi, 600);
}

.ph-test-results__num {
	text-align: center;
	font-variant-numeric: tabular-nums;
	border-left: 0.0625rem solid #e8e8e8;
}

/* ----- Maturity results layout ----- */
.ph-test-quiz__shell--maturity {
	max-width: min(100%, 68rem);
}

.ph-maturity-results {
	margin-top: 1.75rem;
}

.ph-maturity-results__hero,
.ph-maturity-results__summary,
.ph-maturity-results__area-card,
.ph-maturity-results__legend {
	background: #fff;
	border-radius: 1.25rem;
	padding: 1.5rem 2rem;
	margin-bottom: 1.25rem;
}

.ph-maturity-results__summary {
	overflow-x: auto;
}

.ph-maturity-results__hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.ph-maturity-results__hero-title {
	margin: 0;
	font-size: 1.85rem;
	line-height: 1.2;
}

.ph-maturity-results__hero-sub {
	margin: 0.375rem 0 0;
	color: var(--ph-gray, #666);
}

.ph-maturity-results__hero-pill,
.ph-maturity-results__area-age {
	background: #0f8b2d;
	color: #fff;
	padding: 0.65rem 1.35rem;
	border-radius: 999px;
	font-weight: 700;
	white-space: nowrap;
}

.ph-maturity-results__section-title {
	margin: 0 0 1rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-size: 1.05rem;
}

.ph-maturity-results__table {
	width: 100%;
	border-collapse: collapse;
	min-width: 44rem;
}

.ph-maturity-results__table th,
.ph-maturity-results__table td {
	border-bottom: 1px solid #ebebeb;
	padding: 0.85rem 0.65rem;
	text-align: left;
	vertical-align: middle;
}

.ph-maturity-results__table th:nth-child(3),
.ph-maturity-results__table td:nth-child(3),
.ph-maturity-results__table th:nth-child(4),
.ph-maturity-results__table td:nth-child(4),
.ph-maturity-results__table th:nth-child(5),
.ph-maturity-results__table td:nth-child(5),
.ph-maturity-results__table th:nth-child(6),
.ph-maturity-results__table td:nth-child(6) {
	text-align: center;
}

.ph-maturity-results__icon {
	display: inline-block;
	margin-right: 0.4rem;
}

.ph-maturity-results__icon .dashicons {
	font-size: 1rem;
	width: 1rem;
	height: 1rem;
	line-height: 1rem;
	vertical-align: text-top;
}

.ph-maturity-results__band-icon {
	display: inline-flex;
	align-items: center;
	margin-right: 6px;
}

.ph-maturity-results__area-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-bottom: 0.9rem;
	border-bottom: 1px solid #ececec;
	margin-bottom: 0.85rem;
}

.ph-maturity-results__area-title {
	margin: 0;
	font-size: 1.55rem;
}

.ph-maturity-results__abilities {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ph-maturity-results__ability {
	display: grid;
	grid-template-columns: auto minmax(16rem, 1fr) minmax(16rem, 1.3fr) auto;
	gap: 0.75rem;
	align-items: center;
	padding: 0.45rem 0;
}

.ph-maturity-results__dot {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 999px;
	display: inline-block;
	background: var(--ph-maturity-band-color, #1f9d47);
}

.ph-maturity-results__bar {
	height: 0.5rem;
	background: #ececec;
	border-radius: 999px;
	overflow: hidden;
}

.ph-maturity-results__bar > span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--ph-maturity-band-color, #1f9d47);
}

.ph-maturity-results__pct {
	font-variant-numeric: tabular-nums;
}

.ph-maturity-results__ability--high .ph-maturity-results__pct {
	color: var(--ph-maturity-band-color, #1f9d47);
}

.ph-maturity-results__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	justify-content: center;
}

.ph-maturity-results__legend span {
	display: inline-flex;
	align-items: baseline;
	color: var(--ph-gray, #555);
}

.ph-maturity-results__dot--high {
	background: #1f9d47;
}
.ph-maturity-results__dot--moderate {
	background: #d67d00;
}
.ph-maturity-results__dot--poor {
	background: #c0392b;
}

@media (max-width: 62rem) {
	.ph-test-results__table {
		min-width: 34rem;
		font-size: 0.95rem;
	}

	.ph-test-results__col-head,
	.ph-test-results__row th,
	.ph-test-results__row td {
		padding: 0.55rem 0.7rem;
	}

	.ph-maturity-results__hero {
		flex-direction: column;
		align-items: flex-start;
	}

	.ph-maturity-results__ability {
		grid-template-columns: auto 1fr;
	}

	.ph-maturity-results__bar,
	.ph-maturity-results__pct {
		grid-column: 2;
	}

	.ph-maturity-results__hero,
	.ph-maturity-results__summary,
	.ph-maturity-results__area-card,
	.ph-maturity-results__legend {
		padding: 1rem 1rem;
		border-radius: 1rem;
	}

	.ph-maturity-results__hero-title {
		font-size: 1.25rem;
	}

	.ph-maturity-results__hero-pill,
	.ph-maturity-results__area-age {
		padding: 0.5rem 0.85rem;
		font-size: 0.95rem;
	}

	.ph-maturity-results__section-title {
		font-size: 0.95rem;
	}
}

@media (max-width: 40rem) {
	.ph-test-results__table {
		min-width: 31rem;
		font-size: 0.9rem;
	}

	.ph-test-results__corner {
		min-width: 8.5rem;
	}

	.ph-test-quiz__shell--maturity {
		max-width: 100%;
	}

	.ph-maturity-results__table {
		min-width: 38rem;
		font-size: 0.95rem;
	}

	.ph-maturity-results__table th,
	.ph-maturity-results__table td {
		padding: 0.7rem 0.5rem;
	}

	.ph-maturity-results__area-title {
		font-size: 1.15rem;
	}

	.ph-maturity-results__ability {
		gap: 0.5rem;
	}
}
