/* WPSolaris Content Blocker – Platzhalter.
 * Farben, Unschärfe und Maße kommen als CSS-Variablen aus den Einstellungen
 * (Settings::css_vars()). Die Werte hier sind nur Rückfälle. */

.wpsol-yt-content-blocker {
    --_bg: var(--wpsol-yt-content-blocker-bg, #fff);
    --_fg: var(--wpsol-yt-content-blocker-fg, #1d2327);
    --_accent: var(--wpsol-yt-content-blocker-accent, #624cab);
    --_radius: var(--wpsol-yt-content-blocker-radius, 14px);
    --_icon: var(--wpsol-yt-content-blocker-icon, 44px);
    position: relative;
    display: grid;
    place-items: center;
    min-height: var(--wpsol-yt-content-blocker-min-height, 260px);
    padding: 28px 16px;
    box-sizing: border-box;
    border-radius: var(--_radius);
    isolation: isolate;
    color: var(--_fg);
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
}

/* Seitenverhältnis: Die Breite bleibt immer 100 %. Ohne feste Breite würde
   ein Browser die Höhengrenze über das Verhältnis auf die Breite übertragen
   und den Platzhalter schmal und linksbündig zeichnen. Auf breiten Flächen
   (ganze Abschnitte) begrenzt eine Höchsthöhe das Verhältnis; ist die Karte
   höher (schmale Spalte, Handy), wächst die Box mit. */
.wpsol-yt-content-blocker--ratio {
    width: 100%;
    min-height: auto;
    aspect-ratio: var(--wpsol-yt-content-blocker-ratio, 16 / 9);
    max-height: max(var(--wpsol-yt-content-blocker-min-height, 260px), min(60vh, 560px));
}

/* Ganzer Abschnitt: randlos und volle Breite, wie der Abschnitt selbst.
   Die Karte behält ihren Radius. */
.wpsol-yt-content-blocker--flush {
    border-radius: 0;
    padding: 48px 16px;
}

.wpsol-yt-content-blocker--flush .wpsol-yt-content-blocker__backdrop { border-radius: 0; }

.wpsol-yt-content-blocker--flush .wpsol-yt-content-blocker__card { border-radius: var(--_radius); }

/* ── Hintergrund ── */
.wpsol-yt-content-blocker__backdrop {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    border-radius: inherit;
    background: #eceaf3;
}

.wpsol-yt-content-blocker__backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(var(--wpsol-yt-content-blocker-blur, 12px));
    transform: scale(1.12);
}

/* Ohne Bild: weiche Farbflächen in der Akzentfarbe und angedeutete Zeilen,
   damit man ahnt, dass hier Inhalt wartet. */
.wpsol-yt-content-blocker__ghost {
    position: absolute;
    inset: -10%;
    background:
        radial-gradient(circle at 18% 28%, color-mix(in srgb, var(--_accent) 55%, transparent) 0, transparent 42%),
        radial-gradient(circle at 82% 72%, color-mix(in srgb, var(--_accent) 35%, #7dd3fc) 0, transparent 46%),
        radial-gradient(circle at 65% 15%, color-mix(in srgb, var(--_accent) 20%, #fde68a) 0, transparent 38%),
        #f3f1f9;
    filter: blur(calc(var(--wpsol-yt-content-blocker-blur, 12px) + 8px));
}

.wpsol-yt-content-blocker__ghost i {
    position: absolute;
    left: 14%;
    height: 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .85);
}

.wpsol-yt-content-blocker__ghost i:nth-child(1) { top: 24%; width: 46%; }
.wpsol-yt-content-blocker__ghost i:nth-child(2) { top: 34%; width: 62%; }
.wpsol-yt-content-blocker__ghost i:nth-child(3) { top: 62%; width: 54%; }
.wpsol-yt-content-blocker__ghost i:nth-child(4) { top: 72%; width: 38%; }

.wpsol-yt-content-blocker__backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 12, 30, var(--wpsol-yt-content-blocker-dim, .2));
}

/* ── Karte ── */
.wpsol-yt-content-blocker__card {
    width: 100%;
    max-width: 440px;
    box-sizing: border-box;
    padding: 26px 26px 22px;
    border-radius: var(--_radius);
    color: var(--_fg);
}

.wpsol-yt-content-blocker--glass .wpsol-yt-content-blocker__card {
    background: color-mix(in srgb, var(--_bg) 74%, transparent);
    border: 1px solid color-mix(in srgb, #fff 55%, transparent);
    box-shadow: 0 18px 50px rgba(15, 12, 30, .22);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
}

.wpsol-yt-content-blocker--card .wpsol-yt-content-blocker__card {
    background: var(--_bg);
    box-shadow: 0 14px 40px rgba(15, 12, 30, .25);
}

.wpsol-yt-content-blocker--minimal {
    background: var(--_bg);
    border: 1px solid color-mix(in srgb, var(--_fg) 14%, transparent);
}

.wpsol-yt-content-blocker--minimal .wpsol-yt-content-blocker__backdrop { display: none; }
.wpsol-yt-content-blocker--minimal .wpsol-yt-content-blocker__card { padding: 8px; }

.wpsol-yt-content-blocker__icon {
    display: inline-grid;
    place-items: center;
    width: calc(var(--_icon) * 1.55);
    height: calc(var(--_icon) * 1.55);
    margin-bottom: 10px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--_accent) 13%, transparent);
    color: var(--_accent);
}

.wpsol-yt-content-blocker__icon svg {
    width: var(--_icon);
    height: var(--_icon);
}

.wpsol-yt-content-blocker__title {
    margin: 0 0 6px;
    font-size: 1.15em;
    font-weight: 700;
    line-height: 1.3;
}

.wpsol-yt-content-blocker__text {
    margin: 0 0 8px;
    opacity: .9;
}

.wpsol-yt-content-blocker__note {
    margin: 0 0 16px;
    font-size: .82em;
    opacity: .72;
}

.wpsol-yt-content-blocker__note a {
    color: inherit;
    text-decoration: underline;
}

.wpsol-yt-content-blocker__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.wpsol-yt-content-blocker__button {
    appearance: none;
    margin: 0;
    padding: 10px 18px;
    border: 1.5px solid var(--_accent);
    border-radius: calc(var(--_radius) * .7 + 4px);
    font: inherit;
    font-size: .92em;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: filter .15s, background-color .15s;
}

.wpsol-yt-content-blocker__button--once {
    background: transparent;
    color: var(--_accent);
}

.wpsol-yt-content-blocker__button--once:hover { background: color-mix(in srgb, var(--_accent) 10%, transparent); }

.wpsol-yt-content-blocker__button--allow {
    background: var(--_accent);
    color: #fff;
}

.wpsol-yt-content-blocker__button--allow:hover { filter: brightness(1.08); }

.wpsol-yt-content-blocker__button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--_accent) 45%, transparent);
    outline-offset: 2px;
}

