/*
 * KFL-forumet: kortet og veiledningen «Få forumet som app» (app.js).
 * Fargene følger KFL-stilene (--k-*), med reservefarger.
 */
.kfl-app-card,
.kfl-app-sheet {
	--ap-bg: var(--k-head, #0b0b0b);
	--ap-bg2: #1a1a1a;
	--ap-line: var(--k-head-line, #2a2a2a);
	--ap-text: var(--k-head-text, #f3f1ea);
	--ap-muted: var(--k-head-muted, #bdb8aa);
	--ap-y: var(--k-y, #ffe000);
	--ap-ink: var(--k-y-ink, #16150f);
	font: 400 14px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
	color: var(--ap-text);
	box-sizing: border-box;
}
.kfl-app-card *,
.kfl-app-sheet * { box-sizing: border-box; }

/* Kortet: over bunnmenyen */
.kfl-app-card {
	position: fixed;
	left: 10px;
	right: 10px;
	bottom: calc(78px + env(safe-area-inset-bottom, 0px));
	z-index: 898;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 40px 12px 12px;
	border: 1px solid var(--ap-line);
	border-bottom: 3px solid var(--ap-y);
	border-radius: 16px;
	background: var(--ap-bg2);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
	animation: kfl-app-up 0.35s ease-out both;
}
body:not(.kfl-has-bm) .kfl-app-card { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
.kfl-app-card .kfl-app__logo { flex: none; width: 44px; height: 44px; border-radius: 10px; }
.kfl-app-card .kfl-app__txt { flex: 1; display: grid; gap: 1px; min-width: 0; }
.kfl-app-card .kfl-app__txt b { font-weight: 700; font-size: 15px; color: #fff; }
.kfl-app-card .kfl-app__txt span { font-size: 12.5px; color: var(--ap-muted); }
.kfl-app-card .kfl-app__btn { flex: none; margin-left: auto; }

.kfl-app-card button.kfl-app__btn,
.kfl-app-sheet button.kfl-app__btn {
	-webkit-appearance: none;
	appearance: none;
	min-height: 40px;
	padding: 8px 16px;
	border: 0;
	border-radius: 999px;
	background: var(--ap-y);
	box-shadow: none;
	color: var(--ap-ink);
	font: 700 14px/1 system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
	white-space: nowrap;
	cursor: pointer;
}
.kfl-app-card button.kfl-app__x,
.kfl-app-sheet button.kfl-app__x {
	-webkit-appearance: none;
	appearance: none;
	position: absolute;
	top: 6px;
	right: 6px;
	width: 30px;
	height: 30px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: var(--ap-muted);
	font: 400 22px/1 system-ui, sans-serif;
	cursor: pointer;
}
.kfl-app-card button:focus-visible,
.kfl-app-sheet button:focus-visible { outline: 3px solid var(--ap-y); outline-offset: 2px; }

/* Mens veiledningen er åpen: bunnmenyen og kortet viker, så pilen peker rett på Safari. */
body.kfl-app-open .kfl-bm { transform: translateY(110%); }
body.kfl-app-open .kfl-app-card { display: none; }

/* Veiledningen: mørk bakgrunn og panel nederst */
.kfl-app-sheet {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: rgba(0, 0, 0, 0.6);
	animation: kfl-app-fade 0.2s ease-out both;
}
.kfl-app-sheet__panel {
	position: relative;
	width: 100%;
	max-width: 520px;
	padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px));
	border-top: 4px solid var(--ap-y);
	border-radius: 20px 20px 0 0;
	background: var(--ap-bg2);
	animation: kfl-app-up 0.3s ease-out both;
}
/* iPhone: panelet over Del-knappen, med en pil ned mot den */
.kfl-app-sheet.is-ios { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
.kfl-app-sheet.is-ios .kfl-app-sheet__panel { border-radius: 20px; margin: 0 10px; }
.kfl-app-sheet .kfl-app__arrow {
	position: absolute;
	left: 50%;
	bottom: calc(18px + env(safe-area-inset-bottom, 0px));
	width: 0;
	height: 0;
	margin-left: -14px;
	border: 14px solid transparent;
	border-top: 20px solid var(--ap-y);
	animation: kfl-app-bob 1.2s ease-in-out infinite;
}
.kfl-app-sheet .kfl-app__kicker {
	margin: 0 0 4px;
	color: var(--ap-y);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.kfl-app-sheet .kfl-app__h { margin: 0 30px 12px 0; padding: 0; border: 0; color: #fff; font-size: 19px; font-weight: 700; line-height: 1.25; }
.kfl-app-sheet .kfl-app__lead { margin: 0 0 12px; color: var(--ap-muted); }
.kfl-app-sheet .kfl-app__steps { display: grid; gap: 12px; margin: 0 0 16px; padding: 0; list-style: none; }
.kfl-app-sheet .kfl-app__step { display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.kfl-app-sheet .kfl-app__num {
	flex: none;
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--ap-y);
	color: var(--ap-ink);
	font-weight: 700;
	font-size: 13px;
}
.kfl-app-sheet .kfl-app__step p { margin: 2px 0 0; color: var(--ap-text); font-size: 15px; }
.kfl-app-sheet .kfl-app__step b { color: #fff; }
.kfl-app-sheet .kfl-app__ico {
	display: inline-block;
	width: 19px;
	height: 19px;
	margin: 0 3px;
	vertical-align: -4px;
	fill: none;
	stroke: var(--ap-y);
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.kfl-app-sheet .kfl-app__ico circle { fill: var(--ap-y); stroke: none; }
.kfl-app-sheet .kfl-app__btn { width: 100%; margin-bottom: 12px; }
.kfl-app-sheet .kfl-app__why { margin: 0; color: var(--ap-muted); font-size: 13px; }

/* Lenken i kampdag-banneret */
.kfl-kampdag button.kfl-kd__app {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: var(--kd-y, #ffe000);
	font: inherit;
	font-size: 1.3rem;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

@keyframes kfl-app-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes kfl-app-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kfl-app-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
	.kfl-app-card, .kfl-app-sheet, .kfl-app-sheet__panel, .kfl-app-sheet .kfl-app__arrow { animation: none; }
}
@media print { .kfl-app-card, .kfl-app-sheet { display: none !important; } }
