:root {
	--fm-consent-accent: #1363df;
	--fm-consent-text: #1f2937;
	--fm-consent-background: #ffffff;
}

.fm-consent-banner {
	background: var(--fm-consent-background);
	border: 1px solid rgba(15, 23, 42, 0.1);
	box-shadow: 0 18px 45px rgba(15, 23, 42, 0.15);
	box-sizing: border-box;
	color: var(--fm-consent-text);
	font-size: var(--fm-consent-font-size, 14px);
	line-height: 1.5;
	position: fixed;
	left: 0;
	right: 0;
	z-index: 999999;
}

.fm-consent-banner[hidden] {
	display: none;
}

/* Dims the page behind the bar/box so the visitor's focus is drawn to the
   banner; the modal layout doesn't need this, it has its own backdrop. */
.fm-consent-page-overlay {
	background: rgba(15, 23, 42, 0.45);
	bottom: 0;
	left: 0;
	position: fixed;
	right: 0;
	top: 0;
	z-index: 999998;
}

.fm-consent-page-overlay[hidden] {
	display: none;
}

.fm-consent-position-bottom {
	bottom: 0;
	padding-bottom: env(safe-area-inset-bottom, 0px);
}

.fm-consent-position-top {
	top: 0;
}

.fm-consent-layout-bar .fm-consent-banner__inner {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	justify-content: space-between;
	margin: 0 auto;
	max-width: 1200px;
	padding: 20px 24px;
}

.fm-consent-layout-box {
	border-radius: 12px;
	bottom: 20px !important;
	left: 20px !important;
	max-width: 380px;
	right: auto;
	top: auto !important;
}

.fm-consent-layout-box .fm-consent-banner__inner {
	padding: 20px;
}

.fm-consent-banner__text {
	flex: 1 1 320px;
}

.fm-consent-banner__title {
	font-size: 1.143em;
	font-weight: 600;
	margin: 0 0 6px;
}

.fm-consent-banner__desc {
	margin: 0;
}

.fm-consent-banner__desc a {
	color: var(--fm-consent-accent);
}

.fm-consent-categories {
	margin-top: 16px;
	display: grid;
	gap: 12px;
}

.fm-consent-categories[hidden] {
	display: none;
}

.fm-consent-category {
	align-items: baseline;
	column-gap: 8px;
	display: grid;
	grid-template-columns: auto 1fr;
}

.fm-consent-category input {
	margin-top: 3px;
}

.fm-consent-category__label {
	font-weight: 600;
	grid-column: 2;
}

.fm-consent-category__desc {
	color: rgba(31, 41, 55, 0.75);
	display: block;
	font-size: 0.929em;
	grid-column: 2;
	white-space: pre-line;
}

.fm-consent-banner__actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	flex: 0 0 auto;
}

.fm-consent-btn {
	border-radius: var(--fm-consent-button-radius, 6px);
	border: 1px solid transparent;
	cursor: pointer;
	font-size: 1em;
	font-weight: 600;
	padding: 10px 18px;
	white-space: nowrap;
}

.fm-consent-btn--primary {
	background: var(--fm-consent-accent);
	color: #ffffff;
}

.fm-consent-btn--secondary {
	background: transparent;
	border-color: rgba(15, 23, 42, 0.2);
	color: var(--fm-consent-text);
}

.fm-consent-btn--link {
	background: none;
	border: 0;
	color: var(--fm-consent-accent);
	padding: 10px 4px;
	text-decoration: underline;
}

.fm-consent-reopen-wrap {
	text-align: var(--fm-consent-footer-align, inherit);
}

.fm-consent-reopen {
	background: none;
	border: 0;
	color: var(--fm-consent-footer-link-color, inherit);
	cursor: pointer;
	font-family: var(--fm-consent-footer-font-family, inherit);
	font-size: var(--fm-consent-footer-font-size, inherit);
	font-weight: var(--fm-consent-footer-font-weight, inherit);
	line-height: var(--fm-consent-footer-line-height, inherit);
	letter-spacing: var(--fm-consent-footer-letter-spacing, inherit);
	padding: 0;
	text-decoration: underline;
}

