/*
 * Service page template (boards 06 ServiceRenewalA3, 07 ServiceMobile).
 * Phone first; tablet from 768 px; order steps beside the pinned summary from 1100 px.
 */

/* ---------- Hero: title, How it works, Before you order ---------- */
.service-hero {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 10px;
}

.service-hero__lead {
	font-size: 16px;
	line-height: 1.5;
	color: var(--c-body);
}

.service-hero__rows {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-top: 6px;
}

/* Phone "Due today" bar (HANDOFF.md; not on the boards): jumps to the full summary. */
.due-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 14px;
	background: var(--c-white);
	border: 1px solid var(--c-border);
	border-radius: 14px;
	color: var(--c-charcoal);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
}

.due-bar strong {
	margin-left: auto;
	font-size: 17px;
	font-weight: 800;
}

.due-bar .icon {
	color: var(--c-teal);
}

.how-strip__steps {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.how-strip__step {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr);
	grid-template-areas:
		"icon title"
		"icon text";
	column-gap: 12px;
	align-items: start;
}

.how-strip__line {
	grid-area: icon;
	display: flex;
	align-items: center;
	gap: 10px;
}

.how-strip__icon {
	width: 40px;
	height: 40px;
	border-radius: 12px;
}

.how-strip__title {
	grid-area: title;
	font-size: 15px;
	font-weight: 800;
}

.how-strip__text {
	grid-area: text;
	font-size: 13px;
	line-height: 1.45;
	color: var(--c-body);
}

.how-strip__note {
	margin-top: 12px;
	font-size: 13px;
	font-weight: 700;
	color: var(--c-teal);
}

.gov-fee__row--muted {
	color: var(--c-muted);
}

.gov-fee__row[hidden] {
	display: none;
}

.before-banner {
	font-size: 14px;
	line-height: 1.5;
	color: var(--c-charcoal);
}

.before-banner a {
	font-weight: 700;
}

/* Passport validity checker link under Renewal's banner (board 53, entry point 1). */
.validity-entry {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 10px 2px 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.45;
	color: var(--c-teal);
}

.validity-entry__icon {
	flex: none;
	display: flex;
}

.validity-entry a {
	color: var(--c-teal);
	white-space: nowrap;
}

