/* TK Blocks — app pages: ikon og navn, knapper, skærmbillede, screenshots,
   App Store-boksen, guides, priser og prislinjen. Læser temaets farver, med
   faste værdier som reserve. */

.tkbl-app-empty {
	padding: 1.25rem 1.5rem;
	border: 1px dashed #c9c4b8;
	border-radius: 16px;
	font-size: 0.9375rem;
	color: #5a5a5f;
	background: rgba(255, 255, 255, 0.6);
}

/* ---------- Ikon og navn ---------- */

.tkbl-lockup {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.tkbl-lockup__icon {
	display: block;
	flex: none;
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 14px;
	box-shadow: 0 0 0 1px rgba(29, 29, 31, 0.08), 0 6px 16px -8px rgba(29, 29, 31, 0.35);
}

.tkbl-lockup__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.25rem 0.7rem;
	background: var(--wp--preset--color--surface, #fff);
	border: 1px solid var(--wp--preset--color--line, #e7e4dc);
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0;
}

.tkbl-lockup__badge::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent, #ffd200);
	box-shadow: 0 0 0 1px #d8b200;
}

.has-text-align-center .tkbl-lockup,
.tkbl-lockup.has-text-align-center {
	justify-content: center;
}

/* ---------- Knapper ---------- */

.tkbl-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.85rem;
}

.tkbl-actions.is-center {
	align-items: center;
	text-align: center;
}

.tkbl-actions > * {
	margin: 0;
}

.tkbl-actions__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.tkbl-actions.is-center .tkbl-actions__buttons {
	justify-content: center;
}

