/* 4Clicks Consent Manager — Banner & Modal CSS */
/* Dynamic theming vars (injected by PHP as #fccm-css-vars):
   --fccm-primary, --fccm-text, --fccm-bg, --fccm-radius */

:root {
	--fccm-shadow:     0 -2px 12px rgba(0, 0, 0, .08);
	--fccm-z-banner:   999990;
	--fccm-z-modal:    999999;
	--fccm-toggle-off: #dadce0;
	--fccm-font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   Banner
   ========================================================================== */
.fccm-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: var(--fccm-z-banner);
	background: var(--fccm-bg, #fff);
	color: var(--fccm-text, #202124);
	box-shadow: var(--fccm-shadow);
	font-family: var(--fccm-font);
	font-size: 14px;
	border-radius: var(--fccm-radius, 8px) var(--fccm-radius, 8px) 0 0;
	/* Entrance animation */
	transform: translateY(100%);
	animation: fccm-slide-up 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fccm-banner--corner {
	left: auto;
	right: 20px;
	bottom: 20px;
	max-width: 380px;
	border-radius: var(--fccm-radius, 8px);
	box-shadow: 0 4px 24px rgba(0, 0, 0, .14);
	transform: translateY(20px);
	animation: fccm-fade-up 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fccm-slide-up {
	to { transform: translateY(0); }
}

@keyframes fccm-fade-up {
	to { transform: translateY(0); opacity: 1; }
	from { opacity: 0; }
}

.fccm-banner__inner {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	max-width: 1280px;
	margin: 0 auto;
	padding: 16px 24px;
}

.fccm-banner--corner .fccm-banner__inner {
	flex-direction: column;
	align-items: flex-start;
	padding: 20px;
}

.fccm-banner__content {
	flex: 1;
	min-width: 0;
}

.fccm-banner__title {
	font-weight: 600;
	font-size: 15px;
	margin: 0 0 4px;
	line-height: 1.3;
}

.fccm-banner__desc {
	margin: 0;
	font-size: 13px;
	color: color-mix(in srgb, var(--fccm-text, #202124) 70%, transparent);
	line-height: 1.5;
}

.fccm-banner__desc .fccm-privacy-link {
	color: var(--fccm-primary, #1a73e8);
	text-decoration: none;
	margin-left: 4px;
}

.fccm-banner__desc .fccm-privacy-link:hover {
	text-decoration: underline;
}

.fccm-banner__actions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
	flex-wrap: wrap;
}

.fccm-banner--corner .fccm-banner__actions {
	width: 100%;
}

/* ==========================================================================
   Buttons (shared banner + modal)
   ========================================================================== */
.fccm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 18px;
	border-radius: var(--fccm-radius, 8px);
	font-family: var(--fccm-font);
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition: opacity 0.15s, box-shadow 0.15s;
	white-space: nowrap;
	border: none;
	outline: none;
}

.fccm-btn:focus-visible {
	outline: 2px solid var(--fccm-primary, #1a73e8);
	outline-offset: 2px;
}

.fccm-btn--primary {
	background: var(--fccm-primary, #1a73e8);
	color: #fff;
}

.fccm-btn--primary:hover {
	opacity: 0.88;
}

.fccm-btn--outline {
	background: transparent;
	color: var(--fccm-primary, #1a73e8);
	border: 1.5px solid var(--fccm-primary, #1a73e8);
	padding: 8px 16px;
}

.fccm-btn--outline:hover {
	background: color-mix(in srgb, var(--fccm-primary, #1a73e8) 8%, transparent);
}

/* ==========================================================================
   Modal Overlay
   ========================================================================== */
.fccm-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: var(--fccm-z-modal);
	background: rgba(0, 0, 0, .45);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	animation: fccm-overlay-in 0.2s ease forwards;
}

@keyframes fccm-overlay-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.fccm-modal {
	background: var(--fccm-bg, #fff);
	color: var(--fccm-text, #202124);
	border-radius: var(--fccm-radius, 8px);
	box-shadow: 0 8px 40px rgba(0, 0, 0, .2);
	font-family: var(--fccm-font);
	width: 100%;
	max-width: 540px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	animation: fccm-modal-in 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.fccm-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px 16px;
	border-bottom: 1px solid color-mix(in srgb, var(--fccm-text, #202124) 12%, transparent);
	flex-shrink: 0;
}

.fccm-modal__title {
	font-size: 17px;
	font-weight: 600;
	margin: 0;
	line-height: 1.3;
}

.fccm-modal__close {
	background: transparent;
	border: none;
	padding: 4px;
	cursor: pointer;
	color: color-mix(in srgb, var(--fccm-text, #202124) 60%, transparent);
	border-radius: 4px;
	transition: color 0.15s;
	display: flex;
	align-items: center;
}

.fccm-modal__close:hover { color: var(--fccm-text, #202124); }
.fccm-modal__close:focus-visible { outline: 2px solid var(--fccm-primary, #1a73e8); }

.fccm-modal__body {
	overflow-y: auto;
	padding: 16px 24px;
	flex: 1;
}

.fccm-modal__intro {
	font-size: 13px;
	margin: 0 0 16px;
	line-height: 1.6;
	color: color-mix(in srgb, var(--fccm-text, #202124) 75%, transparent);
}

.fccm-modal__intro a {
	color: var(--fccm-primary, #1a73e8);
	text-decoration: none;
}

/* ==========================================================================
   Consent list (modal toggles)
   ========================================================================== */
.fccm-consent-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.fccm-consent-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid color-mix(in srgb, var(--fccm-text, #202124) 10%, transparent);
}

.fccm-consent-item:last-child {
	border-bottom: none;
}

.fccm-consent-item__info {
	flex: 1;
	min-width: 0;
}

.fccm-consent-item__info strong {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 3px;
}

.fccm-consent-item__info p {
	margin: 0;
	font-size: 12px;
	line-height: 1.5;
	color: color-mix(in srgb, var(--fccm-text, #202124) 65%, transparent);
}

/* ==========================================================================
   Toggle switch
   ========================================================================== */
.fccm-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	cursor: pointer;
}

.fccm-toggle--disabled {
	cursor: default;
}

.fccm-toggle__input {
	/* Visually hidden but focusable */
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.fccm-toggle__track {
	display: block;
	width: 44px;
	height: 24px;
	background: var(--fccm-toggle-off, #dadce0);
	border-radius: 12px;
	position: relative;
	transition: background 0.2s;
	flex-shrink: 0;
}

.fccm-toggle__track::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.fccm-toggle__input:checked + .fccm-toggle__track,
.fccm-toggle__track--on {
	background: var(--fccm-primary, #1a73e8);
}

.fccm-toggle__input:checked + .fccm-toggle__track::after {
	transform: translateX(20px);
}

.fccm-toggle__input:focus-visible + .fccm-toggle__track {
	outline: 2px solid var(--fccm-primary, #1a73e8);
	outline-offset: 2px;
}

.fccm-toggle__track--on::after {
	transform: translateX(20px);
}

.fccm-toggle__label {
	font-size: 12px;
	font-weight: 500;
	color: color-mix(in srgb, var(--fccm-text, #202124) 70%, transparent);
	white-space: nowrap;
}

/* ==========================================================================
   Modal footer
   ========================================================================== */
.fccm-modal__footer {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	padding: 16px 24px 20px;
	border-top: 1px solid color-mix(in srgb, var(--fccm-text, #202124) 12%, transparent);
	flex-shrink: 0;
	flex-wrap: wrap;
}

/* ==========================================================================
   Floating trigger button (re-open consent settings)
   ========================================================================== */
.fccm-trigger {
	position: fixed;
	bottom: 20px;
	left: 20px;
	z-index: var(--fccm-z-banner);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--fccm-bg, #fff);
	color: var(--fccm-primary, #1a73e8);
	border: 1.5px solid color-mix(in srgb, var(--fccm-primary, #1a73e8) 30%, transparent);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s, box-shadow 0.2s;
	padding: 0;
}

.fccm-trigger:hover {
	transform: scale(1.08);
	box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
}

.fccm-trigger:focus-visible {
	outline: 2px solid var(--fccm-primary, #1a73e8);
	outline-offset: 2px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media ( max-width: 600px ) {
	.fccm-banner__inner {
		padding: 14px 16px;
		flex-direction: column;
		align-items: stretch;
	}

	.fccm-banner__actions {
		flex-direction: column;
	}

	.fccm-btn {
		width: 100%;
		justify-content: center;
	}

	.fccm-modal__footer {
		flex-direction: column-reverse;
	}

	.fccm-modal__footer .fccm-btn {
		width: 100%;
	}
}