@media (min-width: 768px) {
	.service-hero {
		gap: 14px;
		padding-block: 16px 20px;
	}

	.service-hero h1 {
		font-size: 44px;
		line-height: 1.05;
		letter-spacing: -0.025em;
	}

	.service-hero__lead {
		max-width: 860px;
		font-size: 18px;
	}

	.service-hero__rows {
		gap: 14px;
		padding-top: 0;
	}

	.how-strip {
		display: flex;
		flex-direction: column;
		gap: 12px;
		padding: 6px 0 2px;
	}

	.how-strip__label {
		font-size: 13px;
		font-weight: 700;
		letter-spacing: 0.1em;
		text-transform: uppercase;
		color: var(--c-teal);
	}

	.how-strip__steps {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 20px;
	}

	/* Stretch (the phone layout's "align-items: start" would shrink the icon row and hide the line). */
	.how-strip__step {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	/* A thin line runs from each step's icon toward the next step. */
	.how-strip__step:not(:last-child) .how-strip__line::after {
		content: "";
		flex: 1;
		height: 2px;
		background: var(--c-border);
	}

	.how-strip__title {
		font-size: 16px;
	}

	.how-strip__text {
		font-size: 14px;
	}

	.how-strip__note {
		margin-top: 0;
		font-size: 14px;
	}

	.before-banner {
		display: flex;
		align-items: flex-start;
		gap: 12px;
		padding: 14px 18px;
		background: var(--c-amber-tint);
		border-radius: 14px;
		font-size: 15px;
	}

	.before-banner__label {
		flex: none;
		font-weight: 800;
	}
}

/* ---------- Order: steps and summary ---------- */
.order {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding-block: 20px 8px;
}

.order__steps,
.order__side {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.order-step {
	min-width: 0;
	margin: 0;
	padding: 16px;
	background: var(--c-white);
	border: 1px solid var(--c-border);
	border-radius: 18px;
}

/* The legend sits in the card's flow like a heading (float keeps it inside the border). */
.order-step > legend {
	float: left;
	width: 100%;
	margin: 0 0 12px;
	padding: 0;
}

.order-step > legend + * {
	clear: both;
}

.order-step > :not(legend) + * {
	margin-top: 12px;
}

.order-step__head {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 18px;
	font-weight: 800;
	color: var(--c-charcoal);
}

.order-step__number {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 8px;
	background: var(--c-teal);
	color: var(--c-white);
	font-size: 14px;
	font-weight: 800;
}

.order-step__note {
	font-size: 12px;
	line-height: 1.45;
	color: var(--c-muted);
}

/* Speed cards (radio buttons). */
.speed-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.speed-card {
	display: flex;
	flex-direction: column;
	gap: 5px;
	padding: 12px;
	background: var(--c-white);
	border: 1.5px solid var(--c-border);
	border-radius: 14px;
	cursor: pointer;
}

.speed-card:has(input:checked) {
	background: var(--c-pale);
	border: 2px solid var(--c-teal);
}

/* Keyboard focus rings the whole card, so it is easy to see which speed arrow keys move to. */
.speed-card:has(input:focus-visible) {
	outline: 3px solid var(--c-teal);
	outline-offset: 2px;
}

.speed-card input:focus-visible {
	outline: none;
}

.speed-card__top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 4px;
	min-height: 24px; /* the boards' row height */
}

.speed-card input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 2px solid var(--c-teal);
	border-radius: 999px;
	background: var(--c-white);
	appearance: none;
	cursor: pointer;
}

.speed-card input:checked {
	background: radial-gradient(circle, var(--c-teal) 0 5px, var(--c-white) 5.5px);
}

.speed-card__tag {
	padding: 3px 7px;
	border-radius: 999px;
	background: var(--c-amber-tint);
	color: var(--c-warn);
	font-size: 10px;
	font-weight: 800;
}

.speed-card__name {
	font-size: 15px;
	font-weight: 800;
}

.speed-card__days {
	font-size: 12px;
	color: var(--c-muted);
}

.speed-card__price {
	font-size: 20px;
	font-weight: 800;
}

.speed-card__est {
	font-size: 12px;
	line-height: 1.35;
	color: var(--c-muted);
}

.speed-card__est strong {
	font-size: 13px;
	color: var(--c-teal);
	white-space: nowrap;
}

/* Shipping. */
.order-step__fields {
	display: grid;
	gap: 12px;
}

.order-step .field__label {
	font-weight: 800;
}

/* Add-ons. */
.addons {
	display: grid;
	gap: 12px;
}

.addon {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr) auto;
	grid-template-areas:
		"box name price"
		"box desc desc"
		"box note note";
	gap: 3px 12px;
	align-items: start;
	padding: 12px;
	border: 1px solid var(--c-border);
	border-radius: 12px;
	cursor: pointer;
}

.addon input {
	grid-area: box;
	width: 22px;
	height: 22px;
	margin: 1px 0 0;
	accent-color: var(--c-teal);
}

.addon__name,
.addon__price {
	font-size: 15px;
	font-weight: 800;
}

.addon__name {
	grid-area: name;
}

.addon__price {
	grid-area: price;
}

.addon__desc {
	grid-area: desc;
	font-size: 13px;
	line-height: 1.45;
	color: var(--c-body);
}

/* Document pre-check (boards 06, 07): the tag beside the name and the muted line inside the box. */
.addon__tag {
	margin-left: 8px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--c-good-bg);
	font-size: 11px;
	font-weight: 800;
	color: var(--c-good);
	vertical-align: 2px;
}

.addon__note {
	grid-area: note;
	font-size: 12px;
	line-height: 1.5;
	color: var(--c-muted);
}

