/* =========================
   Reusable SBMEC Image Viewer
========================= */

.sbmec-viewer {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 82px 76px 34px;
    background:
        radial-gradient(circle at top left, rgba(58, 87, 232, .46), transparent 34%),
        linear-gradient(135deg, rgba(4, 12, 44, .96), rgba(18, 38, 128, .94));
    backdrop-filter: blur(10px);
}

.sbmec-viewer.active {
    display: flex;
    animation: sbmecViewerIn .22s ease both;
}

.sbmec-viewer::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: .35;
    pointer-events: none;
}

.sbmec-viewer-brand {
    position: fixed;
    top: 18px;
    left: 22px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: .6px;
}

.sbmec-viewer-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.sbmec-viewer-content {
    position: relative;
    z-index: 2;
    width: min(1050px, 100%);
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
}

.sbmec-viewer-content img {
    max-width: 100%;
    max-height: calc(100vh - 230px);
    object-fit: contain;
    border: 1px solid white;
    border-width: 0px 2px;
}

.sbmec-viewer-info {
    margin-top: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .18);
}

.sbmec-viewer-info span {
    color: rgba(255, 255, 255, .65);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.sbmec-viewer-info h3 {
    margin-top: 4px;
    font-size: 22px;
    font-weight: 600;
}

.sbmec-viewer-info p {
    margin-top: 6px;
    color: rgba(255, 255, 255, .78);
    font-size: 15px;
    line-height: 1.55;
    font-weight: 500;
}

.sbmec-viewer-info p:empty {
    display: none;
}

.sbmec-viewer-close,
.sbmec-viewer-arrow {
    position: fixed;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .10);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: .22s ease;
}

.sbmec-viewer-close:hover,
.sbmec-viewer-arrow:hover {
    background: #fff;
    color: #3A57E8;
}

.sbmec-viewer-close {
    top: 22px;
    right: 22px;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    font-size: 22px;
}

.sbmec-viewer-arrow {
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 74px;
    border-radius: 16px;
    font-size: 24px;
}

.sbmec-viewer-arrow.prev {
    left: 18px;
}

.sbmec-viewer-arrow.next {
    right: 18px;
}

body.sbmec-viewer-open {
    overflow: hidden;
}

.sbmec-viewer-auto img,
.sbmec-viewer-trigger {
    cursor: zoom-in;
}

@keyframes sbmecViewerIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 850px) {
    .sbmec-viewer-content img {
        border: none;
    }

    .sbmec-viewer {
        padding: 78px 14px 20px;
    }

    .sbmec-viewer-brand {
        top: 16px;
        left: 16px;
    }

    .sbmec-viewer-brand img {
        width: 36px;
        height: 36px;
    }

    .sbmec-viewer-content img {
        max-height: calc(100vh - 280px);
    }

    .sbmec-viewer-arrow {
        top: auto;
        bottom: 20px;
        transform: none;
        width: 48px;
        height: 48px;
        border-radius: 999px;
    }

    .sbmec-viewer-arrow.prev {
        left: 18px;
    }

    .sbmec-viewer-arrow.next {
        right: 18px;
    }

    .sbmec-viewer-info {
        margin-bottom: 62px;
    }
}