/*
 * Flytta till Polen – wpForo Compatibility 1.8.0
 * Clean rollback: official wpForo CSS + minimal safe overrides only.
 */

.ftp-wpforo-page {
	overflow-x: hidden;
}

.ftp-wpforo-page .wp-site-blocks > main,
.ftp-wpforo-page main.wp-block-group,
.ftp-wpforo-page main .wp-block-post-content,
.ftp-wpforo-page .entry-content,
.ftp-wpforo-page .wp-block-post-content {
	width: min(100% - 2rem, 1240px) !important;
	max-width: 1240px !important;
	margin-inline: auto !important;
	padding-inline: 0 !important;
	min-width: 0 !important;
}

.ftp-wpforo-page #wpforo,
.ftp-wpforo-page #wpforo-wrap,
.ftp-wpforo-page .wpforo-wrap {
	width: 100% !important;
	max-width: 1120px !important;
	margin-inline: auto !important;
	box-sizing: border-box !important;
	font-family: inherit !important;
}

/* Prevent global theme typography from breaking wpForo. */
.ftp-wpforo-page #wpforo *,
.ftp-wpforo-page #wpforo-wrap *,
.ftp-wpforo-page .wpforo-wrap * {
	box-sizing: border-box !important;
	min-width: 0;
}

.ftp-wpforo-page #wpforo h1,
.ftp-wpforo-page #wpforo h2,
.ftp-wpforo-page #wpforo h3,
.ftp-wpforo-page #wpforo h4,
.ftp-wpforo-page #wpforo h5,
.ftp-wpforo-page #wpforo h6,
.ftp-wpforo-page #wpforo-wrap h1,
.ftp-wpforo-page #wpforo-wrap h2,
.ftp-wpforo-page #wpforo-wrap h3,
.ftp-wpforo-page #wpforo-wrap h4,
.ftp-wpforo-page #wpforo-wrap h5,
.ftp-wpforo-page #wpforo-wrap h6 {
	letter-spacing: normal !important;
	text-transform: none !important;
	font-family: inherit !important;
	word-break: normal !important;
	overflow-wrap: break-word !important;
	white-space: normal !important;
}

/* Keep images and SVGs from being blown up by the theme. */
.ftp-wpforo-page #wpforo svg,
.ftp-wpforo-page #wpforo-wrap svg,
.ftp-wpforo-page .wpforo-wrap svg {
	max-width: 1.25em !important;
	max-height: 1.25em !important;
	width: auto !important;
	height: auto !important;
}

.ftp-wpforo-page #wpforo img,
.ftp-wpforo-page #wpforo-wrap img,
.ftp-wpforo-page .wpforo-wrap img {
	max-width: 100% !important;
	height: auto !important;
}

/* Forms should remain inside the viewport. */
.ftp-wpforo-page #wpforo input,
.ftp-wpforo-page #wpforo select,
.ftp-wpforo-page #wpforo textarea,
.ftp-wpforo-page #wpforo button,
.ftp-wpforo-page #wpforo-wrap input,
.ftp-wpforo-page #wpforo-wrap select,
.ftp-wpforo-page #wpforo-wrap textarea,
.ftp-wpforo-page #wpforo-wrap button {
	max-width: 100% !important;
	font-family: inherit !important;
}

/* Hide frontend admin control panel only. */
.ftp-wpforo-admin-view #wpforo .wpf-admincp,
.ftp-wpforo-admin-view #wpforo .wpforo-admin-control,
.ftp-wpforo-admin-view #wpforo .wpf-admin-control,
.ftp-wpforo-admin-view #wpforo-wrap .wpf-admincp,
.ftp-wpforo-admin-view #wpforo-wrap .wpforo-admin-control,
.ftp-wpforo-admin-view #wpforo-wrap .wpf-admin-control {
	display: none !important;
}

@media (max-width: 820px) {
	.ftp-wpforo-page .wp-site-blocks > main,
	.ftp-wpforo-page main.wp-block-group,
	.ftp-wpforo-page main .wp-block-post-content,
	.ftp-wpforo-page .entry-content,
	.ftp-wpforo-page .wp-block-post-content {
		width: calc(100% - 0.75rem) !important;
		max-width: none !important;
	}

	.ftp-wpforo-page #wpforo,
	.ftp-wpforo-page #wpforo-wrap,
	.ftp-wpforo-page .wpforo-wrap {
		width: 100% !important;
		max-width: none !important;
		margin: 0 !important;
		padding-inline: 0 !important;
	}

	.ftp-wpforo-page .wp-block-post-title,
	.ftp-wpforo-page main > h1,
	.ftp-wpforo-page .entry-title {
		font-size: clamp(2.2rem, 11vw, 3.2rem) !important;
		line-height: 1.05 !important;
	}

	.ftp-wpforo-page #wpforo {
		padding-bottom: calc(2rem + env(safe-area-inset-bottom)) !important;
	}
}
