/* GDPR Cookie Consent — front-end styles
   All colours/sizes are driven by CSS variables printed by the plugin,
   so the whole UI re-themes from the admin Style tab. */

.gdprcc,
.gdprcc * { box-sizing: border-box; }

.gdprcc {
	--_pad: 22px;
	position: fixed;
	z-index: 999999;            /* above Elementor popups / sticky headers */
	inset: auto 0 0 0;
	font-family: var(--gdprcc-font, inherit);
	font-size: var(--gdprcc-font-size, 15px);
	line-height: 1.5;
	color: var(--gdprcc-text, #1f2933);
	pointer-events: none;       /* children re-enable */
}

/* The [hidden] attribute must beat the layout display rules below
   (display:flex / grid would otherwise keep a "hidden" panel visible). */
.gdprcc[hidden],
.gdprcc [hidden],
#gdprcc-reopen[hidden] { display: none !important; }

/* ---------- shared surface ---------- */
.gdprcc-banner,
.gdprcc-settings {
	pointer-events: auto;
	background: var(--gdprcc-bg, #fff);
	border-radius: var(--gdprcc-radius, 12px);
	box-shadow: 0 10px 40px rgba(15, 23, 42, .18), 0 2px 8px rgba(15, 23, 42, .08);
}

/* ============================================================
   LAYOUT: full-width bar
   ============================================================ */
.gdprcc--bar { left: 0; right: 0; }
.gdprcc--bar.gdprcc--bottom { top: auto; bottom: 0; }
.gdprcc--bar.gdprcc--top    { bottom: auto; top: 0; }

.gdprcc--bar .gdprcc-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	max-width: 1200px;
	margin: 0 auto 14px;
	padding: var(--_pad);
	border-radius: var(--gdprcc-radius, 12px);
}
.gdprcc--bar.gdprcc--top .gdprcc-banner { margin: 14px auto 0; }
.gdprcc--bar .gdprcc-banner__body { flex: 1 1 auto; }
.gdprcc--bar .gdprcc-banner__actions { flex: 0 0 auto; }

/* ============================================================
   LAYOUT: centered box (with overlay)
   ============================================================ */
.gdprcc--box {
	inset: 0;
	display: grid;
	place-items: center;
	padding: 20px;
}
.gdprcc--box.gdprcc-has-overlay::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--gdprcc-overlay, rgba(15, 23, 42, .55));
	pointer-events: auto;
}
.gdprcc--box .gdprcc-banner,
.gdprcc--box .gdprcc-settings {
	position: relative;
	width: 100%;
	max-width: 460px;
	padding: var(--_pad);
}

/* ============================================================
   LAYOUT: floating bottom-left / bottom-right
   ============================================================ */
.gdprcc--bottom-left,
.gdprcc--bottom-right { inset: auto 0 0 0; }
.gdprcc--bottom-left .gdprcc-banner,
.gdprcc--bottom-right .gdprcc-banner,
.gdprcc--bottom-left .gdprcc-settings,
.gdprcc--bottom-right .gdprcc-settings {
	position: fixed;
	bottom: 20px;
	width: 380px;
	max-width: calc(100vw - 40px);
	padding: var(--_pad);
}
.gdprcc--bottom-left  .gdprcc-banner,
.gdprcc--bottom-left  .gdprcc-settings { left: 20px; }
.gdprcc--bottom-right .gdprcc-banner,
.gdprcc--bottom-right .gdprcc-settings { right: 20px; }

/* ---------- typography ---------- */
.gdprcc-banner__title,
.gdprcc-settings__head h2 {
	margin: 0 0 8px;
	font-size: 1.15em;
	font-weight: 700;
	color: var(--gdprcc-text);
}
.gdprcc-banner__text { margin: 0; opacity: .9; }
.gdprcc-policy-link {
	color: var(--gdprcc-accent, #2563eb);
	text-decoration: underline;
}

/* ---------- buttons ---------- */
.gdprcc-banner__actions,
.gdprcc-settings__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}
.gdprcc--bar .gdprcc-banner__actions { justify-content: flex-end; }
.gdprcc-settings__actions { margin-top: 18px; justify-content: flex-end; }

#gdprcc-root .gdprcc-btn {
	appearance: none;
	-webkit-appearance: none;
	display: inline-block;
	width: auto;
	min-height: 0;
	margin: 0;
	border: 1px solid transparent;
	border-radius: calc(var(--gdprcc-radius, 12px) * .6);
	padding: 11px 18px;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;       /* Hello / Elementor kit often uppercases buttons */
	text-decoration: none;
	text-shadow: none;
	background-image: none;     /* neutralise theme button gradients */
	cursor: pointer;
	transition: transform .12s ease, filter .12s ease, background .12s ease;
}
#gdprcc-root .gdprcc-btn:hover { filter: brightness(.95); transform: translateY(-1px); }
#gdprcc-root .gdprcc-btn:active { transform: translateY(0); }
#gdprcc-root .gdprcc-btn:focus-visible { outline: 2px solid var(--gdprcc-accent); outline-offset: 2px; }

