/* FCBC Utilities — Cookie Compliance Frontend Styles */

.fcbc-cc-root {
	--fcbc-cc-bg: #ffffff;
	--fcbc-cc-text: #1d2327;
	--fcbc-cc-primary: #1d4ed8;
	--fcbc-cc-btn-text: #ffffff;
	--fcbc-cc-radius: 10px;
	font-family: inherit;
	font-size: 13px;
	line-height: 1.45;
	color: var(--fcbc-cc-text);
	z-index: 999990;
}

.fcbc-cc-root button,
.fcbc-cc-root input,
.fcbc-cc-root select {
	font-family: inherit;
}

.fcbc-cc-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 999992;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(2px);
}

.fcbc-cc-pos-center .fcbc-cc-backdrop:not([hidden]) {
	display: block;
}

.fcbc-cc-backdrop[hidden],
.fcbc-cc-banner[hidden],
.fcbc-cc-revoke-btn[hidden],
.fcbc-cc-details[hidden],
.fcbc-cc-tab-pane[hidden],
.fcbc-cc-signal-notice[hidden] {
	display: none !important;
}

.fcbc-cc-banner {
	position: fixed;
	z-index: 999995;
	background: var(--fcbc-cc-bg);
	color: var(--fcbc-cc-text);
	border: 1px solid rgba(128, 128, 128, 0.25);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
	box-sizing: border-box;
}

.fcbc-cc-pos-bottom .fcbc-cc-banner {
	left: 0;
	right: 0;
	bottom: 0;
	border-radius: 0;
	border-left: 0;
	border-right: 0;
	border-bottom: 0;
}

.fcbc-cc-pos-top .fcbc-cc-banner {
	left: 0;
	right: 0;
	top: 0;
	border-radius: 0;
	border-left: 0;
	border-right: 0;
	border-top: 0;
}

.fcbc-cc-pos-bottom-left .fcbc-cc-banner {
	left: 20px;
	bottom: 20px;
	max-width: 420px;
	width: calc(100% - 40px);
	border-radius: var(--fcbc-cc-radius);
}

.fcbc-cc-pos-bottom-right .fcbc-cc-banner {
	right: 20px;
	bottom: 20px;
	max-width: 420px;
	width: calc(100% - 40px);
	border-radius: var(--fcbc-cc-radius);
}

.fcbc-cc-pos-center .fcbc-cc-banner {
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	max-width: 560px;
	width: calc(100% - 32px);
	max-height: 76vh;
	overflow-y: auto;
	border-radius: var(--fcbc-cc-radius);
}

.fcbc-cc-banner-inner {
	max-width: 1120px;
	margin: 0 auto;
	padding: 12px 18px;
}

.fcbc-cc-banner-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.fcbc-cc-message-wrap {
	flex: 1;
}

.fcbc-cc-message {
	margin: 0 0 6px;
}

.fcbc-cc-policy-line {
	margin: 0;
	font-size: 12.5px;
	opacity: 0.92;
}

.fcbc-cc-link {
	color: var(--fcbc-cc-primary);
	text-decoration: underline;
}

.fcbc-cc-text-btn {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: var(--fcbc-cc-primary);
	text-decoration: underline;
	cursor: pointer;
}

.fcbc-cc-signal-notice {
	display: inline-block;
	margin: 2px 0 6px;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 600;
	background: rgba(29, 78, 216, 0.12);
	color: var(--fcbc-cc-primary);
}

.fcbc-cc-close-btn {
	background: transparent;
	border: 1px solid rgba(128, 128, 128, 0.3);
	color: inherit;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
}

.fcbc-cc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.fcbc-cc-actions-equal .fcbc-cc-btn-equal {
	flex: 1 1 140px;
	text-align: center;
	font-weight: 600;
	min-height: 34px;
}

.fcbc-cc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 7px 14px;
	min-height: 34px;
	border-radius: calc(var(--fcbc-cc-radius) * 0.6);
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	border: 1px solid rgba(128, 128, 128, 0.35);
	background: transparent;
	color: inherit;
	transition: opacity 0.15s ease, background-color 0.15s ease;
}

.fcbc-cc-btn:hover {
	opacity: 0.9;
}

.fcbc-cc-btn-primary {
	background: var(--fcbc-cc-primary);
	border-color: var(--fcbc-cc-primary);
	color: var(--fcbc-cc-btn-text);
}

.fcbc-cc-btn-equal {
	background: rgba(128, 128, 128, 0.08);
	border: 1.5px solid var(--fcbc-cc-primary);
}

.fcbc-cc-btn-equal.fcbc-cc-btn-primary {
	background: var(--fcbc-cc-primary);
	color: var(--fcbc-cc-btn-text);
}

.fcbc-cc-details {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid rgba(128, 128, 128, 0.25);
	max-height: 38vh;
	overflow-y: auto;
}

.fcbc-cc-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.fcbc-cc-tab {
	background: rgba(128, 128, 128, 0.1);
	border: 1px solid transparent;
	border-radius: 6px;
	padding: 5px 10px;
	font-size: 12.5px;
	font-weight: 600;
	color: inherit;
	cursor: pointer;
}

.fcbc-cc-tab.is-active {
	background: var(--fcbc-cc-primary);
	color: var(--fcbc-cc-btn-text);
}