.fm-consent-reopen:hover,
.fm-consent-reopen:focus {
	color: var(--fm-consent-footer-link-hover-color, inherit);
}

.fm-consent-reopen:visited {
	color: var(--fm-consent-footer-link-visited-color, inherit);
}

.fm-consent-reopen.fm-consent-underline-none {
	text-decoration: none;
}

.fm-consent-reopen.fm-consent-underline-hover {
	text-decoration: none;
}

.fm-consent-reopen.fm-consent-underline-hover:hover,
.fm-consent-reopen.fm-consent-underline-hover:focus {
	text-decoration: underline;
}

@media (max-width: 600px) {
	.fm-consent-reopen-wrap {
		text-align: var(--fm-consent-footer-align-mobile, var(--fm-consent-footer-align, inherit));
	}

	.fm-consent-reopen {
		font-size: var(--fm-consent-footer-font-size-mobile, var(--fm-consent-footer-font-size, inherit));
	}
}

.fm-consent-placeholder {
	background: rgba(15, 23, 42, 0.04);
	border: 1px solid rgba(15, 23, 42, 0.1);
	border-radius: 8px;
	box-sizing: border-box;
	padding: 24px;
	text-align: center;
}

.fm-consent-placeholder__text {
	margin: 0 0 14px;
}

.fm-consent-placeholder__actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

.fm-consent-embed iframe {
	max-width: 100%;
}

.fm-consent-placeholder--overlay {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 0;
	bottom: 0;
	color: #ffffff;
	cursor: pointer;
	display: flex;
	justify-content: center;
	left: 0;
	position: absolute;
	right: 0;
	top: 0;
	transition: background-color 0.15s ease;
	z-index: 5;
}

/* Invisible (thumbnail shows through unobstructed) until the first click,
   which reveals the consent choice instead of the builder's own player. */
