/* YouTube-Platzhalter in Redaktionstexten (#521)
   Markup: tep_block_youtube_iframes() in includes/functions/general.php
   Klick:  js/blog-youtube-consent.js
   Einbindung: tep_youtube_consent_assets() im <head> der Storefront-Templates.
   Akzentfarbe kommt aus --primary (express blau / polieren orange).
   Die Selektoren haben bewusst zwei Klassen: gleiche Spezifitaet wie die alten
   Regeln ".content .yt-consent" in blog.css, diese Datei wird danach geladen. */

.youtube-consent-placeholder {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    /* Breite des Videos kommt als max-width inline; so sprengt der Platzhalter
       auf dem Handy keine Spalte (anders als ein iframe mit fester Breite) */
    width: 100%;
    /* noetig als Grid-/Flex-Kind: sonst erzwingt aspect-ratio die volle Videobreite */
    min-width: 0;
    /* 16:9 wie das Video; bei schmalen Spalten waechst der Kasten mit dem Text */
    aspect-ratio: 16 / 9;
    margin: 0 0 1em 0;
    padding: 12px;
    /* ohne Vorschaubild: neutraler dunkler Verlauf, sonst setzt PHP background-image */
    background: #000 linear-gradient(135deg, #1a1a1a 0%, #333 100%) center / cover no-repeat;
}

.youtube-consent-placeholder .yt-consent {
    position: static;
    box-sizing: border-box;
    width: 80%;
    max-width: 500px;
    max-height: none;
    margin: 0;
    padding: 1em;
    overflow: visible;
    transform: none;
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
}

.youtube-consent-placeholder .yt-cookie-heading {
    display: block;
    margin: 0 0 0.5em 0;
    color: var(--primary-text, #333);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.youtube-consent-placeholder .yt-cookie-subtext {
    margin: 0.75rem 0;
    padding: 0;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
}

.youtube-consent-placeholder .yt-cookie-subtext a {
    color: var(--primary-text, #333);
    font-weight: 600;
    text-decoration: underline;
}

.youtube-consent-placeholder .youtube-consent-btn {
    display: block;
    width: auto;
    min-width: 160px;
    margin: 0 auto;
    padding: 0.5em 1.5em;
    background: var(--primary, #333);
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
}

.youtube-consent-placeholder .youtube-consent-btn:hover,
.youtube-consent-placeholder .youtube-consent-btn:focus-visible {
    background-image: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15));
    transform: none;
    box-shadow: none;
}

.youtube-consent-placeholder .youtube-consent-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--primary, #333);
}

@media screen and (max-width: 540px) {
    .youtube-consent-placeholder {
        padding: 8px;
    }

    .youtube-consent-placeholder .yt-consent {
        width: 100%;
        padding: 0.75em;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    .youtube-consent-placeholder .yt-cookie-heading {
        font-size: 1.125rem;
    }

    .youtube-consent-placeholder .yt-cookie-subtext {
        margin: 0.5rem 0;
        font-size: 0.8125rem;
    }

    .youtube-consent-placeholder .youtube-consent-btn {
        padding: 0.5em 1.5em;
        font-size: 0.875rem;
    }
}
