/* Closing parts of the template pages (k20 FAQ rows, k21 closing banner).
   Loaded after p3-overrides.css; every rule is scoped to .p3-sheets and the p3-in-* classes. */

/* k20: rows 64 px high, 16/500, arrow on the right, thin lines instead of glass boxes. */
.p3-sheets .p3-faq.p3-in-k20 {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	column-gap: 48px;
}

.p3-sheets .p3-in-k20 .faq__list {
	gap: 0;
}

.p3-sheets .p3-in-k20__row {
	border-bottom: 1px solid rgba(255, 255, 255, .22);
}

.p3-sheets .p3-in-k20__row h3 {
	margin: 0;
	font-size: inherit;
	line-height: inherit;
}

.p3-sheets .p3-in-k20__row button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	box-sizing: border-box;
	width: 100%;
	min-height: 64px;
	padding: 12px 0;
	border: 0;
	border-radius: 8px;
	background: none;
	color: #fff;
	font: 500 16px/1.35 var(--font, inherit);
	text-align: left;
	cursor: pointer;
}

.p3-sheets .p3-in-k20__row button:hover {
	opacity: .8;
}

.p3-sheets .p3-in-k20__row button:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

.p3-sheets .p3-in-k20__row button:active {
	opacity: .65;
}

.p3-sheets .p3-in-k20__arrow {
	flex: none;
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform .3s var(--p3-spring);
}

.p3-sheets .p3-in-k20__row button[aria-expanded="true"] .p3-in-k20__arrow {
	transform: rotate(180deg);
}

.p3-sheets .p3-in-k20__answer p {
	margin: 0 0 20px;
	max-width: 56ch;
	color: rgba(255, 255, 255, .94);
	font-size: 15px;
	line-height: 1.7;
}

/* Columns on a wide screen only; below 900 px the sheet rules put every card in column 1. */
@media (min-width: 901px) {
	.p3-sheets .p3-sheet > .p3-in-k21 {
		grid-column: 1 / -1;
	}
}

/* k21: the whole sheet width, the page's closing picture on the right. Background follows the scene like the start and step cards (--p3-grad, defined in in-kort.css; Natt keeps navy). */
.p3-sheets .p3-sheet > .p3-in-k21 {
	min-height: 560px;
	padding-bottom: 0;
	background: var(--p3-grad);
}

.p3-sheets .p3-in-k21 .closing__copy {
	padding-bottom: var(--p3-pad);
}

.p3-sheets .p3-in-k21 h2 {
	max-width: 18ch;
	text-wrap: balance;
}

.p3-sheets .p3-in-k21 .button {
	background: #fff;
	color: var(--p3-ink);
	border-radius: 999px;
}

.p3-sheets .p3-in-k21--photo {
	position: relative;
	grid-template-columns: minmax(0, 1fr);
	align-items: center;
	padding-bottom: var(--p3-pad);
}

.p3-sheets .p3-in-k21--photo > img,
.p3-sheets .p3-in-k21--photo > picture > img {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 60% 20%;
	filter: none;
}

.p3-sheets .p3-sheet > .p3-in-k21--photo > img,
.p3-sheets .p3-sheet > .p3-in-k21--photo > picture > img {
	max-height: none;
}

.p3-sheets .p3-in-k21--photo::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(90deg, rgba(21, 27, 39, .8) 0%, rgba(21, 27, 39, .4) 55%, rgba(21, 27, 39, 0) 82%);
}

.p3-sheets .p3-in-k21--photo .closing__copy {
	position: relative;
	z-index: 2;
}

/* Wide screens: the tick rows were capped at 52ch (about 483 px), which gave rows of 2, 1 and 3 lines with "BankID." alone.
   At 566 px they are 1, 1 and 2 lines and end 584 px into the card. From 1320 px only: at 1231 px the longest row ended
   16 px from the ear of the person on Hudhälsa och hudvård för kvinnor (photos of all 33 pages looked at, 2026-11-11);
   the person moves right about half a pixel per pixel of width, so at 1320 px the gap is about 60 px. */
@media (min-width: 1320px) {
	.p3-sheets .p3-in-k21--photo .p3-checks {
		max-width: 566px;
	}
}

@media (max-width: 900px) {
	.p3-sheets .p3-faq.p3-in-k20 {
		grid-template-columns: minmax(0, 1fr);
	}

	.p3-sheets .p3-sheet > .p3-in-k21 {
		min-height: 0;
	}

	.p3-sheets .p3-in-k21--photo {
		min-height: 560px;
		align-items: end;
	}

	.p3-sheets .p3-in-k21--photo::before {
		background: linear-gradient(0deg, rgba(21, 27, 39, .86) 0%, rgba(21, 27, 39, .5) 55%, rgba(21, 27, 39, 0) 85%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.p3-sheets .p3-in-k20__arrow {
		transition: none;
	}
}

/* The review line, last under the questions (set per page in tools/routes.json "review"; no date, no line). */
.p3-sheets .p3-in-k20__review {
	margin: 24px 0 0;
	font-size: var(--secondary, 14px);
	color: var(--muted);
}