.wpsol-yt-content-blocker-live {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ── YOOtheme-Platzhalter (YouTube, Vimeo, Karten) im selben Design ──
   Der Stil kommt als Klasse am <body>: wpsol-yt-content-blocker-style-glass|card|minimal. */
.wpsol-yt-content-blocker-restyle .js-consent-overlay .uk-card-overlay {
    max-width: 440px;
    border-radius: var(--wpsol-yt-content-blocker-radius, 14px);
    color: var(--wpsol-yt-content-blocker-fg, #1d2327);
}

.wpsol-yt-content-blocker-style-glass .js-consent-overlay .uk-card-overlay {
    background: color-mix(in srgb, var(--wpsol-yt-content-blocker-bg, #fff) 74%, transparent);
    border: 1px solid color-mix(in srgb, #fff 55%, transparent);
    box-shadow: 0 18px 50px rgba(15, 12, 30, .22);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
}

.wpsol-yt-content-blocker-style-card .js-consent-overlay .uk-card-overlay {
    background: var(--wpsol-yt-content-blocker-bg, #fff);
    border: 0;
    box-shadow: 0 14px 40px rgba(15, 12, 30, .25);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.wpsol-yt-content-blocker-style-minimal .js-consent-overlay .uk-card-overlay {
    background: var(--wpsol-yt-content-blocker-bg, #fff);
    border: 1px solid color-mix(in srgb, var(--wpsol-yt-content-blocker-fg, #1d2327) 14%, transparent);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.wpsol-yt-content-blocker-restyle .js-consent-overlay .uk-card-overlay p { color: inherit; }

.wpsol-yt-content-blocker-restyle .js-consent-overlay .uk-button-primary {
    background: var(--wpsol-yt-content-blocker-accent, #624cab);
    border-color: var(--wpsol-yt-content-blocker-accent, #624cab);
    border-radius: calc(var(--wpsol-yt-content-blocker-radius, 14px) * .7 + 4px);
    color: #fff;
}

/* Das Vorschaubild hinter dem Platzhalter wird weichgezeichnet, solange
   der Platzhalter sichtbar ist – außer im schlichten Stil. */
.wpsol-yt-content-blocker-restyle:not(.wpsol-yt-content-blocker-style-minimal) [data-video-consent]:has(.js-consent-overlay:not([style*="hidden"])) img:not(.uk-card img),
.wpsol-yt-content-blocker-restyle:not(.wpsol-yt-content-blocker-style-minimal) img.js-consent-overlay:not([style*="hidden"]) {
    filter: blur(var(--wpsol-yt-content-blocker-blur, 12px));
}
