/**
 * /fortsaet/ — step-2 completion page.
 * Port of topbanker's ansokan.css restyled to the pluskredit theme tokens
 * (theme/assets/css/main.css :root — ink/linen/coral palette).
 */

.page-fortsaet {
	background: var(--linen, #F6F4F1);
}

.app-page {
	max-width: 640px;
	margin: 0 auto;
	padding: 16px 16px 64px;
	font-family: var(--sans, "Instrument Sans", ui-sans-serif, system-ui, sans-serif);
	color: var(--ink, #0B1B3D);
}

/* ---- Topbar ---- */
.app-topbar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 0;
	color: var(--moss, #2E7D5B);
	font-size: 13px;
	font-weight: 600;
}
.app-secure { display: inline-flex; }

/* ---- Hero ---- */
.app-hero { margin: 8px 0 16px; }
.app-hero h1 {
	font-family: var(--serif, "Newsreader", ui-serif, Georgia, serif);
	font-size: clamp(24px, 5vw, 32px);
	line-height: 1.15;
	margin: 0 0 8px;
}
.app-lede {
	font-size: 15px;
	line-height: 1.5;
	color: var(--muted, #5C6B83);
	margin: 0 0 4px;
}
.app-time {
	font-size: 13px;
	font-weight: 600;
	color: var(--moss, #2E7D5B);
	margin: 0;
}

/* ---- Summary cards (loan + contact) ---- */
.app-summary {
	background: var(--paper, #fff);
	border: 1px solid var(--line, #D8DEE8);
	border-radius: var(--radius-lg, 12px);
	padding: 14px 16px;
	margin: 0 0 12px;
}
.app-summary-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.app-summary-kicker {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--muted, #5C6B83);
	margin-bottom: 2px;
}
.app-summary-row strong {
	font-size: 16px;
}
.app-summary-row strong span { display: block; font-weight: 600; font-size: 14px; }
/* Secondary action = tiny text link, never a competing button (Allan's rule). */
.app-summary-edit {
	background: none;
	border: none;
	padding: 2px 4px;
	font-size: 13px;
	color: var(--muted, #5C6B83);
	text-decoration: underline;
	cursor: pointer;
	flex-shrink: 0;
}
.app-contact-editor { margin-top: 12px; }

/* ---- Form + sections ---- */
.app-form { margin-top: 4px; }
.app-section {
	background: var(--paper, #fff);
	border: 1px solid var(--line, #D8DEE8);
	border-radius: var(--radius-lg, 12px);
	padding: 16px;
	margin: 0 0 12px;
}
.app-section legend {
	font-weight: 700;
	font-size: 15px;
	padding: 0 4px;
}

.app-grid2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
@media (max-width: 520px) {
	.app-grid2 { grid-template-columns: 1fr; }
}

/* ---- Fields ---- */
.app-field { margin: 0 0 12px; }
.app-field:last-child { margin-bottom: 0; }
.app-field label,
.app-field .app-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
}
.app-input-wrap { position: relative; }
.app-field input[type="text"],
.app-field input[type="email"],
.app-field input[type="tel"],
.app-field select {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 36px 12px 12px;
	font-size: 16px; /* ≥16px: iOS won't zoom the viewport on focus */
	font-family: inherit;
	color: var(--ink, #0B1B3D);
	background: var(--paper, #fff);
	border: 1.5px solid var(--line-2, #BEC8D6);
	border-radius: var(--radius, 6px);
	outline: none;
}
.app-field select { padding-right: 12px; }
.app-field input:focus,
.app-field select:focus {
	border-color: var(--ink-2, #243E66);
	box-shadow: 0 0 0 3px rgba(36, 62, 102, 0.12);
}
.app-input-suffix::after {
	content: attr(data-suffix);
	position: absolute;
	right: 34px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 13px;
	color: var(--muted, #5C6B83);
	pointer-events: none;
}

/* Validation states */
.app-check {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--moss, #2E7D5B);
	font-weight: 700;
	opacity: 0;
	transition: opacity 0.15s;
	pointer-events: none;
}
.app-field.is-valid .app-check,
.app-field.is-prefilled .app-check { opacity: 1; }
.app-field.is-valid input,
.app-field.is-prefilled input { border-color: var(--moss, #2E7D5B); }
.app-field.is-invalid input,
.app-field.is-invalid select { border-color: #C0392B; }
.app-err {
	display: block;
	margin-top: 5px;
	font-size: 13px;
	color: #C0392B;
}
.app-hint {
	display: block;
	margin-top: 5px;
	font-size: 12.5px;
	color: var(--muted, #5C6B83);
}

/* ---- Radio chips (civilstand) ---- */
.app-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.app-chip-opt input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.app-chip-opt span {
	display: inline-block;
	padding: 9px 14px;
	font-size: 14px;
	border: 1.5px solid var(--line-2, #BEC8D6);
	border-radius: 999px;
	background: var(--paper, #fff);
	cursor: pointer;
	user-select: none;
}
.app-chip-opt input:checked + span {
	border-color: var(--ink, #0B1B3D);
	background: var(--ink, #0B1B3D);
	color: #fff;
}
.app-chip-opt input:focus-visible + span {
	box-shadow: 0 0 0 3px rgba(36, 62, 102, 0.25);
}

/* ---- Radio cards (boligform) ---- */
.app-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}
@media (max-width: 520px) {
	.app-cards { grid-template-columns: 1fr 1fr; }
}
.app-card-opt input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.app-card-opt-body {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px;
	font-size: 14px;
	border: 1.5px solid var(--line-2, #BEC8D6);
	border-radius: var(--radius, 6px);
	background: var(--paper, #fff);
	cursor: pointer;
	user-select: none;
	min-height: 46px;
	box-sizing: border-box;
}
.app-card-opt input:checked + .app-card-opt-body {
	border-color: var(--ink, #0B1B3D);
	box-shadow: inset 0 0 0 1px var(--ink, #0B1B3D);
	background: #F1F4FA;
}
.app-card-opt input:focus-visible + .app-card-opt-body {
	box-shadow: 0 0 0 3px rgba(36, 62, 102, 0.25);
}

/* ---- CPR shield line ---- */
.app-shield {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 6px 0 0;
	font-size: 12.5px;
	color: var(--moss, #2E7D5B);
}

/* ---- Submit ---- */
.app-submit-wrap { margin: 20px 0 0; }
.app-form-error {
	background: #FDEDEB;
	border: 1px solid #E8B4AC;
	color: #A93226;
	border-radius: var(--radius, 6px);
	padding: 10px 12px;
	font-size: 14px;
	margin-bottom: 10px;
}
.app-btn {
	display: block;
	width: 100%;
	box-sizing: border-box;
	text-align: center;
	padding: 15px 20px;
	font-size: 17px;
	font-weight: 700;
	font-family: inherit;
	color: #fff;
	background: var(--coral, #FF6B57);
	border: none;
	border-radius: var(--radius, 6px);
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s;
}
.app-btn:hover { background: var(--coral-ink, #E84E37); }
.app-btn:disabled { opacity: 0.6; cursor: default; }
.app-submit-micro {
	text-align: center;
	font-size: 13px;
	color: var(--muted, #5C6B83);
	margin: 8px 0 0;
}
.app-terms {
	font-size: 12px;
	line-height: 1.5;
	color: var(--muted, #5C6B83);
	margin: 14px 0 0;
}
.app-terms a { color: inherit; }

/* ---- State cards (done / expired / thanks) ---- */
.app-card.app-state {
	background: var(--paper, #fff);
	border: 1px solid var(--line, #D8DEE8);
	border-radius: var(--radius-lg, 12px);
	padding: 36px 24px;
	text-align: center;
	margin: 24px 0;
}
.app-card.app-state h1,
.app-card.app-state h2 {
	font-family: var(--serif, "Newsreader", ui-serif, Georgia, serif);
	font-size: 24px;
	margin: 0 0 8px;
}
.app-card.app-state p {
	color: var(--muted, #5C6B83);
	font-size: 15px;
	line-height: 1.5;
	margin: 0 0 16px;
}
.app-state-check {
	width: 48px;
	height: 48px;
	line-height: 48px;
	border-radius: 50%;
	background: var(--moss, #2E7D5B);
	color: #fff;
	font-size: 24px;
	margin: 0 auto 12px;
}

/* ---- Loading overlay ---- */
.app-loading {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(246, 244, 241, 0.97);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
/* display:flex above overrides the hidden attribute UA style — restore it.
   Without this the overlay is visible from page load (Aug 7 regression). */
.app-loading[hidden] { display: none; }
body.app-loading-open { overflow: hidden; }
.app-loading-inner { max-width: 380px; text-align: center; }
.app-loading-inner h2 {
	font-family: var(--serif, "Newsreader", ui-serif, Georgia, serif);
	font-size: 22px;
	margin: 0 0 20px;
}
.app-loading-steps {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	text-align: left;
	display: inline-block;
}
.app-loading-steps li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 0;
	font-size: 15px;
	color: var(--muted, #5C6B83);
}
.app-loading-icon {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid var(--line-2, #BEC8D6);
	box-sizing: border-box;
	flex-shrink: 0;
}
.app-loading-steps li.is-active { color: var(--ink, #0B1B3D); font-weight: 600; }
.app-loading-steps li.is-active .app-loading-icon {
	border-color: var(--coral, #FF6B57);
	border-top-color: transparent;
	animation: pk-spin 0.8s linear infinite;
}
.app-loading-steps li.is-done { color: var(--ink, #0B1B3D); }
.app-loading-steps li.is-done .app-loading-icon {
	border-color: var(--moss, #2E7D5B);
	background: var(--moss, #2E7D5B);
	position: relative;
}
.app-loading-steps li.is-done .app-loading-icon::after {
	content: "✓";
	position: absolute;
	inset: 0;
	color: #fff;
	font-size: 11px;
	line-height: 14px;
	text-align: center;
}
@keyframes pk-spin { to { transform: rotate(360deg); } }
.app-loading-trust {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 12.5px;
	color: var(--muted, #5C6B83);
}
.app-loading-trust li { padding: 2px 0; }

/* Hide theme chrome CTAs while the form is active (same body class as the
 * calculator uses — pk-form-active — so existing theme rules also apply). */
body.pk-form-active .site-header .header-cta,
body.pk-form-active .sticky-cta { display: none !important; }

/* ============================================================
 * Interaction polish (2026-08-07, Allan's feedback: "more interactive,
 * high-converting"). Micro-feedback on every choice; CTA with physical
 * affordance; honest long-wait messaging on the overlay.
 * ============================================================ */

/* Inputs: smooth state changes + a small pop when the green check earns itself. */
.app-field input[type="text"],
.app-field input[type="email"],
.app-field input[type="tel"],
.app-field select {
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.app-check { transition: opacity 0.15s, transform 0.18s ease; transform: translateY(-50%) scale(0.6); }
.app-field.is-valid .app-check,
.app-field.is-prefilled .app-check { transform: translateY(-50%) scale(1); }

/* Chips: hover invitation + tactile press. */
.app-chip-opt span {
	transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease, transform 0.08s ease;
}
.app-chip-opt:hover span { border-color: var(--ink, #0B1B3D); }
.app-chip-opt span:active { transform: scale(0.96); }

/* Boligform cards: hover lift + colored icon when chosen. */
.app-card-opt-body {
	transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease, transform 0.08s ease;
}
.app-card-opt:hover .app-card-opt-body {
	border-color: var(--ink, #0B1B3D);
	box-shadow: 0 2px 8px rgba(11, 27, 61, 0.08);
}
.app-card-opt-body:active { transform: scale(0.98); }
.app-card-opt input:checked + .app-card-opt-body svg { color: var(--coral, #FF6B57); }

/* Sections: gentle depth so the form reads as cards, not flat boxes. */
.app-section, .app-summary {
	box-shadow: 0 1px 3px rgba(11, 27, 61, 0.05);
}

/* CTA: soft glow at rest, lift on hover, press on click. */
.app-btn--submit {
	box-shadow: 0 4px 14px rgba(255, 107, 87, 0.35);
	transition: background 0.15s, transform 0.12s ease, box-shadow 0.15s ease;
}
.app-btn--submit:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(255, 107, 87, 0.45);
}
.app-btn--submit:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(255, 107, 87, 0.3);
}

/* Overlay long-wait note: fades in after ~6s (JS) while lender APIs answer. */
.app-loading-wait {
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--ink-2, #243E66);
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid var(--line, #D8DEE8);
	border-radius: var(--radius, 6px);
	padding: 10px 12px;
	margin: 0 0 18px;
	animation: pk-fade-in 0.4s ease;
}
@keyframes pk-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	.app-check, .app-chip-opt span, .app-card-opt-body, .app-btn--submit { transition: none; }
	.app-loading-wait { animation: none; }
	.app-loading-steps li.is-active .app-loading-icon { animation-duration: 1.6s; }
}


/* Clamp reassurance under the summary amount (>cap askers only). */
.app-summary-clampnote {
	margin: 8px 0 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--moss, #2E7D5B);
}
