.lueira-embed {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 1.5rem;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 100vh;
}

.lueira-embed.is-active {
    opacity: 1;
    pointer-events: auto;
}

.lueira-embed__backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
}

.lueira-embed__dialog {
    position: relative;
    background: #ffffff;
    max-width: min(90vw, 960px);
    width: 100%;
    max-height: 90vh;
    padding: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
    box-sizing: border-box;
}

.lueira-embed__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.lueira-embed__dialog iframe {
    width: 100%;
    height: 70vh;
    border: 0;
    border-radius: 4px;
    flex-grow: 1;
    min-height: 0;
    touch-action: pan-y;
}

.lueira-embed-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    background: #222222;
    color: #ffffff;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s ease-in-out;
}

.lueira-embed-trigger:hover,
.lueira-embed-trigger:focus {
    background: #444444;
    outline: none;
}

html.lueira-embed-locked,
body.lueira-embed-locked {
    overflow: hidden;
    overscroll-behavior: contain;
}

@media (max-width: 768px) {
    .lueira-embed {
        align-items: stretch;
        justify-content: flex-start;
        padding: 0;
    }

    .lueira-embed__dialog {
        width: 100%;
        max-height: none;
        height: 100vh;
        border-radius: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        position: relative;
    }

    .lueira-embed__dialog iframe {
        height: 100%;
        flex: 1 1 auto;
        min-height: 0;
        border-radius: 0;
    }

    .lueira-embed__close {
        top: 1rem;
        right: 1rem;
        background: rgba(0, 0, 0, 0.4);
        color: #ffffff;
        border-radius: 999px;
        width: 2.5rem;
        height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
