.document-viewer {
    margin: 28px 0 36px;
    max-width: 100%;
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
}

.document-viewer__hint {
    margin: 0 0 12px;
    color: #6b6b6b;
    font-size: 14px;
    line-height: 1.5;
}

.document-viewer__frame {
    background: #f4f1ea;
    border: 1px solid #e4dfd4;
    overflow: hidden;
    line-height: 0;
    height: auto;
    min-height: 0;
    touch-action: pan-x pan-y;
}

.document-viewer__swiper {
    width: 100%;
    height: auto !important;
    min-height: 0;
}

.document-viewer__swiper .swiper-wrapper {
    height: auto !important;
    min-height: 0;
    align-items: flex-start;
}

.document-viewer__swiper .swiper-slide {
    height: auto !important;
    min-height: 0;
    display: block;
}

.document-viewer__page {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: #f4f1ea;
    cursor: zoom-in;
    line-height: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.document-viewer__page img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 80vh;
    margin: 0;
    background: #f4f1ea;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

.document-viewer__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 8px 0;
}

.document-viewer__nav {
    min-width: 120px;
    min-height: 48px;
    padding: 10px 16px;
    border: 1px solid #151616;
    background: #151616;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.document-viewer__nav:hover,
.document-viewer__nav:focus {
    background: #2b2c2c;
}

.document-viewer__nav:disabled {
    opacity: 0.45;
    cursor: default;
}

.document-viewer__counter {
    margin: 0;
    min-width: 72px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #151616;
    white-space: nowrap;
}

.document-viewer-lightbox {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    display: none;
    flex-direction: column;
    background: rgba(12, 12, 12, 0.94);
    color: #fff;
    touch-action: manipulation;
}

.document-viewer-lightbox.is-open {
    display: flex;
}

.document-viewer-lightbox__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.document-viewer-lightbox__counter {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.document-viewer-lightbox__close {
    min-width: 48px;
    min-height: 48px;
    border: 0;
    background: #fff;
    color: #111;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.document-viewer-lightbox__stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 8px 16px;
}

.document-viewer-lightbox__stage img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 150px);
    width: auto;
    height: auto;
    object-fit: contain;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
}

.document-viewer-lightbox__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px 18px;
}

.document-viewer-lightbox__nav {
    min-width: 120px;
    min-height: 48px;
    border: 1px solid #fff;
    background: #fff;
    color: #111;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 767px) {
    .document-viewer__bar,
    .document-viewer-lightbox__bar {
        gap: 8px;
    }

    .document-viewer__nav,
    .document-viewer-lightbox__nav {
        min-width: 0;
        flex: 1;
        font-size: 15px;
        padding: 12px 10px;
    }

    .document-viewer__counter {
        font-size: 16px;
    }
}
