/**
 * Frontend styles for Easy iFrame Embed block
 * GDPR-compliant generic iframe embed with thumbnail or placeholder
 *
 * @package EasyEmbed
 */

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

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

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

    // Hostname badge (always shown top-left)
    .easy-iframe-embed-hostname-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;
    }

    // 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;
    }

    // Load button
    .easy-iframe-load-button {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(255, 255, 255, 0.95);
        border: none;
        padding: 16px 32px;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        z-index: 3;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        font-size: 16px;
        font-weight: 600;
        color: #667eea;

        &:hover {
            background: rgba(255, 255, 255, 1);
            transform: translate(-50%, -50%) scale(1.05);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
        }

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

        svg {
            width: 20px;
            height: 20px;
            fill: #667eea;
        }
    }

    // GDPR notice
    .easy-iframe-embed-gdpr-notice {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.85);
        padding: 12px 16px;
        z-index: 2;
    }

}