/**
 * plg_system_cookieconsent - banner styles
 *
 * Every colour comes from a custom property so the plugin parameters can
 * override the whole palette with a single inline :root block.
 */

:root {
	--cc-primary: #0ea5a4;
	--cc-primary-hover: #0d9391;
	--cc-primary-text: #ffffff;
	--cc-bg: #ffffff;
	--cc-text: #111827;
	--cc-muted: #6b7280;
	--cc-faint: #9ca3af;
	--cc-border: #e5e7eb;
	--cc-border-soft: #f3f4f6;
	--cc-hover-wash: rgba(17, 24, 39, .06);
	--cc-z: 9999;
	--cc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* The banner must not inherit a display or serif face from the template, and
   templates routinely style bare p/h2/span, so the font is forced on every
   descendant rather than left to inherit. */
#cc-banner,
#cc-banner *,
#cc-modal,
#cc-modal *,
#cc-fab,
#cc-overlay {
	font-family: var(--cc-font);
	box-sizing: border-box;
}

#cc-modal .cc-cat-ck {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------------------------------------------------------------- overlay */
#cc-overlay {
	position: fixed;
	inset: 0;
	background: rgba(17, 24, 39, .6);
	z-index: calc(var(--cc-z) - 1);
	opacity: 0;
	transition: opacity .25s ease;
	pointer-events: none;
}

#cc-overlay.cc-vis {
	opacity: 1;
	pointer-events: auto;
}

/* ----------------------------------------------------------------- banner */
#cc-banner {
	position: fixed;
	z-index: var(--cc-z);
	background: var(--cc-bg);
	color: var(--cc-text);
	border: 1px solid var(--cc-border);
	box-shadow: 0 -6px 30px rgba(0, 0, 0, .1);
	padding: 18px 24px 20px;
	opacity: 0;
	transform: translateY(100%);
	transition: transform .38s cubic-bezier(.4, 0, .2, 1), opacity .3s ease;
}

#cc-banner.cc-vis {
	opacity: 1;
	transform: none;
}

/* layout: bar (full width, bottom) */
#cc-banner.cc-l-bar {
	bottom: 0;
	left: 0;
	right: 0;
	border-width: 1px 0 0;
}

/* layout: box (bottom left card) */
#cc-banner.cc-l-box {
	bottom: 20px;
	left: 20px;
	max-width: 420px;
	border-radius: 16px;
	border-width: 1px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
}

#cc-banner.cc-l-box .cc-wrap {
	display: block;
}

#cc-banner.cc-l-box .cc-btns {
	margin-top: 14px;
	width: 100%;
}

#cc-banner.cc-l-box .cc-btn {
	flex: 1 1 auto;
}

/* layout: center (modal-like) */
#cc-banner.cc-l-center {
	top: 50%;
	left: 50%;
	right: auto;
	bottom: auto;
	width: calc(100% - 32px);
	max-width: 520px;
	border-radius: 18px;
	border-width: 1px;
	box-shadow: 0 32px 80px rgba(0, 0, 0, .22);
	transform: translate(-50%, -46%);
}

#cc-banner.cc-l-center.cc-vis {
	transform: translate(-50%, -50%);
}

#cc-banner.cc-l-center .cc-wrap {
	display: block;
}

#cc-banner.cc-l-center .cc-btns {
	margin-top: 16px;
	width: 100%;
}

#cc-banner.cc-l-center .cc-btn {
	flex: 1 1 auto;
}

.cc-wrap {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: flex-start;
	gap: 20px;
	flex-wrap: wrap;
}

.cc-txt {
	flex: 1 1 300px;
}

.cc-txt strong {
	display: block;
	font-size: 15px;
	font-weight: 700;
	color: var(--cc-text);
	margin-bottom: 5px;
	letter-spacing: -.01em;
}

.cc-txt p {
	color: var(--cc-muted);
	font-size: 13px;
	margin: 0;
	line-height: 1.55;
}

.cc-txt a {
	color: var(--cc-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ---------------------------------------------------------------- buttons */
.cc-btns {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	flex-shrink: 0;
	padding-top: 1px;
}

.cc-btn {
	padding: 9px 20px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	line-height: 1;
	white-space: nowrap;
	transition: background .18s, color .18s, border-color .18s;
	font-family: inherit;
}

.cc-btn:focus-visible {
	outline: 2px solid var(--cc-primary);
	outline-offset: 2px;
}

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

.cc-primary:hover {
	background: var(--cc-primary-hover);
}

.cc-outline {
	background: transparent;
	color: var(--cc-text);
	border: 1.5px solid var(--cc-border);
}

.cc-outline:hover {
	background: var(--cc-hover-wash);
	border-color: var(--cc-faint);
}

.cc-ghost {
	background: transparent;
	color: var(--cc-muted);
	border: 1.5px solid var(--cc-border);
	padding: 9px 16px;
}

.cc-ghost:hover {
	background: var(--cc-hover-wash);
	color: var(--cc-text);
	border-color: var(--cc-faint);
}

/* ------------------------------------------------------------ preferences */
#cc-modal {
	position: fixed;
	inset: 0;
	z-index: calc(var(--cc-z) + 1);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	pointer-events: none;
	opacity: 0;
	transition: opacity .25s ease;
}

#cc-modal.cc-vis {
	opacity: 1;
	pointer-events: auto;
}

