.pop-layer-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    background: #000;
    opacity: 0.8;
    z-index: 99999;
}

.pop-layer-shell {
    position: fixed;
    inset: 0;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 50px 24px;
    overflow: auto;
    box-sizing: border-box;
    z-index: 100000;
}

.pop-layer-window {
    position: relative;
    width: min(1140px, 100%);
    max-height: calc(100dvh - 100px);
    overflow: auto;
    box-sizing: border-box;
    color: #000;
    background: #ccc;
    border: 0;
    border-radius: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.pop-layer-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 78px;
    padding: 15px 56px 15px 0;
    box-sizing: border-box;
    background: var(--pop-layer-header-background, #081f3e);
    color: var(--pop-layer-header-text, #fff);
}

.pop-layer-brand {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-right: 1px solid #fff;
    line-height: 48px;
}

.pop-layer-brand img {
    display: block;
    width: 100%;
    max-width: 200px;
    height: auto;
}

.pop-layer-title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0 20px;
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    line-height: 48px;
}

.pop-layer-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background-image: url("/inc/images/Gold_Foil.jpg");
    background-size: cover;
    background-position: center;
    color: #fff;
    cursor: pointer;
    flex: 0 0 28px;
}

.pop-layer-close i {
    pointer-events: none;
}

.pop-layer-window > .popup_foil {
    position: sticky;
    top: 78px;
    z-index: 2;
    height: 4px;
    padding: 0;
    background-image: url("/inc/images/Gold_Foil.jpg");
    background-size: 50%;
    background-repeat: repeat-x;
    background-position: center bottom;
}

.pop-layer-content {
    min-width: 0;
    background: var(--pop-layer-content-background, #ccc);
    color: var(--pop-layer-content-text, #000);
}

.pop-layer-loading,
.pop-layer-error {
    padding: 32px;
    text-align: center;
}

.pop-layer-error-detail {
    margin-top: 8px;
}

.pop-layer-clear {
    display: none;
}

@media (max-width: 768px) {
    .pop-layer-shell {
        align-items: stretch;
        padding: 0;
    }

    .pop-layer-window {
        width: 100%;
        min-height: 100dvh;
        max-height: none;
        box-shadow: none;
    }

    .pop-layer-header {
        min-height: 64px;
        padding: 8px 48px 8px 0;
    }

    .pop-layer-brand {
        padding: 0 12px;
        line-height: 40px;
    }

    .pop-layer-brand img {
        max-width: 150px;
    }

    .pop-layer-title {
        padding: 0 12px;
        line-height: 40px;
    }

    .pop-layer-window > .popup_foil {
        top: 64px;
    }
}
