.sv-lock { overflow: hidden !important; }

.sv-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: rgba(0,0,0,.72);
    opacity: 0;
    visibility: hidden;
}

.sv-overlay.sv-visible {
    visibility: visible;
}

.sv-modal {
    position: relative;
    max-width: min(92vw, 1100px);
    max-height: calc(100dvh - 32px);
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.sv-preview-link {
    display: block;
    max-width: 100%;
    max-height: calc(100dvh - 40px);
    max-height: calc(100vh - 40px);
    text-decoration: none;
    cursor: default;
}
.sv-preview-link img {
    display: block;
    max-width: 100%;
    max-height: calc(100dvh - 40px);
    max-height: calc(100vh - 40px);
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    box-shadow: 0 12px 50px rgba(0,0,0,.45);
}
.sv-title {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    margin: 0 44px 12px 0;
    text-align: center;
}
.sv-close {
    position: absolute;
    z-index: 2;
    top: 8px;
    right: 8px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #111;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 3px 15px rgba(0,0,0,.3);
}
.sv-no-preview {
    display: inline-block;
    padding: 30px 45px;
    background: #fff;
    color: #111;
    border-radius: 6px;
}
@media (max-width:700px) {
    .sv-overlay { padding: 12px; }
    .sv-modal { max-width: 96vw; max-height: calc(100dvh - 24px);
    max-height: calc(100vh - 24px); }
    .sv-preview-link img { max-height: 84vh; max-width: 96vw; }
    .sv-close { top: 6px; right: 6px; width: 38px; height: 38px; font-size: 27px; }
    .sv-title { font-size: 17px; margin-bottom: 8px; }
}
