/**
 * Kreations Cookie – banner styles (BEM).
 * Colours come from the Design settings as custom properties on .kcc.
 */
.kcc {
	--kcc-bg: #fff;
	--kcc-text: #1d2327;
	--kcc-link: #5b2be0;
	--kcc-primary-bg: #5b2be0;
	--kcc-primary-text: #fff;
	--kcc-secondary-bg: #fff;
	--kcc-secondary-text: #5b2be0;
	--kcc-border: #5b2be0;
	--kcc-toggle: #5b2be0;
	--kcc-radius: 8px;
	--kcc-font: inherit;
	--kcc-shadow: 0 8px 32px rgba(0, 0, 0, .18);
	font-family: var(--kcc-font);
	font-size: 14px;
	line-height: 1.5;
	color: var(--kcc-text);
}
.kcc *,
.kcc *::before,
.kcc *::after { box-sizing: border-box; }
.kcc [hidden] { display: none !important; }
html.kcc-locked { overflow: hidden; }

/* ---------- Banner ---------- */
.kcc-banner { position: fixed; z-index: 999990; }
.kcc-banner__inner {
	position: relative;
	padding: 20px;
	background: var(--kcc-bg);
	color: var(--kcc-text);
	box-shadow: var(--kcc-shadow);
}
.kcc-banner__logo { display: block; max-width: 140px; max-height: 40px; width: auto; height: auto; margin: 0 0 12px; }
.kcc-banner__title { margin: 0 0 8px; font-size: 17px; font-weight: 700; line-height: 1.3; color: inherit; }
.kcc-banner__text { margin: 0; color: inherit; }
.kcc-banner__body { max-height: 40vh; overflow: auto; }
.kcc-banner__link,
.kcc-linkbtn { color: var(--kcc-link); text-decoration: underline; }
.kcc-banner__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }

/* Box layouts. */
.kcc--box-left .kcc-banner,
.kcc--box-right .kcc-banner { bottom: 20px; width: min(440px, calc(100vw - 32px)); }
.kcc--box-left .kcc-banner { left: 16px; }
.kcc--box-right .kcc-banner { right: 16px; }
.kcc--box-left .kcc-banner__inner,
.kcc--box-right .kcc-banner__inner { border-radius: var(--kcc-radius); }
.kcc--box-left .kcc-btn--equal,
.kcc--box-right .kcc-btn--equal { flex: 1 1 0; }

/* Full-width banners. */
.kcc--banner-bottom .kcc-banner,
.kcc--banner-top .kcc-banner { left: 0; right: 0; }
.kcc--banner-bottom .kcc-banner { bottom: 0; }
.kcc--banner-top .kcc-banner { top: 0; }
.kcc--banner-bottom .kcc-banner__inner,
.kcc--banner-top .kcc-banner__inner {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas: "logo actions" "title actions" "body actions";
	column-gap: 32px;
	align-items: center;
	padding: 20px max(20px, calc((100vw - 1200px) / 2));
}
.kcc--banner-bottom .kcc-banner__logo,
.kcc--banner-top .kcc-banner__logo { grid-area: logo; }
.kcc--banner-bottom .kcc-banner__title,
.kcc--banner-top .kcc-banner__title { grid-area: title; }
.kcc--banner-bottom .kcc-banner__body,
.kcc--banner-top .kcc-banner__body { grid-area: body; }
.kcc--banner-bottom .kcc-banner__actions,
.kcc--banner-top .kcc-banner__actions { grid-area: actions; margin: 0; justify-content: flex-end; }

/* Popup. */
.kcc--popup .kcc-banner { inset: 0; display: grid; place-items: center; padding: 16px; }
.kcc--popup .kcc-banner[hidden] { display: none; }
.kcc-banner__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.kcc--popup .kcc-banner__inner { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: var(--kcc-radius); padding: 28px; }
.kcc--popup .kcc-btn--equal { flex: 1 1 0; }

/* ---------- Buttons ---------- */
.kcc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	margin: 0;
	padding: 8px 18px;
	border: 2px solid var(--kcc-border);
	border-radius: calc(var(--kcc-radius) * .6);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	white-space: nowrap;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	box-shadow: none;
	transition: filter .15s ease;
}
.kcc-btn:hover { filter: brightness(.94); }
.kcc-btn:focus-visible,
.kcc-linkbtn:focus-visible,
.kcc-close:focus-visible,
.kcc-revisit:focus-visible,
.kcc-cat__expand:focus-visible { outline: 3px solid var(--kcc-link); outline-offset: 2px; }
.kcc-btn--primary { background: var(--kcc-primary-bg); border-color: var(--kcc-primary-bg); color: var(--kcc-primary-text); }
.kcc-btn--secondary { background: var(--kcc-secondary-bg); color: var(--kcc-secondary-text); }
.kcc-linkbtn {
	margin: 0 auto 0 0;
	padding: 4px 0;
	border: 0;
	background: none;
	font: inherit;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}
.kcc-close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}
.kcc-close:hover { background: rgba(0, 0, 0, .06); }

/* ---------- Preference centre ---------- */
.kcc-modal { position: fixed; inset: 0; z-index: 999995; display: grid; place-items: center; padding: 16px; }
.kcc-modal__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.kcc-modal__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(640px, 100%);
	max-height: calc(100vh - 32px);
	border-radius: var(--kcc-radius);
	background: var(--kcc-bg);
	color: var(--kcc-text);
	box-shadow: var(--kcc-shadow);
	outline: none;
}
.kcc-modal__header { position: relative; padding: 20px 56px 12px 24px; border-bottom: 1px solid rgba(0, 0, 0, .1); }
.kcc-modal__header .kcc-banner__logo { margin-bottom: 8px; }
.kcc-modal__title { margin: 0; font-size: 18px; font-weight: 700; color: inherit; }
.kcc-modal__body { padding: 16px 24px; overflow: auto; }
.kcc-modal__text { margin: 0 0 16px; }
.kcc-modal__notice { margin: 0 0 16px; padding: 10px 12px; border-left: 4px solid var(--kcc-toggle); background: rgba(0, 0, 0, .04); }
.kcc-modal__footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid rgba(0, 0, 0, .1); }
.kcc-modal__footer .kcc-btn--equal { flex: 1 1 0; }

