/*
 * Styles for the privacy-friendly YouTube placeholder.
 *
 * No external fonts, images or CSS resources are loaded.
 * This file is completely self-contained.
 */

/*
 * Main wrapper.
 *
 * The CSS custom property --privacy-youtube-max-width is set by PHP/JS.
 */
.privacy-youtube {
    width: 100%;
    max-width: var(--privacy-youtube-max-width, 800px);
    margin: 1.5rem auto;
    box-sizing: border-box;
}

/*
 * Placeholder shown before the visitor explicitly loads YouTube.
 *
 * A neutral background and border make it visually clear that this
 * is intentionally not the actual video player yet.
 */
.privacy-youtube__placeholder {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;

    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 0;
    padding: 2rem;

    /*width: 100%;
    height: 100%;
    text-align: center;
    align-content: center;
    padding: 0 1em;
    z-index: 9;
    background-color: rgba( 0, 0, 0, .6 );
    color: #fff; */

    box-sizing: border-box;
    overflow: hidden;

    /* border: 1px solid #d5d5d5; 
    border-radius: 6px; */
    box-shadow: 0px 3px 5px #333;

    background-color: rgba( 0, 0, 0, .6 );
   /* background-image: var(--privacy-youtube-background-image, none); */
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), var(--privacy-youtube-background-image, none);

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: #fff;
    text-align: center;
   
}

/*
 * Dark translucent layer above the preview image keeps the consent text
 * readable regardless of the selected image.
 */
.privacy-youtube__placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    pointer-events: none;
}

.privacy-youtube__placeholder > * {
    position: relative;
    z-index: 1;
}


/*
 * Text area inside the placeholder.
 */
.privacy-youtube__text {
    max-width: 48rem;
}

/*
 * Small heading for the placeholder.
 */
.privacy-youtube__title {
    margin: 0 0 0.5rem;
    font-weight: 700;
}

/*
 * Reset the default paragraph margin of the last paragraph
 * to keep the button spacing predictable.
 */
.privacy-youtube__text p:last-child {
    margin-bottom: 0;
}

/*
 * Explicit user-action button.
 *
 * No inline SVG, icon font or external image is needed.
 */
.privacy-youtube__button {
    display: inline-block;

    padding: 0.75rem 1.25rem;

   /* border: 1px solid #333;
    border-radius: 4px;

    background: #fff;
    color: #111;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);

    font: inherit;
    font-weight: 600; */

    cursor: pointer;
}

/*
 * Keyboard focus must remain visible.
 */
.privacy-youtube__button:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

/*
 * A small visual change on mouse hover.
 */
/*.privacy-youtube__button:hover {
    text-decoration: underline;
}*/

/*
 * Responsive iframe wrapper.
 *
 * aspect-ratio keeps the usual 16:9 video shape without JavaScript
 * calculating a height.
 */
.privacy-youtube__iframe {
    width: 100%;
    max-width: var(--privacy-youtube-max-width, 800px);

    aspect-ratio: 16 / 9;

    margin: 1.5rem auto;

    overflow: hidden;
}

/*
 * The actual iframe fills the responsive wrapper.
 */
.privacy-youtube__iframe iframe {
    display: block;

    width: 100%;
    height: 100%;

    border: 0;
}

/*
 * Error state for an invalid shortcode URL.
 */
.privacy-youtube--error {
    padding: 1rem;

    border: 1px solid #c00;
    border-radius: 4px;

    background: #fff5f5;
}
