/* CLV Cookie Consent – Frontend */
.clv-cc-root {
	font-size: 15px;
	line-height: 1.5;
}
.clv-cc-root [hidden],
.clv-cc-embed [hidden] { display: none !important; }
.clv-cc-root *, .clv-cc-root *::before, .clv-cc-root *::after { box-sizing: border-box; }

.clv-cc-banner,
.clv-cc-modal {
	background: var(--clv-cc-bg);
	color: var(--clv-cc-text);
	font-family: inherit;
}
.clv-cc-banner a, .clv-cc-modal a { color: var(--clv-cc-primary); text-decoration: underline; }

.clv-cc-title { font-size: 1.15em; font-weight: 700; margin: 0 0 .4em; }
.clv-cc-text p { margin: 0 0 .6em; }
.clv-cc-links { font-size: .9em; margin: .3em 0 0; }

/* ---------- Banner ---------- */
.clv-cc-banner { position: fixed; z-index: 2147483000; box-shadow: 0 -4px 24px rgba(0,0,0,.15); }
.clv-cc-inner { display: flex; gap: 1.5em; align-items: center; padding: 1.25em 1.5em; max-width: 1200px; margin: 0 auto; }
.clv-cc-content { flex: 1 1 auto; max-height: 50vh; overflow: auto; }
.clv-cc-buttons { display: flex; flex-wrap: wrap; gap: .5em; flex: 0 0 auto; }

.clv-cc-pos-bottom { left: 0; right: 0; bottom: 0; }
.clv-cc-pos-top { left: 0; right: 0; top: 0; box-shadow: 0 4px 24px rgba(0,0,0,.15); }

.clv-cc-pos-box-left,
.clv-cc-pos-box-right { bottom: 1em; width: 420px; max-width: calc(100% - 2em); border-radius: var(--clv-cc-radius); }
.clv-cc-pos-box-left { left: 1em; }
.clv-cc-pos-box-right { right: 1em; }

.clv-cc-pos-center { top: 50%; left: 50%; transform: translate(-50%, -50%); width: 560px; max-width: calc(100% - 2em); border-radius: var(--clv-cc-radius); }

.clv-cc-pos-box-left .clv-cc-inner,
.clv-cc-pos-box-right .clv-cc-inner,
.clv-cc-pos-center .clv-cc-inner { flex-direction: column; align-items: stretch; }
.clv-cc-pos-box-left .clv-cc-buttons,
.clv-cc-pos-box-right .clv-cc-buttons,
.clv-cc-pos-center .clv-cc-buttons { justify-content: flex-end; }

.clv-cc-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 2147482999; }

/* ---------- Buttons ---------- */
.clv-cc-btn {
	appearance: none;
	border: 2px solid var(--clv-cc-primary);
	background: var(--clv-cc-primary);
	color: #fff;
	padding: .6em 1.2em;
	border-radius: var(--clv-cc-radius);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	line-height: 1.2;
	transition: filter .15s, background .15s;
}
.clv-cc-btn:hover { filter: brightness(1.1); }
.clv-cc-btn:focus-visible, .clv-cc-close:focus-visible, .clv-cc-revisit:focus-visible { outline: 3px solid var(--clv-cc-primary); outline-offset: 2px; }
.clv-cc-btn-outline { background: transparent; color: var(--clv-cc-primary); }
.clv-cc-btn-outline:hover { background: rgba(0,0,0,.04); filter: none; }

/* ---------- Modal ---------- */
.clv-cc-modal-wrap { position: fixed; inset: 0; z-index: 2147483001; display: flex; align-items: center; justify-content: center; padding: 1em; }
.clv-cc-modal-wrap > .clv-cc-overlay { z-index: 0; }
.clv-cc-modal { position: relative; z-index: 1; width: 640px; max-width: 100%; max-height: calc(100vh - 2em); display: flex; flex-direction: column; border-radius: var(--clv-cc-radius); box-shadow: 0 10px 40px rgba(0,0,0,.3); outline: none; }
.clv-cc-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 1em 1.5em; border-bottom: 1px solid rgba(0,0,0,.1); }
.clv-cc-modal-head .clv-cc-title { margin: 0; }
.clv-cc-close { background: none; border: 0; font-size: 1.8em; line-height: 1; cursor: pointer; color: inherit; padding: 0 .2em; }
.clv-cc-modal-body { padding: 1em 1.5em; overflow-y: auto; }
.clv-cc-modal-foot { display: flex; flex-wrap: wrap; gap: .5em; justify-content: flex-end; padding: 1em 1.5em; border-top: 1px solid rgba(0,0,0,.1); }