.cc-box {
	background: var(--cc-bg);
	color: var(--cc-text);
	border-radius: 18px;
	box-shadow: 0 32px 80px rgba(0, 0, 0, .22);
	width: 100%;
	max-width: 580px;
	max-height: 90vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transform: translateY(16px) scale(.97);
	transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}

#cc-modal.cc-vis .cc-box {
	transform: none;
}

.cc-mhead {
	padding: 22px 24px 16px;
	border-bottom: 1px solid var(--cc-border-soft);
	flex-shrink: 0;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.cc-mhead-text h2 {
	color: var(--cc-text);
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 4px;
	letter-spacing: -.01em;
}

.cc-mhead-text p {
	font-size: 12.5px;
	color: var(--cc-muted);
	margin: 0;
	line-height: 1.5;
}

.cc-close {
	width: 30px;
	height: 30px;
	border-radius: 8px;
	border: none;
	background: var(--cc-border-soft);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: var(--cc-muted);
	font-size: 14px;
	transition: background .18s;
	line-height: 1;
	font-family: inherit;
}

.cc-close:hover {
	background: var(--cc-border);
	color: var(--cc-text);
}

.cc-mbody {
	overflow-y: auto;
	flex: 1;
	scrollbar-width: thin;
}

.cc-intro {
	margin: 0;
	padding: 16px 24px;
	border-bottom: 1px solid var(--cc-border-soft);
	color: var(--cc-muted);
	font-size: 12.5px;
	line-height: 1.6;
}

.cc-cat {
	padding: 16px 24px;
	border-bottom: 1px solid var(--cc-border-soft);
}

.cc-cat:last-child {
	border-bottom: none;
}

.cc-cat-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.cc-cat-name {
	color: var(--cc-text);
	font-size: 14px;
	font-weight: 600;
}

.cc-cat-desc {
	font-size: 12.5px;
	color: var(--cc-muted);
	margin: 0 0 5px;
	line-height: 1.5;
}

.cc-cat-ck {
	font-size: 11.5px;
	color: var(--cc-faint);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	margin: 0;
	word-break: break-word;
}

.cc-badge {
	font-size: 11px;
	font-weight: 600;
	color: #16a34a;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 99px;
	padding: 3px 10px;
	flex-shrink: 0;
	white-space: nowrap;
}

/* ----------------------------------------------------------------- toggle */
.cc-tgl {
	position: relative;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
	cursor: pointer;
	display: inline-block;
}

.cc-tgl input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
	pointer-events: none;
}

.cc-tgl-track {
	position: absolute;
	inset: 0;
	background: var(--cc-border);
	border-radius: 99px;
	transition: background .2s;
}

.cc-tgl-thumb {
	position: absolute;
	width: 18px;
	height: 18px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
	transition: transform .2s;
}

.cc-tgl input:checked ~ .cc-tgl-track {
	background: var(--cc-primary);
}

.cc-tgl input:checked ~ .cc-tgl-thumb {
	transform: translateX(20px);
}

.cc-tgl input:focus-visible ~ .cc-tgl-track {
	outline: 2px solid var(--cc-primary);
	outline-offset: 2px;
}

.cc-mfoot {
	padding: 16px 24px;
	border-top: 1px solid var(--cc-border-soft);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	flex-shrink: 0;
}

.cc-mfoot-right {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

/* -------------------------------------------------------------------- fab */
#cc-fab {
	position: fixed;
	bottom: 20px;
	z-index: calc(var(--cc-z) - 2);
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--cc-bg);
	border: 1px solid var(--cc-border);
	cursor: pointer;
	box-shadow: 0 4px 18px rgba(28, 25, 23, .14);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .2s, box-shadow .2s;
	padding: 0;
}

#cc-fab.cc-fab-left {
	left: 20px;
}

#cc-fab.cc-fab-right {
	right: 20px;
}

#cc-fab:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 22px rgba(28, 25, 23, .18);
}

#cc-fab svg {
	width: 22px;
	height: 22px;
	fill: var(--cc-text);
	display: block;
}

/* ------------------------------------------------------------------ small */
@media (max-width: 640px) {
	#cc-banner.cc-l-box {
		left: 12px;
		right: 12px;
		bottom: 12px;
		max-width: none;
	}

	.cc-btns {
		width: 100%;
		justify-content: stretch;
	}

	.cc-btns .cc-btn {
		flex: 1 1 auto;
		text-align: center;
	}

	.cc-mfoot {
		justify-content: stretch;
	}

	.cc-mfoot-right {
		width: 100%;
	}

	.cc-mfoot-right .cc-btn {
		flex: 1;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	#cc-banner,
	#cc-modal,
	#cc-overlay,
	.cc-box,
	.cc-tgl-thumb,
	.cc-tgl-track {
		transition: none;
	}
}
