/* FBM Samtycke */
.fbm-banner, .fbm-dialog, .fbm-embed-msg {
	--fbm-bg: #ffffff;
	--fbm-fg: #1d2327;
	--fbm-muted: #50575e;
	--fbm-line: #c3c4c7;
	--fbm-accent: #0b4f8a;
	--fbm-accent-fg: #ffffff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--fbm-fg);
	box-sizing: border-box;
}
.fbm-banner *, .fbm-dialog *, .fbm-embed-msg * { box-sizing: border-box; }

.fbm-banner {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 99999;
	background: var(--fbm-bg);
	border-top: 1px solid var(--fbm-line);
	box-shadow: 0 -4px 16px rgba(0, 0, 0, .12);
	padding: 16px 20px;
	display: flex;
	gap: 20px;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
}
.fbm-banner-text { flex: 1 1 420px; max-width: 820px; }
.fbm-banner-text p { margin: 4px 0 0; color: var(--fbm-muted); }
.fbm-banner-text a { color: var(--fbm-accent); text-decoration: underline; }
.fbm-title { display: block; font-size: 17px; font-weight: 700; margin: 0; color: var(--fbm-fg); }

.fbm-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Placering som ruta i hörnet */
.fbm-banner.fbm-pos-left, .fbm-banner.fbm-pos-right {
	bottom: 16px; width: calc(100% - 32px); max-width: 440px;
	border: 1px solid var(--fbm-line); border-radius: 8px;
	flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 14px;
}
.fbm-banner.fbm-pos-left { left: 16px; right: auto; }
.fbm-banner.fbm-pos-right { right: 16px; left: auto; }
.fbm-banner.fbm-pos-left .fbm-banner-text, .fbm-banner.fbm-pos-right .fbm-banner-text { flex: 0 0 auto; }

/* Liten knapp för att ändra valet */
.fbm-fab {
	position: fixed; bottom: 16px; left: 16px; z-index: 99998;
	appearance: none; cursor: pointer; font: 600 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	padding: 10px 14px; min-height: 40px;
	border: 2px solid var(--fbm-accent); border-radius: 999px;
	background: var(--fbm-accent); color: var(--fbm-accent-fg);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.fbm-fab[hidden] { display: none; }
.fbm-fab:focus-visible { outline: 3px solid #ffb000; outline-offset: 2px; }

/* Alla tre knapparna har samma utseende: avvisa är lika enkelt som godkänna. */
.fbm-btn {
	appearance: none;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	padding: 10px 18px;
	min-height: 44px;
	border: 2px solid var(--fbm-accent);
	border-radius: 6px;
	background: var(--fbm-accent);
	color: var(--fbm-accent-fg);
}
.fbm-btn:hover { filter: brightness(1.15); }
.fbm-btn:focus-visible, .fbm-x:focus-visible, .fbm-row input:focus-visible {
	outline: 3px solid #ffb000;
	outline-offset: 2px;
}

.fbm-overlay {
	position: fixed; inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, .55);
	display: flex; align-items: center; justify-content: center;
	padding: 16px;
}
.fbm-dialog {
	position: relative;
	width: 100%; max-width: 560px;
	max-height: 100%; overflow: auto;
	background: var(--fbm-bg);
	border-radius: 8px;
	padding: 24px;
}
.fbm-dialog .fbm-title { font-size: 20px; margin-bottom: 12px; padding-right: 32px; }
.fbm-dialog .fbm-actions { margin-top: 20px; justify-content: flex-end; }
.fbm-x {
	position: absolute; top: 10px; right: 12px;
	width: 36px; height: 36px;
	border: 0; background: transparent;
	font-size: 28px; line-height: 1; cursor: pointer;
	color: var(--fbm-muted);
}

.fbm-row { border-top: 1px solid var(--fbm-line); padding: 12px 0; }
.fbm-row-head { display: flex; align-items: center; gap: 10px; }
.fbm-row-title { flex: 1; font-weight: 600; cursor: pointer; }
.fbm-locked { font-size: 13px; color: var(--fbm-muted); }
.fbm-row input { width: 22px; height: 22px; accent-color: var(--fbm-accent); }
.fbm-row-text { margin: 4px 0 0; color: var(--fbm-muted); }

/* Platshållare där en inbäddning blockerats */
.fbm-embed { width: 100%; }
.fbm-embed-msg {
	background: #f0f0f1;
	border: 1px solid var(--fbm-line);
	border-radius: 6px;
	padding: 24px;
	text-align: center;
	min-height: 200px;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.fbm-embed-msg p { margin: 0; max-width: 420px; }

@media (max-width: 600px) {
	.fbm-banner { padding: 14px 16px; max-height: 80vh; overflow: auto; }
	.fbm-banner.fbm-pos-left, .fbm-banner.fbm-pos-right { left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none; }
	.fbm-actions .fbm-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: no-preference) {
	.fbm-banner { animation: fbm-in .25s ease-out; }
	@keyframes fbm-in { from { transform: translateY(100%); } to { transform: none; } }
}