#gdprcc-root .gdprcc-btn--accept   { background-color: var(--gdprcc-accept-bg);   color: var(--gdprcc-accept-text); }
#gdprcc-root .gdprcc-btn--reject   { background-color: var(--gdprcc-reject-bg);   color: var(--gdprcc-reject-text); }
#gdprcc-root .gdprcc-btn--save     { background-color: var(--gdprcc-accept-bg);   color: var(--gdprcc-accept-text); }
#gdprcc-root .gdprcc-btn--settings { background-color: var(--gdprcc-settings-bg, transparent); color: var(--gdprcc-settings-text); border-color: currentColor; }

/* ============================================================
   SETTINGS PANEL
   ============================================================ */
.gdprcc-settings__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.gdprcc-settings__body {
	max-height: min(50vh, 420px);
	overflow: auto;
	display: grid;
	gap: 14px;
}
.gdprcc-cat {
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: calc(var(--gdprcc-radius, 12px) * .7);
	padding: 14px;
}
.gdprcc-cat__head {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.gdprcc-cat__label { font-weight: 600; }
.gdprcc-cat__desc { margin: 6px 0 0; font-size: .9em; opacity: .8; }

/* toggle switch */
.gdprcc-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: 0 0 auto; }
.gdprcc-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.gdprcc-slider {
	position: absolute; inset: 0; cursor: pointer;
	background: #cbd2d9; border-radius: 999px; transition: background .2s ease;
}
.gdprcc-slider::before {
	content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
	background: #fff; border-radius: 50%; transition: transform .2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.gdprcc-switch input:checked + .gdprcc-slider { background: var(--gdprcc-accent, #2563eb); }
.gdprcc-switch input:checked + .gdprcc-slider::before { transform: translateX(20px); }
.gdprcc-switch input:disabled + .gdprcc-slider { opacity: .55; cursor: not-allowed; }
.gdprcc-switch input:focus-visible + .gdprcc-slider { outline: 2px solid var(--gdprcc-accent); outline-offset: 2px; }

/* settings panel matches the banner footprint per layout */
.gdprcc--bar .gdprcc-settings {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto 14px;
	padding: var(--_pad);
}
.gdprcc--bar.gdprcc--top .gdprcc-settings { margin: 14px auto 0; }

/* ============================================================
   REOPEN FLOATING BUTTON
   ============================================================ */
#gdprcc-reopen {
	position: fixed; z-index: 999998; bottom: 18px; left: 18px;
	display: inline-flex; align-items: center; gap: 8px;
	margin: 0; padding: 10px 14px; border: 0; cursor: pointer;
	background-color: var(--gdprcc-reopen-bg, #2563eb);
	background-image: none;
	color: var(--gdprcc-reopen-text, #fff);
	border-radius: 999px; font: inherit; font-weight: 600;
	line-height: 1.2; letter-spacing: normal; text-transform: none; text-shadow: none;
	box-shadow: 0 6px 20px rgba(15, 23, 42, .25);
	transition: transform .15s ease, filter .15s ease;
}
#gdprcc-reopen:hover { transform: translateY(-2px); filter: brightness(1.05); }
.gdprcc-reopen__icon { display: inline-flex; }

/* ============================================================
   ANIMATIONS  (CSS only)
   ============================================================ */
.gdprcc-banner,
.gdprcc-settings {
	opacity: 0;
	transition: opacity .35s ease, transform .35s ease;
}
.gdprcc.is-visible .gdprcc-banner,
.gdprcc.is-visible .gdprcc-settings { opacity: 1; transform: none; }

/* slide */
.gdprcc--anim-slide.gdprcc--bottom .gdprcc-banner,
.gdprcc--anim-slide.gdprcc--bottom-left .gdprcc-banner,
.gdprcc--anim-slide.gdprcc--bottom-right .gdprcc-banner,
.gdprcc--anim-slide .gdprcc-settings { transform: translateY(20px); }
.gdprcc--anim-slide.gdprcc--top .gdprcc-banner { transform: translateY(-20px); }
.gdprcc--anim-slide.gdprcc--box .gdprcc-banner,
.gdprcc--anim-slide.gdprcc--box .gdprcc-settings { transform: translateY(12px) scale(.98); }

/* fade keeps opacity-only (default). none disables motion */
.gdprcc--anim-none .gdprcc-banner,
.gdprcc--anim-none .gdprcc-settings { transition: none; transform: none; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
	.gdprcc-banner,
	.gdprcc-settings,
	.gdprcc-btn,
	.gdprcc-reopen { transition: none !important; transform: none !important; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
	.gdprcc--bar .gdprcc-banner {
		flex-direction: column;
		align-items: stretch;
		margin: 0;
		border-radius: var(--gdprcc-radius) var(--gdprcc-radius) 0 0;
	}
	.gdprcc--bar.gdprcc--top .gdprcc-banner { border-radius: 0 0 var(--gdprcc-radius) var(--gdprcc-radius); }
	.gdprcc--bottom-left .gdprcc-banner,
	.gdprcc--bottom-right .gdprcc-banner,
	.gdprcc--bottom-left .gdprcc-settings,
	.gdprcc--bottom-right .gdprcc-settings {
		left: 12px; right: 12px; bottom: 12px; width: auto;
	}
	.gdprcc-banner__actions,
	.gdprcc-settings__actions { justify-content: stretch; }
	.gdprcc-btn { flex: 1 1 auto; text-align: center; }
	.gdprcc-reopen__text { display: none; }
}