.addon__note a {
	font-weight: 700;
	color: var(--c-teal);
}

/* Order summary and government fee box. */
.order-summary {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
	background: var(--c-white);
	border: 1px solid var(--c-border);
	border-radius: 18px;
	box-shadow: 0 10px 24px rgba(36, 54, 60, 0.08);
}

.order-summary:focus {
	outline: none;
}

.order-summary__title {
	font-size: 18px;
	line-height: normal;
	letter-spacing: 0;
}

.order-summary__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}

.order-summary__account {
	padding: 4px 10px;
	background: var(--c-pale-2);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 800;
	color: var(--c-teal);
}

.order-summary__account[hidden] {
	display: none;
}

.order-summary__lines .is-teal {
	color: var(--c-teal);
}

/* A free add-on (STEP, boards 86 and 87): "Free" in green, on the card and in the summary. */
.addon__price.is-free,
.order-summary__lines .is-free strong {
	color: var(--c-good);
}

.order-summary__remove {
	padding: 0;
	background: none;
	border: 0;
	font: 700 13px var(--font);
	color: var(--c-teal);
	text-decoration: underline;
	cursor: pointer;
}

/* "Have a company ID?" (board 06 design note): quiet link, then the account box. */
.order-summary__codes-link {
	align-self: flex-start;
	padding: 0;
	background: none;
	border: 0;
	font: 700 14px var(--font);
	color: var(--c-teal);
	text-decoration: underline;
	cursor: pointer;
}

.order-codes {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--c-border);
}

.order-codes[hidden] {
	display: none;
}

.order-codes__label {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--c-charcoal);
}

.order-codes__field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

/* The promo code field stays hidden while no promotion or price match code is open. */
.order-codes__field[hidden] {
	display: none;
}

.order-codes__field label {
	font-size: 13px;
	font-weight: 700;
}

.order-codes__row {
	display: flex;
	gap: 8px;
}

.order-codes__row input {
	flex: 1;
	min-width: 0;
	min-height: 44px;
	padding: 0 12px;
	border: 1.5px solid var(--c-field);
	border-radius: 10px;
	font: 500 15px var(--font);
	color: var(--c-charcoal);
}

.order-codes__row input[readonly] {
	background: var(--c-pale);
}

.order-codes__apply {
	flex: none;
	min-height: 44px;
	padding: 0 16px;
	background: var(--c-white);
	border: 2px solid var(--c-teal);
	border-radius: 10px;
	font: 800 14px var(--font);
	color: var(--c-teal);
	cursor: pointer;
}

.order-codes__apply[hidden],
.order-codes__applied[hidden],
.order-codes__error[hidden] {
	display: none;
}

.order-codes__applied {
	display: flex;
	flex: none;
	align-items: center;
	gap: 4px;
	min-height: 44px;
	padding: 0 4px 0 12px;
	background: var(--c-good-bg);
	border-radius: 10px;
	font-size: 14px;
	font-weight: 800;
	color: var(--c-good);
}

.order-codes__applied button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 8px;
	color: var(--c-good);
	cursor: pointer;
}

.order-codes__error {
	font-size: 13px;
	font-weight: 700;
	color: var(--c-warn);
}

.order-summary__sub {
	font-size: 13px;
	color: var(--c-muted);
}

