.rkep-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
}

.rkep-popup-container {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: rkep-fade-in 0.3s ease-out;
}

@keyframes rkep-fade-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.rkep-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.rkep-popup-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.rkep-popup-content {
    padding: 0;
    height: 100%;
}

.rkep-popup-frames {
    display: flex;
    flex-wrap: wrap;
    height: 100%;
}

/* Single frame - full width */
.rkep-frames-1 .rkep-popup-frames {
    flex-direction: column;
}

.rkep-frames-1 .rkep-popup-frame {
    flex: 0 0 100%;
}

/* Two frames - side by side */
.rkep-frames-2 .rkep-popup-frames {
    flex-direction: row;
}

.rkep-frames-2 .rkep-popup-frame {
    flex: 0 0 50%;
}

.rkep-popup-frame {
    position: relative;
    overflow: hidden;
}

.rkep-popup-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rkep-popup-frame.no-height img {
    height: auto;
    max-height: 80vh;
}

.rkep-frame-label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
    padding: 15px 20px 30px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 2;
}

@media (max-width: 768px) {
    .rkep-frames-2 .rkep-popup-frames {
        flex-direction: column;
    }

    .rkep-frames-2 .rkep-popup-frame {
        flex: 0 0 100%;
    }

    .rkep-popup-container {
        max-width: 95vw;
    }
}