.fcbc-cc-cat-list {
	display: grid;
	gap: 7px;
}

.fcbc-cc-cat-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 10px;
	border: 1px solid rgba(128, 128, 128, 0.22);
	border-radius: 8px;
}

.fcbc-cc-cat-meta p {
	margin: 2px 0 0;
	font-size: 12px;
	opacity: 0.85;
}

.fcbc-cc-switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
}

.fcbc-cc-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.fcbc-cc-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background-color: #9ca3af;
	border-radius: 24px;
	transition: 0.2s;
}

.fcbc-cc-slider::before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: #ffffff;
	border-radius: 50%;
	transition: 0.2s;
}

.fcbc-cc-switch input:checked + .fcbc-cc-slider {
	background-color: var(--fcbc-cc-primary);
}

.fcbc-cc-switch input:disabled + .fcbc-cc-slider {
	opacity: 0.65;
	cursor: not-allowed;
}

.fcbc-cc-switch input:checked + .fcbc-cc-slider::before {
	transform: translateX(20px);
}

.fcbc-cc-duration-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
	flex-wrap: wrap;
}

.fcbc-cc-select {
	padding: 6px 10px;
	border-radius: 6px;
	border: 1px solid rgba(128, 128, 128, 0.35);
	background: var(--fcbc-cc-bg);
	color: var(--fcbc-cc-text);
	font: inherit;
}

.fcbc-cc-pane-footer {
	margin-top: 14px;
	display: flex;
	justify-content: flex-end;
}

.fcbc-cc-paper h4,
.fcbc-cc-metrics h4 {
	margin: 0 0 6px;
	font-size: 14px;
}

.fcbc-cc-paper p {
	margin: 0 0 12px;
}

.fcbc-cc-paper-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.fcbc-cc-record-box {
	padding: 10px 12px;
	border: 1px solid rgba(128, 128, 128, 0.22);
	border-radius: 8px;
	margin-bottom: 12px;
	font-size: 13px;
}

.fcbc-cc-record-row {
	margin: 2px 0;
}

.fcbc-cc-tp-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 6px;
}

.fcbc-cc-tp-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 7px 10px;
	border: 1px solid rgba(128, 128, 128, 0.2);
	border-radius: 6px;
	font-size: 13px;
}

.fcbc-cc-tp-badge {
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
}

.fcbc-cc-tp-badge.is-allowed {
	background: #dcfce7;
	color: #166534;
}

.fcbc-cc-tp-badge.is-blocked {
	background: #fee2e2;
	color: #991b1b;
}

.fcbc-cc-revoke-btn {
	position: fixed;
	z-index: 999985;
	background: var(--fcbc-cc-bg);
	color: var(--fcbc-cc-text);
	border: 1px solid rgba(128, 128, 128, 0.35);
	border-radius: 999px;
	padding: 7px 14px;
	font-size: 12px;
	font-weight: 600;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
	cursor: pointer;
}

.fcbc-cc-revoke-pos-bottom-left {
	left: 16px;
	bottom: 16px;
}

.fcbc-cc-revoke-pos-bottom-right {
	right: 16px;
	bottom: 16px;
}

.fcbc-cc-revoke-pos-top-left {
	left: 16px;
	top: 16px;
}

.fcbc-cc-revoke-pos-top-right {
	right: 16px;
	top: 16px;
}

.fcbc-cc-iframe-placeholder {
	border: 1px dashed #9ca3af;
	background: #f9fafb;
	color: #1f2937;
	padding: 20px;
	border-radius: 8px;
	text-align: center;
	margin: 12px 0;
	font-family: inherit;
}

.fcbc-cc-iframe-placeholder-text {
	margin: 0 0 10px;
	font-size: 14px;
}

.fcbc-cc-iframe-allow-btn {
	background: #1d4ed8;
	color: #ffffff;
	border: 0;
	border-radius: 6px;
	padding: 8px 14px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

@keyframes fcbcCcSlideUp {
	from {
		transform: translateY(100%);
	}
	to {
		transform: translateY(0);
	}
}

@media (max-width: 768px) {
	body.fcbc-cc-open {
		overflow: hidden;
	}

	.fcbc-cc-backdrop:not([hidden]) {
		display: block;
	}

	.fcbc-cc-pos-bottom .fcbc-cc-banner,
	.fcbc-cc-pos-top .fcbc-cc-banner,
	.fcbc-cc-pos-bottom-left .fcbc-cc-banner,
	.fcbc-cc-pos-bottom-right .fcbc-cc-banner,
	.fcbc-cc-pos-center .fcbc-cc-banner {
		left: 0;
		right: 0;
		bottom: 0;
		top: auto;
		transform: none;
		width: 100%;
		max-width: 100%;
		max-height: 82vh;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		border-radius: 16px 16px 0 0;
		border-left: 0;
		border-right: 0;
		border-bottom: 0;
		animation: fcbcCcSlideUp 0.25s ease-out;
	}

	.fcbc-cc-banner-inner {
		padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
	}

	.fcbc-cc-details {
		max-height: none;
		overflow: visible;
	}

	.fcbc-cc-actions-equal .fcbc-cc-btn-equal {
		flex: 1 1 100%;
	}
}