.fm-consent-placeholder--overlay .fm-consent-placeholder__inner {
	max-width: var(--fm-consent-overlay-max-width, 50%);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.fm-consent-placeholder--overlay.is-revealed {
	background: rgba(15, 23, 42, 0.82);
	cursor: default;
}

.fm-consent-placeholder--overlay.is-revealed .fm-consent-placeholder__inner {
	opacity: 1;
	pointer-events: auto;
}

.fm-consent-placeholder--overlay .fm-consent-placeholder__text {
	color: #ffffff;
}

@media (max-width: 600px) {
	.fm-consent-layout-bar .fm-consent-banner__inner {
		padding: 16px;
	}

	.fm-consent-banner__actions {
		width: 100%;
	}

	.fm-consent-btn {
		flex: 1 1 auto;
	}
}

/* ------------------------------------------------------------------ *
 * Modal layout (tab per category, full-length description text)
 * ------------------------------------------------------------------ */

.fm-consent-layout-modal {
	align-items: center;
	background: rgba(15, 23, 42, 0.6);
	border: 0;
	bottom: 0;
	box-shadow: none;
	display: flex;
	justify-content: center;
	left: 0;
	overflow-y: auto;
	padding: 20px;
	right: 0;
	top: 0;
}

.fm-consent-modal {
	background: var(--fm-consent-background);
	border-radius: var(--fm-consent-modal-radius, 12px);
	box-shadow: 0 25px 60px rgba(15, 23, 42, 0.35);
	box-sizing: border-box;
	color: var(--fm-consent-text);
	display: flex;
	flex-direction: column;
	max-height: 100%;
	max-width: var(--fm-consent-modal-width, 680px);
	overflow: hidden;
	width: 100%;
}

.fm-consent-modal__header {
	align-items: center;
	border-bottom: 1px solid rgba(15, 23, 42, 0.1);
	display: flex;
	justify-content: space-between;
	padding: 20px 24px;
}

.fm-consent-modal__title {
	font-size: 1.286em;
	font-weight: 700;
	letter-spacing: 0.02em;
	margin: 0;
	text-transform: uppercase;
}

.fm-consent-modal__close {
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	font-size: 1.714em;
	line-height: 1;
	padding: 4px;
}

.fm-consent-modal__body {
	display: flex;
	min-height: 0;
	overflow: hidden;
}

.fm-consent-modal__tabs {
	border-right: 1px solid rgba(15, 23, 42, 0.1);
	display: flex;
	flex: 0 0 220px;
	flex-direction: column;
	overflow-y: auto;
}

.fm-consent-modal__tab {
	background: none;
	border: 0;
	cursor: pointer;
	font-size: 1.071em;
	font-weight: 600;
	padding: 16px 20px;
	text-align: left;
}

.fm-consent-modal__tab.is-active {
	background: var(--fm-consent-accent);
	color: #ffffff;
}

.fm-consent-modal__panels {
	flex: 1;
	overflow-y: auto;
}

.fm-consent-modal__panel {
	background: var(--fm-consent-modal-panel-background, var(--fm-consent-accent));
	color: var(--fm-consent-modal-panel-text, #ffffff);
	display: none;
	min-height: 100%;
	padding: 24px;
}

.fm-consent-modal__panel.is-active {
	display: flex;
	flex-direction: column;
}

.fm-consent-modal__panel-text {
	flex: 1;
	line-height: 1.7;
	margin: 0 0 20px;
	white-space: pre-line;
}

.fm-consent-modal__panel-footer {
	align-items: center;
	border-top: 1px solid rgba(255, 255, 255, 0.25);
	display: flex;
	font-weight: 600;
	justify-content: space-between;
	padding-top: 16px;
}

.fm-consent-modal__always-active {
	font-size: 0.857em;
	letter-spacing: 0.04em;
	opacity: 0.8;
	text-transform: uppercase;
}

.fm-consent-toggle {
	cursor: pointer;
	display: inline-block;
	position: relative;
}

.fm-consent-toggle input {
	clip: rect(0, 0, 0, 0);
	height: 1px;
	left: 0;
	overflow: hidden;
	position: absolute;
	top: 0;
	white-space: nowrap;
	width: 1px;
}

.fm-consent-toggle__track {
	background: rgba(255, 255, 255, 0.3);
	border-radius: 999px;
	display: block;
	height: 26px;
	position: relative;
	transition: background-color 0.15s ease;
	width: 46px;
}

.fm-consent-toggle__thumb {
	background: #ffffff;
	border-radius: 50%;
	display: block;
	height: 20px;
	left: 3px;
	position: absolute;
	top: 3px;
	transition: left 0.15s ease;
	width: 20px;
}

.fm-consent-toggle input:checked + .fm-consent-toggle__track {
	background: #ffffff;
}

.fm-consent-toggle input:checked + .fm-consent-toggle__track .fm-consent-toggle__thumb {
	background: var(--fm-consent-accent);
	left: 23px;
}

.fm-consent-toggle input:focus-visible + .fm-consent-toggle__track {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

.fm-consent-modal__footer {
	border-top: 1px solid rgba(15, 23, 42, 0.1);
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	padding: 16px 24px;
}

@media (max-width: 600px) {
	.fm-consent-modal__body {
		flex-direction: column;
	}

	.fm-consent-modal__tabs {
		border-bottom: 1px solid rgba(15, 23, 42, 0.1);
		border-right: 0;
		flex: 0 0 auto;
		flex-direction: row;
		overflow-x: auto;
	}

	.fm-consent-modal__tab {
		white-space: nowrap;
	}

	.fm-consent-modal__footer {
		flex-wrap: wrap;
	}

	.fm-consent-modal__footer .fm-consent-btn {
		flex: 1 1 auto;
	}
}