.clv-cc-cat { border: 1px solid rgba(0,0,0,.12); border-radius: var(--clv-cc-radius); padding: .8em 1em; margin: 0 0 .8em; }
.clv-cc-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 1em; }
.clv-cc-cat-desc { font-size: .92em; opacity: .85; margin-top: .4em; }
.clv-cc-cat-desc p { margin: 0 0 .4em; }
.clv-cc-always { font-size: .85em; font-weight: 600; color: var(--clv-cc-primary); white-space: nowrap; }
.clv-cc-details summary { cursor: pointer; font-size: .9em; color: var(--clv-cc-primary); }
.clv-cc-id { font-size: .85em; opacity: .75; }

/* Schalter */
.clv-cc-switch { display: inline-flex; align-items: center; gap: .7em; cursor: pointer; position: relative; font-weight: 600; }
.clv-cc-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.clv-cc-slider { position: relative; width: 42px; height: 24px; background: #c5c5c5; border-radius: 24px; flex: 0 0 auto; transition: background .2s; }
.clv-cc-slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.clv-cc-switch input:checked + .clv-cc-slider { background: var(--clv-cc-primary); }
.clv-cc-switch input:checked + .clv-cc-slider::after { transform: translateX(18px); }
.clv-cc-switch input:disabled + .clv-cc-slider { opacity: .6; cursor: not-allowed; }
.clv-cc-switch input:focus-visible + .clv-cc-slider { outline: 3px solid var(--clv-cc-primary); outline-offset: 2px; }

/* Tabellen */
.clv-cc-table-wrap { overflow-x: auto; margin: .5em 0; }
.clv-cc-table { width: 100%; border-collapse: collapse; font-size: .85em; }
.clv-cc-table th, .clv-cc-table td { text-align: left; padding: .35em .5em; border-bottom: 1px solid rgba(0,0,0,.1); vertical-align: top; }

/* Schwebender Button */
.clv-cc-revisit { position: fixed; left: 1em; bottom: 1em; z-index: 2147482998; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--clv-cc-primary); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.25); opacity: .85; }
.clv-cc-revisit:hover { opacity: 1; }

html.clv-cc-noscroll { overflow: hidden; }

/* ---------- Blockierte Embeds ---------- */
.clv-cc-embed { position: relative; display: block; max-width: 100%; min-height: 220px; background: #f1f1f1; }
.wp-has-aspect-ratio .wp-block-embed__wrapper > .clv-cc-embed { position: absolute; inset: 0; }
.clv-cc-embed.is-unlocked { background: none; min-height: 0; }
.wp-has-aspect-ratio .wp-block-embed__wrapper > .clv-cc-embed.is-unlocked iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.clv-cc-embed-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.5em; background: #f1f1f1; color: #333; font-size: .9em; }
.clv-cc-embed-overlay p { margin: 0 0 .8em; max-width: 480px; }
.clv-cc-embed-provider { font-weight: 700; font-size: 1.2em; }
.clv-cc-embed.is-unlocked .clv-cc-embed-overlay { display: none; }

/* ---------- Mobil ---------- */
@media (max-width: 782px) {
	.clv-cc-inner { flex-direction: column; align-items: stretch; padding: 1em; gap: 1em; }
	.clv-cc-buttons, .clv-cc-modal-foot { flex-direction: column-reverse; }
	.clv-cc-btn { width: 100%; }
	.clv-cc-pos-box-left, .clv-cc-pos-box-right { left: .5em; right: .5em; bottom: .5em; width: auto; max-width: none; }
}
