/**
 * Frontend styles for Easy YouTube Embed block
 * GDPR-compliant YouTube embed with thumbnail and privacy notice
 *
 * @package EasyEmbed
 */

// Main wrapper - WordPress generates this class
.wp-block-easy-architect-easy-youtube-embed {
    width: 100%;
    height: auto;
    background: #000;
    color: #fff;
    overflow-wrap: break-word;
    position: relative;

    // Inner wrapper that holds the content
    .easy-youtube-embed-inner {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    // Thumbnail image
    img {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    // Iframe (when loaded) needs same absolute positioning
    iframe {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        height: 100%;
        width: 100%;
        max-width: 100%;
        border: 0;
    }

    // Play button
    .easy-youtube-embed-play-button {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(255, 0, 0, 0.9);
        border: none;
        width: 80px;
        height: 56px;
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 3;

        &:hover {
            background: rgba(255, 0, 0, 1);
            transform: translate(-50%, -50%) scale(1.1);
        }

        &:focus {
            outline: 2px solid #fff;
            outline-offset: 4px;
        }

        svg {
            width: 48px;
            height: 48px;
            fill: #fff;
        }
    }

    // GDPR notice
    .easy-youtube-embed-gdpr-notice {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.8);
        color: inherit; // Inherits text color from parent
        padding: 12px;
        z-index: 2;
    }

    // Preview badge (editor only - not in frontend)
    .easy-youtube-embed-preview-badge {
        position: absolute;
        top: 16px;
        left: 16px;
        background: rgba(0, 0, 0, 0.7);
        color: inherit; // Inherits text color from parent
        padding: 8px 12px;
        border-radius: 4px;
        z-index: 4;
        max-width: calc(100% - 32px);
        word-break: break-word;
    }

}