.tkbl-actions__price {
	display: inline-flex;
	padding: 0.3rem 0.85rem;
	background: var(--wp--preset--color--surface, #fff);
	border: 1px solid var(--wp--preset--color--line, #e7e4dc);
	border-radius: 999px;
	font-size: 0.9375rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.tkbl-actions__meta {
	font-family: var(--wp--preset--font-family--mono, ui-monospace, monospace);
	font-size: 0.8125rem;
	color: var(--wp--preset--color--contrast-3, #66656a);
}

.is-style-dark .tkbl-actions__meta {
	color: #b8b4aa;
}

.is-style-accent .tkbl-actions__meta {
	color: #3d3a2a;
}

/* ---------- Skærmbillede i ramme ---------- */

.tkbl-shot {
	display: flex;
	justify-content: center;
	margin: 0;
}

.tkbl-device {
	width: min(300px, 78%);
	padding: 8px;
	background: #1d1d1f;
	border-radius: 46px;
	box-shadow:
		inset 0 0 0 1px rgba(255, 255, 255, 0.08),
		0 2px 4px rgba(29, 29, 31, 0.08),
		0 40px 70px -34px rgba(29, 29, 31, 0.55);
}

.tkbl-device img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 38px;
}

/* An image that already shows the device, on a transparent background: no
   CSS phone, and a shadow that follows the outline instead of a box. */
.tkbl-framed {
	width: min(310px, 78%);
}

.tkbl-shot--laptop .tkbl-framed {
	width: min(620px, 100%);
}

.tkbl-framed img {
	display: block;
	width: 100%;
	height: auto;
	filter: drop-shadow(0 30px 34px rgba(29, 29, 31, 0.26));
}

/* The screen area is measured from the frame asset: 3024x1964 of 3860x2540,
   the MacBook Pro 14" native resolution, so a full screenshot lands 1:1.
   Replace the frame and these four numbers have to be measured again. */
.tkbl-laptop {
	position: relative;
	width: min(620px, 100%);
	aspect-ratio: 3860 / 2540;
	filter: drop-shadow(0 30px 60px rgba(29, 29, 31, 0.28));
}

.tkbl-laptop__screen {
	position: absolute;
	left: 10.829%;
	top: 11.339%;
	width: 78.342%;
	height: 77.323%;
	overflow: hidden;
	border-radius: 10px;
	background: #f1f3f7;
}

.tkbl-laptop__screen img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	border-radius: 0;
}

.tkbl-laptop__frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	pointer-events: none;
}

/* ---------- Screenshots ---------- */

.tkbl-shots {
	display: flex;
	gap: clamp(1rem, 2.5vw, 1.75rem);
	margin: 0;
	padding: 0.4rem 0.25rem 1.25rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 0.25rem;
	list-style: none;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.tkbl-shots__item {
	flex: 0 0 auto;
	width: min(230px, 62vw);
	margin: 0;
	scroll-snap-align: start;
}

.tkbl-shots--wide .tkbl-shots__item {
	width: min(560px, 86vw);
}

.tkbl-shots figure {
	margin: 0;
}

.tkbl-shots img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--wp--preset--color--line, #e7e4dc);
	border-radius: 22px;
	box-shadow: 0 18px 40px -22px rgba(29, 29, 31, 0.35);
	background: #fff;
}

/* Framed shots: one height for all, so a folding phone sits wider than a
   plain one, and each caption wraps to its own image. The extra bottom
   padding keeps the shadow inside the scroller, which clips. */
.tkbl-shots--framed {
	align-items: flex-start;
	padding-bottom: 2.5rem;
}

.tkbl-shots--framed .tkbl-shots__item {
	width: min-content;
}

.tkbl-shots--framed img {
	width: auto;
	height: clamp(360px, 46vw, 520px);
	max-width: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: none;
	filter: drop-shadow(0 22px 24px rgba(29, 29, 31, 0.22));
}

.tkbl-shots figcaption {
	margin-top: 0.75rem;
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--wp--preset--color--contrast-2, #5a5a5f);
	text-wrap: pretty;
}

/* ---------- Hent appen ---------- */

.tkbl-store {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.25rem 2rem;
}

.tkbl-store__main {
	display: grid;
	gap: 0.75rem;
	justify-items: start;
}

.tkbl-store__badge {
	display: inline-block;
	line-height: 0;
	border-radius: 10px;
	transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.tkbl-store__badge:hover {
	transform: translateY(-1px);
}

.tkbl-store__badge img {
	display: block;
	width: 180px;
	height: auto;
	border-radius: 0;
}

.tkbl-store__meta {
	margin: 0;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--contrast-2, #5a5a5f);
}

.is-style-accent .tkbl-store__meta {
	color: #3d3a2a;
}

.tkbl-store__qr {
	display: grid;
	justify-items: center;
	gap: 0.4rem;
	margin: 0;
}

.tkbl-store__qr img {
	display: block;
	width: 112px;
	height: 112px;
	padding: 6px;
	background: #fff;
	border: 1px solid var(--wp--preset--color--line, #e7e4dc);
	border-radius: 14px;
}

.tkbl-store__qr figcaption {
	font-family: var(--wp--preset--font-family--mono, ui-monospace, monospace);
	font-size: 0.75rem;
	color: var(--wp--preset--color--contrast-3, #66656a);
}

.is-style-accent .tkbl-store__qr figcaption {
	color: #3d3a2a;
}

/* A phone cannot scan its own screen. */
@media (hover: none) and (pointer: coarse) {
	.tkbl-store__qr {
		display: none;
	}
}

/* ---------- Guides ---------- */

.tkbl-guides {
	display: grid;
	grid-template-columns: repeat(var(--tkbl-cols, 3), minmax(0, 1fr));
	gap: clamp(1rem, 2vw, 1.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.tkbl-guides--cols-1 { --tkbl-cols: 1; }
.tkbl-guides--cols-2 { --tkbl-cols: 2; }
.tkbl-guides--cols-3 { --tkbl-cols: 3; }

@media (max-width: 960px) {
	.tkbl-guides--cols-3 { --tkbl-cols: 2; }
}

@media (max-width: 600px) {
	.tkbl-guides { --tkbl-cols: 1 !important; }
}

.tkbl-guide {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	margin: 0;
	padding: clamp(1.25rem, 2.5vw, 1.75rem);
	background: var(--wp--preset--color--surface, #fff);
	border: 1px solid var(--wp--preset--color--line, #e7e4dc);
	border-radius: 24px;
	box-shadow: var(--wp--preset--shadow--card, none);
	transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease;
}

.tkbl-guide > * {
	margin: 0;
}

.tkbl-guide:hover {
	transform: translateY(-3px);
	border-color: #d9d4c7;
	box-shadow: var(--wp--preset--shadow--lift, 0 20px 50px -24px rgba(29, 29, 31, 0.3));
}

.tkbl-guide:focus-within {
	outline: 2px solid var(--wp--preset--color--contrast, #1d1d1f);
	outline-offset: 3px;
}

.tkbl-guide__tag {
	font-family: var(--wp--preset--font-family--mono, ui-monospace, monospace);
	font-size: 0.8125rem;
	color: var(--wp--preset--color--contrast-3, #66656a);
}

.tkbl-guide__title {
	font-size: var(--wp--preset--font-size--large, 1.3rem);
	letter-spacing: -0.02em;
	line-height: 1.25;
}

.tkbl-guide__title a {
	color: inherit;
	text-decoration: none;
}

/* The whole card is the link. */
.tkbl-guide__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.tkbl-guide__title a:focus-visible {
	outline: none;
}

.tkbl-guide:hover .tkbl-guide__title a {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.18em;
}

.tkbl-guide__desc {
	font-size: 0.9375rem;
	color: var(--wp--preset--color--contrast-2, #5a5a5f);
}

.tkbl-guide__more {
	margin-top: auto !important;
	padding-top: 0.4rem;
	font-weight: 600;
	font-size: 0.9375rem;
}

.tkbl-guide__more::after {
	content: " →";
	display: inline-block;
	margin-left: 0.15em;
	transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.tkbl-guide:hover .tkbl-guide__more::after {
	transform: translateX(3px);
}

/* ---------- Priser (TK Licensing) ---------- */

/* TK Licensing's stylesheet reads --tk-* tokens that the old app stylesheet
   set for the whole page. They are set here instead, on the block, so the
   cards keep their colours wherever the block is placed. */
.tkbl-pricing,
.tkbl-buybar {
	--tk-bg: var(--wp--preset--color--base, #faf7f0);
	--tk-ink: var(--wp--preset--color--contrast, #1d1d1f);
	--tk-ink-75: rgba(29, 29, 31, 0.75);
	--tk-ink-60: rgba(29, 29, 31, 0.68);
	--tk-ink-55: rgba(29, 29, 31, 0.72);
	--tk-ink-45: rgba(29, 29, 31, 0.66);
	--tk-ink-40: rgba(29, 29, 31, 0.62);
	--tk-border: var(--wp--preset--color--line, #e7e4dc);
	--tk-border-strong: #d6d1c4;
	--tk-accent: var(--wp--preset--color--contrast, #1d1d1f);
	--tk-dark: var(--wp--preset--color--contrast, #1d1d1f);
	--tk-dark-hover: #3a3a3d;
	--tk-font-sans: var(--wp--preset--font-family--inter, Inter, ui-sans-serif, system-ui, sans-serif);
	--tk-font-mono: var(--wp--preset--font-family--mono, ui-monospace, monospace);
	--tk-glass-blur: blur(28px) saturate(200%);
	--tk-glass-fill: rgba(255, 255, 255, 0.62);
	--tk-glass-shadow: 0 1px 2px rgba(29, 29, 31, 0.06), 0 8px 28px rgba(29, 29, 31, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

/* The prices are in kroner: the figures line up. */
.tkbl-pricing {
	font-variant-numeric: tabular-nums;
}

/* ---------- Prislinjen ---------- */

/* Hidden until app.js sees the hero's buttons leave the screen. `hidden` is
   in the markup, so a page without JavaScript never shows it. */
.tkbl-buybar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 40;
	padding-bottom: env(safe-area-inset-bottom, 0px);
	background: rgba(250, 247, 240, 0.72);
	-webkit-backdrop-filter: blur(28px) saturate(200%);
	backdrop-filter: blur(28px) saturate(200%);
	border-top: 1px solid rgba(255, 255, 255, 0.6);
	box-shadow: 0 -8px 32px rgba(29, 29, 31, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.75);
	transform: translateY(100%);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.tkbl-buybar[hidden] {
	display: none;
}

.tkbl-buybar.is-visible {
	transform: translateY(0);
}

.tkbl-buybar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0.75rem var(--wp--preset--spacing--40, 1.5rem);
}

.tkbl-buybar__name {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	margin: 0;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.25;
}

.tkbl-buybar__price {
	font-size: 0.8125rem;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	color: var(--wp--preset--color--contrast-2, #5a5a5f);
}

.tkbl-buybar__actions {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.tkbl-buybar__soft {
	font-size: 0.9375rem;
	font-weight: 600;
	color: inherit;
	text-underline-offset: 4px;
}

.tkbl-buybar .wp-block-buttons {
	margin: 0;
}

.tkbl-buybar .wp-block-button__link {
	padding: 0.7rem 1.25rem;
	font-size: 0.9375rem;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.tkbl-buybar {
		background: rgba(250, 247, 240, 0.97);
	}
}

@media (max-width: 600px) {
	.tkbl-buybar__inner {
		gap: 0.75rem;
		padding-block: 0.6rem;
	}

	.tkbl-buybar__soft {
		display: none;
	}

	.tkbl-buybar__name {
		font-size: 0.9375rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tkbl-buybar {
		transition: none;
	}
}
