/**
 * The "need help?" panel. Same visual language as the package dialog
 * (popup.css): dark blue bar with Oswald capitals, beige rule, green pill
 * button. Colours come from theme.json presets; the fallbacks match them.
 */

.edodsbo-hjaelp {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9990;
	width: 290px;
	max-width: calc(100% - 32px);
	border-radius: 8px;
	background: var(--wp--preset--color--hvid, #FFFFFF);
	color: var(--wp--preset--color--tekst, #515151);
	box-shadow: 0 14px 40px rgba(39, 45, 63, 0.28);
	overflow: hidden;
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.edodsbo-hjaelp[hidden] {
	display: none;
}

.edodsbo-hjaelp.is-aaben {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.edodsbo-hjaelp {
		transition: none;
		transform: none;
	}
}

.edodsbo-hjaelp__top {
	position: relative;
	padding: 10px 44px 8px 16px;
	border-bottom: 3px solid var(--wp--preset--color--beige, #D4C194);
	background: var(--wp--preset--color--moerkeblaa, #272D3F);
}

.edodsbo-hjaelp__titel {
	margin: 0;
	font-family: var(--wp--preset--font-family--oswald, system-ui, sans-serif);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--wp--preset--color--hvid, #FFFFFF);
}

.edodsbo-hjaelp__titel:focus,
.edodsbo-hjaelp__titel:focus-visible {
	outline: none;
}

.edodsbo-hjaelp__indhold {
	padding: 10px 16px 12px;
	font-size: 14px;
	line-height: 20px;
}

/* The theme pins paragraph line heights in px; the panel uses its own. */
body .edodsbo-hjaelp .edodsbo-hjaelp__indhold p {
	margin: 0;
	font-size: inherit;
	line-height: inherit;
}

.edodsbo-hjaelp__knapper {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 14px;
	margin-top: 10px;
}

.edodsbo-hjaelp__knap {
	display: inline-block;
	padding: 9px 14px;
	border: 2px solid var(--wp--preset--color--beige-moerk, #CDBC8C);
	border-radius: 40px;
	background: var(--wp--preset--color--groen, #4D7E28);
	color: var(--wp--preset--color--hvid, #FFFFFF);
	font-family: var(--wp--preset--font-family--oswald, system-ui, sans-serif);
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-decoration: none;
}

.edodsbo-hjaelp__knap:hover,
.edodsbo-hjaelp__knap:focus {
	background: var(--wp--preset--color--groen-hover, #3E6620);
	color: var(--wp--preset--color--hvid, #FFFFFF);
}

/* Secondary action: underlined so it is not recognised by colour alone. */
.edodsbo-hjaelp__link {
	display: inline-block;
	padding: 8px 0;
	color: var(--wp--preset--color--moerkeblaa, #272D3F);
	font-size: 14px;
	text-decoration: underline;
}

.edodsbo-hjaelp__luk {
	position: absolute;
	top: 0;
	right: 0;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 4px;
	background: none;
	color: var(--wp--preset--color--beige, #D4C194);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.edodsbo-hjaelp__luk:hover {
	background: rgba(255, 255, 255, 0.12);
	color: var(--wp--preset--color--hvid, #FFFFFF);
}

.edodsbo-hjaelp :is(a, button):focus-visible {
	outline: 3px solid var(--wp--preset--color--groen, #4D7E28);
	outline-offset: 2px;
}

.edodsbo-hjaelp__luk:focus-visible {
	outline-color: var(--wp--preset--color--beige, #D4C194);
}

/* The scroll-to-top button lives in the same corner. */
body.edodsbo-hjaelp-aaben .edodsbo-op {
	visibility: hidden;
}

/*
 * Phone: a compact card across the width with a margin on both sides, kept
 * to about a fifth of the screen so it never reads as an interstitial.
 */
@media (max-width: 600px) {
	.edodsbo-hjaelp {
		right: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom));
		left: 12px;
		width: auto;
		max-width: none;
	}

	.edodsbo-hjaelp__top {
		padding: 11px 46px 9px 16px;
	}

	.edodsbo-hjaelp__titel {
		font-size: 17px;
	}

	.edodsbo-hjaelp__indhold {
		padding: 10px 16px 12px;
		font-size: 14px;
		line-height: 20px;
	}

	.edodsbo-hjaelp__knapper {
		margin-top: 10px;
		gap: 4px 14px;
	}

	.edodsbo-hjaelp__knap {
		padding: 11px 16px;
		font-size: 13px;
	}

	.edodsbo-hjaelp__link {
		padding: 10px 0;
		font-size: 14px;
	}
}
