/*
 * Cicka Design – cookie banner, settings dialog and click-to-load
 * placeholders (inc/consent.php, template-parts/consent/banner.php).
 *
 * Breakpoints: phone <= 600px (bottom sheet).
 */

.cicka-cc,
.cicka-embed {
	--cc-ink: #3A2B2B;
	--cc-ink-2: #5A4846;
	--cc-muted: #7A6A68;
	--cc-head: #7D4F50;
	--cc-accent: #A55F59;
	--cc-accent-2: #8F4E49;
	--cc-blush: #F8E6E3;
	--cc-cream: #FCEFD2;
	--cc-bg: #FFFCFA;
	--cc-line: #EBD3CF;
	--cc-soft: #F1E3E0;
	--cc-font: 'Solway', serif;
	color-scheme: only light;
}
.cicka-cc *,
.cicka-cc *::before,
.cicka-cc *::after,
.cicka-embed * { box-sizing: border-box; }
.cicka-cc [hidden] { display: none !important; }
html.cicka-cc-open { overflow: hidden; }

/* ---------- Shared ---------- */
.cicka-cc__top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cicka-cc__badge { display: grid; flex: none; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--cc-cream); }
.cicka-cc__cookie { width: 30px; height: 30px; animation: cicka-cc-nibble 3.2s ease-in-out infinite; }
@keyframes cicka-cc-nibble { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-10deg); } }
.cicka-cc .cicka-cc__title { margin: 0; color: var(--cc-head); font: 500 21px/1.25 var(--cc-font); letter-spacing: 0; text-transform: none; }
.cicka-cc .cicka-cc__text { margin: 0 0 14px; color: var(--cc-ink-2); font: 400 14px/1.6 var(--cc-font); }
.cicka-cc a { color: var(--cc-accent); text-decoration: underline; text-underline-offset: 2px; }
.cicka-cc a:hover { color: var(--cc-accent-2); }
.cicka-cc__text b { color: var(--cc-ink); font-weight: 500; }
.cicka-cc__links { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; }

