/* =========================================================
    ARCHIVE FORUM GALLERY MODAL (sub-modal--gallery)
========================================================= */

.sub-modal--gallery .sub-modal__dialog {
    width: min(920px, 92vw);
    max-height: min(680px, calc(100vh - 80px));
}

.sub-modal--gallery .sub-modal__inner {
    display: flex;
    flex-direction: column;
    max-height: min(680px, calc(100vh - 80px));
    padding: 56px 40px 32px;
    overflow-y: auto;
}

.gallery-modal__header {
    margin-bottom: 20px;
}

.gallery-modal__title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.gallery-modal__viewport {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.04);
}

.gallery-swiper {
    width: 100%;
}

.gallery-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-swiper .swiper-slide img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(65vh, 560px);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background-color: rgba(4, 6, 10, 0.5);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.gallery-nav:hover {
    border-color: var(--sub-modal-accent);
    background-color: var(--sub-modal-accent);
    color: #111111;
}

.gallery-nav--prev {
    left: 16px;
}

.gallery-nav--next {
    right: 16px;
}

.gallery-nav.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.gallery-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.gallery-dots__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.25s ease;
}

.gallery-dots__dot.is-active {
    width: 22px;
    border-radius: 5px;
    background-color: var(--sub-modal-accent);
}

@media (max-width: 767px) {
    .sub-modal--gallery .sub-modal__inner {
        padding: 48px 20px 24px;
    }

    .gallery-modal__title {
        font-size: 20px;
    }

    .gallery-nav {
        width: 38px;
        height: 38px;
    }

    .gallery-swiper .swiper-slide img {
        max-height: min(50vh, 420px);
    }
}
