// #############################################################################
// PREVIEW GENERATOR

.djangocms-frontend-preview {
    position: fixed;
    inset-block-start: 0;
    inset-inline-end: 0;
    z-index: 10;
    text-align: center;
    border-radius: 0 0 0 3px;
    padding: 10px 20px 27px;
    border: 1px solid var(--dca-gray, var(--hairline-color, #ccc));
    border-block-start: none;
    border-inline-end: none;
    background: var(--body-bg, white);
    @media (prefers-color-scheme: dark) {
        background: var(--body-bg, black);
    }

    h2 {
        font-size: 14px;
        min-width: 150px;
        margin: 0 0 12px;
    }

    .b4-preview {
        margin: 0 0 -15px;
    }

    .b4-close {
        position: absolute;
        inset-inline-end: 10px;
        inset-block-start: 8px;
        z-index: 100;
        display: block;
        color: darken($cms-gray, 50%);
        font-size: 12px;
        line-height: 20px;
        font-weight: bold;
        text-transform: uppercase;
        width: 20px;
        height: 20px;
        border-radius: 3px;
        background: $cms-gray;

        &:hover {
            color: white !important;
            text-decoration: none;
            background: $cms-primary;
        }
    }

    .btn > span {
        vertical-align: middle;

        > .icon {
            vertical-align: middle;
        }

        svg,
        use {
            fill: currentColor; // works 90% of the cases
        }
    }
}