.kcc-optout { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-weight: 600; cursor: pointer; }
.kcc-optout__input { width: 18px; height: 18px; margin: 0; accent-color: var(--kcc-toggle); }

.kcc-cat { border-top: 1px solid rgba(0, 0, 0, .1); }
.kcc-cat:last-child { border-bottom: 1px solid rgba(0, 0, 0, .1); }
.kcc-cat__head { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.kcc-cat__expand {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 4px 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 700;
	text-align: left;
	cursor: pointer;
}
.kcc-cat__expand::before {
	content: "";
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transition: transform .15s ease;
}
.kcc-cat__expand[aria-expanded="true"]::before { transform: rotate(45deg); }
.kcc-cat__always { font-size: 12px; font-weight: 700; color: var(--kcc-toggle); white-space: nowrap; }
.kcc-cat__desc { margin: 0 0 12px 16px; font-size: 13px; }
.kcc-cat__text { margin: 0 0 8px; opacity: .85; }

.kcc-cookies { width: 100%; margin: 0 0 4px; border-collapse: collapse; font-size: 12px; }
.kcc-cookies th,
.kcc-cookies td { padding: 6px 8px; border: 1px solid rgba(0, 0, 0, .1); text-align: left; vertical-align: top; }
.kcc-cookies th { font-weight: 700; background: rgba(0, 0, 0, .04); }
.kcc-cookies__name { font-weight: 600; word-break: break-all; }
.kcc-cookies__domain { display: block; font-weight: 400; opacity: .7; }

.kcc-switch { position: relative; display: inline-flex; flex: 0 0 auto; cursor: pointer; }
.kcc-switch__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.kcc-switch__track {
	position: relative;
	width: 40px;
	height: 22px;
	border-radius: 22px;
	background: #a7aaad;
	transition: background .15s ease;
}
.kcc-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	transition: transform .15s ease;
}
.kcc-switch__input:checked + .kcc-switch__track { background: var(--kcc-toggle); }
.kcc-switch__input:checked + .kcc-switch__track::after { transform: translateX(18px); }
.kcc-switch__input:focus-visible + .kcc-switch__track { outline: 3px solid var(--kcc-link); outline-offset: 2px; }

/* ---------- Revisit button ---------- */
.kcc-revisit {
	position: fixed;
	bottom: 16px;
	z-index: 999980;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--kcc-primary-bg);
	color: var(--kcc-primary-text);
	box-shadow: var(--kcc-shadow);
	cursor: pointer;
}
.kcc-revisit--left { left: 16px; }
.kcc-revisit--right { right: 16px; }

/* Shortcode links. */
.kcc-link { cursor: pointer; }

@media (max-width: 782px) {
	.kcc--banner-bottom .kcc-banner__inner,
	.kcc--banner-top .kcc-banner__inner {
		grid-template-columns: 1fr;
		grid-template-areas: "logo" "title" "body" "actions";
		padding: 16px;
	}
	.kcc--banner-bottom .kcc-banner__actions,
	.kcc--banner-top .kcc-banner__actions { margin-top: 12px; justify-content: stretch; }
	.kcc-banner__actions .kcc-btn { flex: 1 1 auto; }
	.kcc-btn { white-space: normal; }
	.kcc--box-left .kcc-banner,
	.kcc--box-right .kcc-banner { left: 16px; right: 16px; bottom: 16px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
	.kcc *,
	.kcc *::before,
	.kcc *::after { transition: none !important; }
}

/* ---------- Blocked embeds ---------- */
iframe[data-kcc-src] { display: none !important; }
.kcc-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	min-height: 200px;
	margin: 0 0 1em;
	padding: 24px;
	border-radius: 8px;
	background: #f0f0f1;
	color: #1d2327;
	text-align: center;
	font-size: 14px;
	line-height: 1.5;
}
.kcc-placeholder__text { max-width: 480px; margin: 0; }
.kcc-placeholder__button {
	padding: 8px 16px;
	border: 0;
	border-radius: 6px;
	background: #1d2327;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

/* ---------- Cookie declaration shortcode ---------- */
.kcc-declaration__group { margin: 0 0 2em; }
.kcc-declaration__title { margin: 0 0 .5em; }
.kcc-declaration__text { margin: 0 0 1em; }
.kcc-declaration__table { width: 100%; border-collapse: collapse; font-size: .9em; }
.kcc-declaration__table th,
.kcc-declaration__table td { padding: 8px 10px; border: 1px solid rgba(0, 0, 0, .12); text-align: left; vertical-align: top; }
.kcc-declaration__table th { background: rgba(0, 0, 0, .04); }
.kcc-declaration__table__name { font-weight: 600; word-break: break-all; }
.kcc-declaration__table__domain { display: block; font-weight: 400; opacity: .7; }
@media (max-width: 600px) {
	.kcc-cookies thead,
	.kcc-declaration__table thead { display: none; }
	.kcc-cookies tr,
	.kcc-declaration__table tr { display: block; border-bottom: 1px solid rgba(0, 0, 0, .12); }
	.kcc-cookies td,
	.kcc-declaration__table td { display: block; border: 0; }
}