.order-summary__lines {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.order-summary__lines li,
.order-summary__due,
.gov-fee__row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.order-summary__lines li {
	font-size: 14px;
}

.order-summary__lines .is-muted {
	color: var(--c-muted);
}

.order-summary__due {
	padding-top: 8px;
	border-top: 1px solid var(--c-border);
	font-size: 18px;
}

.order-summary__due span {
	font-weight: 800;
}

.order-summary__continue {
	min-height: 54px;
	font-size: 16px;
}

.order-summary__promise {
	font-size: 12px;
	text-align: center;
	color: var(--c-muted);
}

.gov-fee {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 16px;
	background: var(--c-pale);
	border: 1px solid var(--c-border);
	border-radius: 18px;
}

.gov-fee__title {
	font-size: 14px;
	line-height: normal;
	letter-spacing: 0;
}

.gov-fee__row {
	font-size: 14px;
}

.gov-fee__note {
	font-size: 12px;
	color: var(--c-muted);
}

/* Phone board 07 uses the font's natural line spacing for these two notes. */
.order-step__note--short {
	line-height: normal;
}

@media (min-width: 768px) {
	.order__steps,
	.order__side {
		gap: 16px;
	}

	.order-step {
		padding: 24px;
		border-radius: 22px;
	}

	.order-step > legend {
		margin-bottom: 16px;
	}

	.order-step > :not(legend) + * {
		margin-top: 16px;
	}

	.order-step__head {
		gap: 12px;
		font-size: 20px;
	}

	.order-step__number {
		width: 32px;
		height: 32px;
		border-radius: 10px;
		font-size: 16px;
	}

	.order-step__note {
		font-size: 13px;
		line-height: 1.5;
	}

	.speed-cards {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 12px;
	}

	.speed-card {
		gap: 8px;
		min-height: 132px;
		padding: 16px;
		border-radius: 16px;
	}

	.speed-card__top {
		gap: 6px;
	}

	.speed-card__tag {
		padding: 3px 8px;
		font-size: 11px;
	}

	.speed-card__name {
		font-size: 16px;
	}

	.speed-card__days,
	.speed-card__est {
		font-size: 13px;
	}

	.speed-card__price {
		margin-top: auto;
		font-size: 22px;
	}

	.speed-card__est strong {
		font-size: 14px;
	}

	.order-step__fields {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}

	.addons {
		gap: 16px;
	}

	.addon {
		grid-template-areas:
			"box name price"
			"box desc price"
			"box note price";
		column-gap: 14px;
		padding: 14px 16px;
		border-radius: 14px;
	}

	.addon input {
		margin-top: 2px;
	}

	.addon__name,
	.addon__price {
		font-size: 16px;
	}

	.addon__desc {
		font-size: 14px;
		line-height: 1.5;
	}

	.order-summary {
		gap: 10px;
		padding: 22px;
		border-radius: 22px;
		box-shadow: 0 12px 32px rgba(36, 54, 60, 0.08);
	}

	.order-summary__title {
		font-size: 19px;
	}

	.order-summary__sub {
		font-size: 14px;
	}

	.order-summary__lines {
		gap: 10px;
		padding-top: 6px;
	}

	.order-summary__lines li {
		font-size: 15px;
	}

	.order-summary__due {
		padding-top: 10px;
		font-size: 19px;
	}

	.order-summary__continue {
		min-height: 56px;
		margin-top: 4px;
		font-size: 17px;
	}

	.order-summary__promise {
		font-size: 13px;
	}

	.gov-fee {
		padding: 18px 22px;
		border-radius: 22px;
	}

	.gov-fee__title {
		white-space: nowrap;
		letter-spacing: -0.01em;
	}

	.gov-fee__row {
		font-size: 15px;
	}

	.gov-fee__note {
		line-height: 1.45;
	}

	.order-step__note--short {
		line-height: 1.5;
	}
}

@media (min-width: 1100px) {
	/* Steps on the left; the summary stays pinned on the right until the order section ends. */
	.order {
		display: grid;
		grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
		gap: 28px;
		align-items: start;
		padding-block: 8px 56px;
	}

	.order__side {
		position: sticky;
		top: 24px;
	}
}

/* ---------- What to send us (service pages show the intro on phones too) ---------- */
@media (max-width: 767px) {
	.send-list__lead {
		font-size: 15px;
		line-height: 1.5;
	}
}

/* Extra sections before the FAQ (Passport Renewal: renewing online, expired passports). */
.service-extras {
	padding-block: 48px 8px;
}

.service-extras .article-body {
	gap: 40px;
}
