/**
 * PS YouTube Embed — Frontend-Styles
 * Version: 1.3.5
 */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.psyte-wrapper {
    margin: 8px 0 12px;
    max-width: 100%;
}

/* ── Alignment ───────────────────────────────────────────────────────────── */
.psyte-align-left  { float: left;  margin: 4px 16px 8px 0; }
.psyte-align-right { float: right; margin: 4px 0 8px 16px; }
.psyte-align-center { display: block; margin-left: auto; margin-right: auto; }
@media (max-width: 600px) {
    .psyte-align-left, .psyte-align-right { float: none; margin-left: 0; margin-right: 0; width: 100% !important; }
}

/* ── Responsive 16:9 Box ─────────────────────────────────────────────────── */
.psyte-inner {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #111;
    border-radius: 3px;
}

.psyte-audio .psyte-inner {
    padding-bottom: 0;
    height: 54px;
}

/* ── Thumbnail ───────────────────────────────────────────────────────────── */
.psyte-thumb {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #222;
    cursor: pointer;
}

.psyte-thumb-playlist {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-image: none;
    cursor: default;
}

/* ── Playlist-Label ──────────────────────────────────────────────────────── */
.psyte-playlist-label {
    position: absolute;
    top: 12px;
    left: 14px;
    font-family: Roboto, Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,.7);
    text-transform: uppercase;
    letter-spacing: .06em;
    pointer-events: none;
}

/* ── Titel ───────────────────────────────────────────────────────────────── */
.psyte-title {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 8px 12px 32px;
    font-family: Roboto, Arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(to bottom, rgba(0,0,0,.65) 0%, transparent 100%);
    line-height: 1.3;
    pointer-events: none;
}

/* ── Play-Button ─────────────────────────────────────────────────────────── */
.psyte-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 2;
    transition: transform .18s;
    line-height: 0;
}

.psyte-play-icon {
    display: block;
    width: 72px;
    height: 50px;
    background: rgba(23, 23, 23, .85);
    border-radius: 14px;
    position: relative;
    transition: background .18s;
}

.psyte-play-icon::after {
    content: '';
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 11px 0 11px 20px;
    border-color: transparent transparent transparent #fff;
}

.psyte-play-btn:hover .psyte-play-icon,
.psyte-thumb:hover .psyte-play-btn .psyte-play-icon {
    background: #ff0000;
}

.psyte-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.08);
}

.psyte-playlist-icon {
    width: 88px;
    height: 63px;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.4));
    transition: transform .18s;
}

.psyte-play-btn:hover .psyte-playlist-icon {
    transform: scale(1.08);
}

/* ── Inline iframe ───────────────────────────────────────────────────────── */
.psyte-iframe-wrap {
    position: absolute;
    inset: 0;
}

.psyte-iframe-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ── Consent-Overlay ─────────────────────────────────────────────────────── */
.psyte-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, .82);
    z-index: 10;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Klicks fallen durch zum Play-Button */
}

.psyte-overlay.active {
    display: flex;
}

.psyte-overlay-box {
    pointer-events: auto; /* Consent-Box selbst bleibt klickbar */
    text-align: center;
    padding: 20px 24px;
    max-width: 380px;
}

.psyte-overlay-text {
    font-family: Roboto, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.55;
    margin: 0 0 14px;
    color: #e8e8e8;
}

.psyte-load-btn {
    display: inline-block;
    padding: 9px 22px;
    background: #ff0000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s;
    font-family: Roboto, Arial, sans-serif;
}

.psyte-load-btn:hover { background: #cc0000; }

.psyte-privacy-link {
    display: block;
    margin-top: 10px;
    font-size: 11px;
    color: #aaa;
    text-decoration: underline;
}

.psyte-privacy-link:hover { color: #ddd; }

/* ── Disclaimer & Link ───────────────────────────────────────────────────── */
.psyte-disclaimer {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
    line-height: 1.4;
}
.psyte-disclaimer a { color: #888; }
.psyte-link { margin-top: 5px; }
.psyte-link a { font-size: 12px; color: #555; text-decoration: none; }
.psyte-link a:hover { text-decoration: underline; }

/* ── Loading ─────────────────────────────────────────────────────────────── */
.psyte-inner.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: #111;
    opacity: .7;
    z-index: 5;
}

/* ── LIGHTBOX ────────────────────────────────────────────────────────────── */

/* body-Klasse verhindert Scroll wenn Lightbox offen ist */
body.psyte-lb-active {
    overflow: hidden;
}

#psyte-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999990;
    align-items: center;
    justify-content: center;
}

#psyte-lightbox.psyte-lb-open {
    display: flex;
}

/* Dunkler Hintergrund */
.psyte-lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .90);
    cursor: pointer;
    animation: psyteFadeIn .25s ease;
}

/* Video-Box: 16:9, max 940px Breite */
.psyte-lb-box {
    position: relative;
    z-index: 1;
    width: min(94vw, 940px);
    aspect-ratio: 16 / 9;
    animation: psyteSlideIn .25s ease;
}

/* Schließen-Button oben rechts */
.psyte-lb-close {
    position: absolute;
    top: -44px;
    right: -4px;
    background: none;
    border: none;
    color: #fff;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
    opacity: .8;
    transition: opacity .15s, transform .15s;
    font-family: Arial, sans-serif;
}

.psyte-lb-close:hover {
    opacity: 1;
    transform: scale(1.15);
}

/* iframe füllt Box komplett */
.psyte-lb-iframe-wrap {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 3px;
    overflow: hidden;
}

.psyte-lb-iframe-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Animationen */
@keyframes psyteFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes psyteSlideIn {
    from { opacity: 0; transform: scale(.94) translateY(12px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .psyte-play-icon { width: 56px; height: 40px; border-radius: 10px; }
    .psyte-play-icon::after { border-width: 8px 0 8px 15px; }
    .psyte-title { font-size: 13px; }
    .psyte-playlist-icon { width: 68px; height: 48px; }
    .psyte-lb-close { top: -38px; font-size: 34px; }
}
