/**
 * Foleia Consent — public styles.
 *
 * Design tokens: white surface, near-black text (#0b0b0b), warm neutral
 * details (#f0eee9), outline buttons with inverted hover, Georgia titles,
 * Trebuchet MS/Arial body, 160ms motion. No external resources.
 */

#fc-consent-root,
#fc-consent-root *,
#fc-consent-root *::before,
#fc-consent-root *::after {
	box-sizing: border-box;
}

#fc-consent-root {
	font-family: "Trebuchet MS", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: #0b0b0b;
}

/* Author display rules (notably .fc-modal) must never override the hidden
 * state: an invisible dialog must not intercept clicks on the page. */
#fc-consent-root [hidden] {
	display: none !important;
}

#fc-consent-root .fc-visually-hidden,
.fc-visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ---------------------------------------------------------------- Banner */

.fc-banner {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 999990;
	width: min(420px, calc(100vw - 32px));
}

.fc-banner__card {
	position: relative;
	background: #ffffff;
	color: #0b0b0b;
	border: 1px solid #0b0b0b;
	border-radius: 12px;
	box-shadow: 0 10px 32px rgba(11, 11, 11, 0.16);
	padding: 22px;
	animation: fc-banner-in 160ms ease-out;
}

@keyframes fc-banner-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.fc-banner__title,
.fc-modal__title,
.fc-purpose__label {
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 700;
	color: #0b0b0b;
}

.fc-banner__title {
	margin: 0 40px 8px 0;
	font-size: 22px;
	line-height: 1.25;
}

.fc-banner__intro {
	margin: 0 0 12px;
	font-size: 15px;
}

.fc-banner__links,
.fc-modal__links {
	margin: 0 0 16px;
	font-size: 14px;
}

.fc-banner__links a,
.fc-modal__links a {
	color: #0b0b0b;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.fc-banner__links a:hover,
.fc-modal__links a:hover {
	text-decoration-thickness: 2px;
}

.fc-banner__dismiss,
.fc-modal__close {
	appearance: none;
	position: absolute;
	top: 8px;
	right: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: #ffffff;
	border: 1px solid transparent;
	border-radius: 8px;
	color: #0b0b0b;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.fc-banner__dismiss:hover,
.fc-modal__close:hover {
	background: #0b0b0b;
	color: #ffffff;
	border-color: #0b0b0b;
}

.fc-banner__actions,
.fc-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Buttons: identical visual weight for accept, reject and customize (BNR-002). */
#fc-consent-root .fc-btn {
	appearance: none;
	flex: 1 1 0;
	min-width: 120px;
	min-height: 44px;
	padding: 10px 16px;
	background: #ffffff;
	border: 1.5px solid #0b0b0b;
	border-radius: 8px;
	color: #0b0b0b;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	cursor: pointer;
	transition: background-color 160ms ease, color 160ms ease;
}

#fc-consent-root .fc-btn:hover,
#fc-consent-root .fc-btn:focus-visible {
	background: #0b0b0b;
	color: #ffffff;
}

#fc-consent-root .fc-btn:disabled,
#fc-consent-root .fc-btn[aria-disabled="true"] {
	opacity: 0.55;
	cursor: not-allowed;
}

#fc-consent-root .fc-btn:disabled:hover {
	background: #ffffff;
	color: #0b0b0b;
}

/* Visible focus on every interactive element (BNR-006). */
#fc-consent-root :is(a, button, input, summary):focus-visible {
	outline: 2px solid #0b0b0b;
	outline-offset: 2px;
	border-radius: 4px;
}

/* ----------------------------------------------------------------- Modal */

.fc-modal {
	position: fixed;
	inset: 0;
	z-index: 999995;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.fc-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(11, 11, 11, 0.5);
	animation: fc-fade-in 160ms ease-out;
}

@keyframes fc-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.fc-modal__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(640px, 100%);
	max-height: min(760px, calc(100vh - 32px));
	max-height: min(760px, calc(100dvh - 32px));
	background: #ffffff;
	color: #0b0b0b;
	border: 1px solid #0b0b0b;
	border-radius: 12px;
	box-shadow: 0 16px 48px rgba(11, 11, 11, 0.22);
	animation: fc-modal-in 160ms ease-out;
}

