/* FactorBravo GDPR — centered card, large type, scroll inside body when tall */

.fb-gdpr-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	background: rgba(15, 18, 28, 0.55);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
	box-sizing: border-box;
}

.fb-gdpr-modal {
	width: 100%;
	max-width: 580px;
	max-height: min(90vh, 860px);
	min-height: 0;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: #1f2937;
	font-size: clamp(17px, 2.4vw, 19px);
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
}

.fb-gdpr-modal__head {
	flex: 0 0 auto;
	padding: 20px 22px 14px;
	text-align: center;
	border-bottom: 1px solid #eef0f4;
}

.fb-gdpr-modal__title {
	margin: 0;
	font-size: clamp(1.35rem, 3.8vw, 1.65rem);
	font-weight: 700;
	line-height: 1.25;
	color: #111827;
}

.fb-gdpr-modal__intro {
	margin: 12px 0 0;
	font-size: clamp(1.02rem, 2.4vw, 1.12rem);
	line-height: 1.55;
	color: #374151;
}

.fb-gdpr-modal__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding: 14px 18px 10px;
}

.fb-gdpr-card {
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 16px 16px 14px;
	margin-bottom: 12px;
	background: #fafbfc;
}

.fb-gdpr-card__title {
	font-size: clamp(1.06rem, 2.5vw, 1.2rem);
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 8px;
	color: #111827;
}

.fb-gdpr-card__desc {
	font-size: clamp(0.98rem, 2.2vw, 1.06rem);
	line-height: 1.55;
	color: #4b5563;
	margin: 0 0 12px;
}

.fb-gdpr-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 48px;
}

.fb-gdpr-row__label {
	font-size: clamp(1rem, 2.3vw, 1.08rem);
	line-height: 1.35;
	color: #374151;
	flex: 1;
}

.fb-gdpr-switch {
	position: relative;
	width: 54px;
	height: 32px;
	flex-shrink: 0;
}

.fb-gdpr-switch input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.fb-gdpr-switch__ui {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: #d1d5db;
	border-radius: 999px;
	transition: background 0.2s;
}

.fb-gdpr-switch__ui::before {
	content: "";
	position: absolute;
	height: 24px;
	width: 24px;
	left: 4px;
	bottom: 4px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
	transition: transform 0.2s;
}

.fb-gdpr-switch input:checked + .fb-gdpr-switch__ui {
	background: #1e6cd9;
}

.fb-gdpr-switch input:checked + .fb-gdpr-switch__ui::before {
	transform: translateX(22px);
}

.fb-gdpr-switch input:disabled + .fb-gdpr-switch__ui {
	opacity: 0.55;
	cursor: not-allowed;
}

.fb-gdpr-modal__foot {
	flex: 0 0 auto;
	padding: 12px 18px 16px;
	border-top: 1px solid #eef0f4;
	background: #fff;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.fb-gdpr-legal {
	font-size: clamp(0.92rem, 2vw, 1rem);
	line-height: 1.45;
	color: #6b7280;
	margin: 0 0 8px;
	padding: 0 2px;
}

.fb-gdpr-btn {
	border: 0;
	border-radius: 12px;
	padding: 12px 20px;
	font-size: clamp(1rem, 2.3vw, 1.1rem);
	font-weight: 600;
	line-height: 1.25;
	cursor: pointer;
	transition: opacity 0.15s, transform 0.1s;
}

.fb-gdpr-btn:active {
	transform: scale(0.98);
}

.fb-gdpr-btn--ghost {
	background: transparent;
	color: #1e6cd9;
	font-weight: 600;
	padding: 12px 10px;
	font-size: clamp(1rem, 2.3vw, 1.1rem);
}

.fb-gdpr-btn--ghost:hover {
	text-decoration: underline;
}

.fb-gdpr-btn--primary {
	background: #1e6cd9;
	color: #fff;
}

.fb-gdpr-btn--primary:hover {
	opacity: 0.92;
}

.fb-gdpr-btn--muted {
	background: #f3f4f6;
	color: #374151;
}

.fb-gdpr-btn--muted:hover {
	background: #e5e7eb;
}

.fb-gdpr-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: flex-end;
	flex: 1;
}

.fb-gdpr-privacy {
	display: block;
	margin-top: 6px;
	font-size: clamp(0.98rem, 2.2vw, 1.05rem);
	line-height: 1.4;
}

.fb-gdpr-privacy a {
	color: #1e6cd9;
}

/* Статичен линк във footer — не fixed, не покрива съдържание */
.fb-gdpr-footer-wrap {
	display: block;
	width: 100%;
	text-align: center;
	padding: 8px 12px 12px;
	margin: 0;
	box-sizing: border-box;
	font-size: 0.9em;
	line-height: 1.4;
}

.fb-gdpr-footer-wrap[hidden] {
	display: none !important;
}

.fb-gdpr-footer-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 6px 10px;
	background: transparent;
	border: 0;
	cursor: pointer;
	font: inherit;
	color: inherit;
	opacity: 0.75;
	text-decoration: underline;
	text-underline-offset: 3px;
	vertical-align: baseline;
}

.fb-gdpr-footer-link:hover,
.fb-gdpr-footer-link:focus {
	opacity: 1;
	outline: none;
}

.fb-gdpr-footer-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
	border-radius: 2px;
}

.fb-gdpr-footer-link svg {
	width: 1em;
	height: 1em;
	flex-shrink: 0;
	opacity: 0.85;
}

@media (max-width: 480px) {
	.fb-gdpr-modal {
		max-height: min(92vh, 900px);
	}

	.fb-gdpr-modal__foot {
		flex-direction: column;
		align-items: stretch;
	}

	.fb-gdpr-actions {
		justify-content: stretch;
	}

	.fb-gdpr-btn,
	.fb-gdpr-btn--ghost {
		width: 100%;
		text-align: center;
	}
}

body.fb-gdpr--lock {
	overflow: hidden !important;
}