.cicka-cc__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cicka-cc .cicka-cc__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	margin: 0;
	padding: 0 18px;
	border: 1px solid var(--cc-line);
	border-radius: 999px;
	background: #fff;
	box-shadow: none;
	color: var(--cc-ink);
	font: 500 14.5px/1.2 var(--cc-font);
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s;
}
.cicka-cc .cicka-cc__btn:hover { border-color: var(--cc-accent); background: #fff; color: var(--cc-accent); }
.cicka-cc .cicka-cc__btn--main { border-color: var(--cc-accent); background: var(--cc-accent); color: #fff; }
.cicka-cc .cicka-cc__btn--main:hover { border-color: var(--cc-accent-2); background: var(--cc-accent-2); color: #fff; }
.cicka-cc .cicka-cc__btn--wide { grid-column: 1 / -1; }
.cicka-cc button:focus-visible,
.cicka-cc a:focus-visible,
.cicka-cc summary:focus-visible,
.cicka-cc input:focus-visible + span { outline: 2px solid var(--cc-accent); outline-offset: 3px; }

/* ---------- Banner ---------- */
.cicka-cc__banner {
	position: fixed;
	left: 24px;
	bottom: 24px;
	z-index: 99990;
	width: 440px;
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	padding: 24px 24px 18px;
	border: 1px solid var(--cc-line);
	border-radius: 26px;
	background: #fff;
	box-shadow: 0 24px 70px rgba(58, 43, 43, .22);
	opacity: 0;
	transform: translateY(24px);
	transition: opacity .35s ease, transform .45s cubic-bezier(.2, 1.2, .4, 1);
	font-family: var(--cc-font);
}
.cicka-cc__banner.is-in { opacity: 1; transform: none; }
.cicka-cc__banner .cicka-cc__links { margin-top: 12px; }
.cicka-cc__grab { display: none; }

/* ---------- Settings dialog ---------- */
.cicka-cc__dim { position: fixed; inset: 0; z-index: 99991; background: rgba(58, 43, 43, .45); opacity: 0; transition: opacity .25s; backdrop-filter: blur(2px); }
.cicka-cc__dim.is-in { opacity: 1; }
.cicka-cc__dlg {
	position: fixed;
	top: 50%;
	left: 50%;
	z-index: 99992;
	display: flex;
	flex-direction: column;
	width: 620px;
	max-width: calc(100vw - 32px);
	max-height: min(680px, calc(100vh - 40px));
	overflow: hidden;
	border-radius: 28px;
	background: #fff;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
	opacity: 0;
	transform: translate(-50%, -46%);
	transition: opacity .25s ease, transform .35s cubic-bezier(.2, 1.1, .4, 1);
	font-family: var(--cc-font);
}
.cicka-cc__dlg.is-in { opacity: 1; transform: translate(-50%, -50%); }
.cicka-cc__dlg:focus { outline: none; }
.cicka-cc__head { display: flex; align-items: flex-start; gap: 14px; padding: 24px 26px 16px; border-bottom: 1px solid var(--cc-soft); }
.cicka-cc__head .cicka-cc__title { margin-bottom: 6px; font-size: 23px; }
.cicka-cc__head .cicka-cc__text { margin: 0; font-size: 13.5px; }
.cicka-cc .cicka-cc__x { display: grid; flex: none; place-items: center; width: 38px; height: 38px; margin: 0 0 0 auto; padding: 0; border: 1px solid var(--cc-line); border-radius: 50%; background: #fff; box-shadow: none; color: var(--cc-ink-2); font: 400 20px/1 var(--cc-font); cursor: pointer; }
.cicka-cc .cicka-cc__x:hover { border-color: var(--cc-accent); background: #fff; color: var(--cc-accent); }
.cicka-cc__body { flex: 1; overflow-y: auto; padding: 14px 26px 6px; overscroll-behavior: contain; }
.cicka-cc__cat { margin-bottom: 10px; border: 1px solid var(--cc-line); border-radius: 18px; background: var(--cc-bg); }
.cicka-cc__row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; }
.cicka-cc__ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--cc-blush); color: var(--cc-accent); }
.cicka-cc__cat--necessary .cicka-cc__ico { background: #EEF4EE; color: #4F7A55; }
.cicka-cc__cat--statistics .cicka-cc__ico { background: #EAF1FA; color: #3F6EA5; }
.cicka-cc__cat--media .cicka-cc__ico { background: var(--cc-cream); color: #8A5E12; }
.cicka-cc__label strong { display: block; color: var(--cc-head); font-size: 16px; font-weight: 500; }
.cicka-cc__label span { display: block; margin-top: 2px; color: var(--cc-ink-2); font-size: 13px; line-height: 1.5; }
.cicka-cc__always { color: #4F7A55; font-size: 12px; font-weight: 500; white-space: nowrap; }

.cicka-cc__switch { position: relative; display: block; width: 46px; height: 26px; margin: 0; cursor: pointer; }
.cicka-cc__switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cicka-cc__switch span { position: absolute; inset: 0; border-radius: 99px; background: #D9C9C6; transition: background-color .2s; pointer-events: none; }
.cicka-cc__switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.cicka-cc__switch input:checked + span { background: var(--cc-accent); }
.cicka-cc__switch input:checked + span::after { transform: translateX(20px); }

.cicka-cc__more { padding: 8px 16px 12px; border-top: 1px dashed var(--cc-line); }
.cicka-cc__more summary { color: var(--cc-accent); font-size: 13px; cursor: pointer; list-style: none; }
.cicka-cc__more summary::-webkit-details-marker { display: none; }
.cicka-cc__more summary::before { content: "▸ "; }
.cicka-cc__more[open] summary::before { content: "▾ "; }
.cicka-cc__svc { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 3px 12px; margin: 10px 0 0; padding: 10px 12px; border: 1px solid var(--cc-soft); border-radius: 12px; background: #fff; color: var(--cc-ink-2); font-size: 12.5px; line-height: 1.5; }
.cicka-cc__svc dt { color: var(--cc-ink); font-weight: 500; }
.cicka-cc__svc dd { margin: 0; overflow-wrap: anywhere; }
.cicka-cc__svc .cicka-cc__svc-name { grid-column: 1 / -1; margin-bottom: 2px; color: var(--cc-head); font-size: 14px; }
.cicka-cc__svc .cicka-cc__svc-name + dd { display: none; }

.cicka-cc__foot { padding: 14px 26px 16px; border-top: 1px solid var(--cc-soft); background: #fff; }
.cicka-cc__btns--dlg { grid-template-columns: 1fr 1fr 1.2fr; }
.cicka-cc__meta { margin: 10px 0 0; color: var(--cc-muted); font-size: 12px; line-height: 1.5; }
.cicka-cc__meta code { padding: 0; background: none; color: var(--cc-muted); font-size: 11.5px; }

/* ---------- Saved note ---------- */
.cicka-cc__toast {
	position: fixed;
	left: 24px;
	bottom: 24px;
	z-index: 99993;
	margin: 0;
	padding: 12px 18px;
	border-radius: 99px;
	background: var(--cc-ink);
	box-shadow: 0 14px 34px rgba(0, 0, 0, .2);
	color: #fff;
	font: 400 14px/1.4 var(--cc-font);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .3s, transform .3s;
}
.cicka-cc__toast.is-in { opacity: 1; transform: none; }

/* ---------- Click-to-load placeholder ---------- */
.cicka-embed {
	position: relative;
	display: grid;
	place-items: center;
	width: 100%;
	min-height: 220px;
	margin: 0 0 1.5em;
	overflow: hidden;
	border-radius: 22px;
	background: linear-gradient(135deg, #3A2B2B, #7D4F50);
	color: #fff;
	font-family: var(--cc-font);
	text-align: center;
}
.cicka-embed::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 20%, rgba(242, 193, 78, .25), transparent 40%), radial-gradient(circle at 85% 80%, rgba(248, 230, 227, .18), transparent 45%); }
.cicka-embed--map { background: linear-gradient(135deg, #4F7A55, #6E9C78); }
.cicka-embed template { display: none; }
.cicka-embed__in { position: relative; max-width: 440px; padding: 20px; }
.cicka-embed__icon { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 12px; border: 2px solid rgba(255, 255, 255, .4); border-radius: 50%; background: rgba(255, 255, 255, .14); }
.cicka-embed .cicka-embed__title { margin: 0 0 6px; color: #fff; font: 500 19px/1.3 var(--cc-font); }
.cicka-embed .cicka-embed__text { margin: 0 0 14px; color: #EBDCD9; font-size: 13px; line-height: 1.55; }
.cicka-embed__text a { color: #fff; text-decoration: underline; }
.cicka-embed .cicka-embed__btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; margin: 0; padding: 0 22px; border: 0; border-radius: 99px; background: var(--cc-blush); box-shadow: none; color: var(--cc-head); font: 500 14.5px/1 var(--cc-font); letter-spacing: 0; text-transform: none; cursor: pointer; }
.cicka-embed .cicka-embed__btn:hover { background: #fff; color: var(--cc-accent); }
.cicka-embed__always { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 12px; color: #EBDCD9; font-size: 12.5px; cursor: pointer; }
.cicka-embed__always input { width: 16px; height: 16px; margin: 0; accent-color: var(--cc-accent); }
.cicka-embed-loaded { position: relative; width: 100%; margin: 0 0 1.5em; }
.cicka-embed-loaded iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 22px; }

/* Elementor video widgets: the placeholder covers the (empty) player. */
[data-cicka-cc-widget] { position: relative; }
.cicka-embed[data-cicka-elementor] { margin: 0; }
.cicka-embed--tall { max-width: 380px; margin-right: auto !important; margin-left: auto !important; }
[data-cicka-cc-widget] .elementor-wrapper { display: none; }

/* ---------- Phone: bottom sheet ---------- */
@media (max-width: 600px) {
	.cicka-cc__banner {
		left: 0;
		right: 0;
		bottom: 0;
		width: auto;
		max-width: none;
		max-height: 88vh;
		padding: 22px 18px calc(16px + env(safe-area-inset-bottom));
		border-width: 1px 0 0;
		border-radius: 26px 26px 0 0;
		box-shadow: 0 -14px 40px rgba(58, 43, 43, .2);
	}
	.cicka-cc__grab { display: block; width: 42px; height: 5px; margin: -8px auto 14px; border-radius: 9px; background: var(--cc-line); }
	.cicka-cc .cicka-cc__title { font-size: 19px; }
	.cicka-cc .cicka-cc__text { font-size: 13.5px; line-height: 1.55; }
	.cicka-cc__banner .cicka-cc__links { display: flex; justify-content: center; }

	.cicka-cc__dlg {
		top: auto;
		bottom: 0;
		left: 0;
		width: 100%;
		max-width: none;
		height: calc(100% - 40px);
		max-height: none;
		border-radius: 26px 26px 0 0;
		transform: translateY(40px);
	}
	.cicka-cc__dlg.is-in { transform: none; }
	.cicka-cc__head { padding: 18px 18px 12px; }
	.cicka-cc__head .cicka-cc__badge { display: none; }
	.cicka-cc__head .cicka-cc__title { font-size: 21px; }
	.cicka-cc__head .cicka-cc__text { font-size: 13px; }
	.cicka-cc__body { padding: 12px 14px; }
	.cicka-cc__row { gap: 10px; padding: 12px; }
	.cicka-cc__svc { grid-template-columns: 1fr; }
	.cicka-cc__foot { padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); }
	.cicka-cc__btns--dlg { grid-template-columns: 1fr 1fr; }
	.cicka-cc__btns--dlg .cicka-cc__btn:last-child { grid-column: 1 / -1; }
	.cicka-cc__toast { right: 16px; left: 16px; bottom: 16px; border-radius: 18px; text-align: center; }
	.cicka-embed { border-radius: 18px; }
	.cicka-embed__in { padding: 16px; }
	.cicka-embed .cicka-embed__text { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
	.cicka-cc *,
	.cicka-cc__banner,
	.cicka-cc__dlg,
	.cicka-cc__dim { animation: none !important; transition: none !important; }
}

/* Post and page content styles must not recolour the placeholder. */
.cicka-embed .cicka-embed__title { color: #fff !important; }
.cicka-embed .cicka-embed__text { color: #EBDCD9 !important; }
.cicka-embed .cicka-embed__text a,
.cicka-embed .cicka-embed__text a:hover { color: #fff !important; }
.cicka-embed .cicka-embed__always { color: #EBDCD9 !important; text-align: left; }
.cicka-embed p { max-width: none; }