@keyframes fc-modal-in {
	from {
		opacity: 0;
		transform: scale(0.98);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.fc-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 48px;
	padding: 20px 24px 12px;
	border-bottom: 1px solid #f0eee9;
}

.fc-modal__title {
	margin: 0;
	font-size: 24px;
	line-height: 1.25;
}

.fc-modal__close {
	position: static;
	flex: 0 0 auto;
}

.fc-modal__body {
	padding: 16px 24px;
	overflow-y: auto;
}

.fc-modal__summary {
	margin: 0 0 16px;
	padding: 10px 14px;
	background: #f0eee9;
	border-radius: 8px;
	font-size: 14px;
}

.fc-modal__footer {
	padding: 16px 24px 20px;
	border-top: 1px solid #f0eee9;
}

/* -------------------------------------------------------------- Purposes */

.fc-purposes {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 12px;
}

.fc-purpose {
	background: #f0eee9;
	border: 1px solid transparent;
	border-radius: 10px;
	padding: 14px 16px;
}

.fc-purpose__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 44px;
}

.fc-purpose__label {
	margin: 0;
	font-size: 17px;
}

.fc-purpose__badge {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 4px 12px;
	background: #0b0b0b;
	border-radius: 999px;
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
}

.fc-purpose__desc {
	margin: 6px 0 0;
	font-size: 14px;
}

.fc-purpose__details {
	margin-top: 10px;
	font-size: 14px;
}

.fc-purpose__details summary {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	cursor: pointer;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.fc-purpose__providers {
	margin: 4px 0 0;
	padding-left: 18px;
}

.fc-purpose__providers li {
	margin-bottom: 6px;
}

.fc-purpose__providers a {
	color: #0b0b0b;
}

/* ---------------------------------------------------------------- Switch */

.fc-switch {
	position: relative;
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	width: 56px;
	height: 44px;
	cursor: pointer;
}

.fc-switch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.fc-switch__track {
	position: relative;
	display: block;
	width: 52px;
	height: 28px;
	margin: 8px 2px;
	background: #ffffff;
	border: 1.5px solid #0b0b0b;
	border-radius: 999px;
	transition: background-color 160ms ease;
}

.fc-switch__track::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	background: #0b0b0b;
	border-radius: 50%;
	transition: transform 160ms ease;
}

.fc-switch input:checked + .fc-switch__track {
	background: #0b0b0b;
}

.fc-switch input:checked + .fc-switch__track::after {
	background: #ffffff;
	transform: translateX(24px);
}

.fc-switch input:focus-visible + .fc-switch__track {
	outline: 2px solid #0b0b0b;
	outline-offset: 2px;
}

/* ------------------------------------------------- Status and error text */

.fc-error {
	margin: 12px 0 0;
	padding: 10px 14px;
	background: #f0eee9;
	border-left: 3px solid #0b0b0b;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
}

.fc-status {
	margin: 12px 0 0;
	font-size: 14px;
	font-style: italic;
}

/* ------------------------------------------------------- Embed placeholder */

.fc-embed-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 160px;
	padding: 24px;
	background: #f0eee9;
	color: #0b0b0b;
	border: 1px dashed #0b0b0b;
	border-radius: 10px;
	font-family: "Trebuchet MS", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	text-align: center;
}

.fc-embed-placeholder p {
	margin: 0;
	max-width: 52ch;
}

.fc-embed-placeholder .fc-btn {
	flex: 0 0 auto;
	min-width: 0;
}

/* ------------------------------------------------------------------ Mobile */

@media (max-width: 480px) {
	.fc-banner {
		right: 12px;
		left: 12px;
		bottom: 12px;
		width: auto;
	}

	.fc-banner__card {
		padding: 18px;
	}

	.fc-banner__actions,
	.fc-modal__actions {
		flex-direction: column;
	}

	#fc-consent-root .fc-btn {
		width: 100%;
	}

	.fc-modal {
		padding: 0;
		align-items: flex-end;
	}

	.fc-modal__panel {
		width: 100%;
		max-height: calc(100dvh - 16px);
		border-radius: 12px 12px 0 0;
	}
}

/* ---------------------------------------------------------- Reduced motion */

@media (prefers-reduced-motion: reduce) {
	.fc-banner__card,
	.fc-modal__overlay,
	.fc-modal__panel {
		animation: none;
	}

	#fc-consent-root .fc-btn,
	.fc-banner__dismiss,
	.fc-modal__close,
	.fc-switch__track,
	.fc-switch__track::after {
		transition: none;
	}
}
