/**
 * Home feed image gallery pop-up — Figma
 */

.ye-feed-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 10100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ye-feed-gallery-modal[hidden] {
    display: none !important;
}

.ye-feed-gallery-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 27, 51, 0.52);
}

.ye-feed-gallery-modal__stage {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 24px 96px;
    box-sizing: border-box;
    pointer-events: none;
}

.ye-feed-gallery-modal__frame {
    margin: 0;
    padding: 4px;
    background: #ffffff;
    border-radius: 2px;
    box-shadow: 0 16px 48px rgba(8, 27, 51, 0.28);
    max-height: min(88vh, 920px);
    max-width: min(480px, calc(100vw - 220px));
    pointer-events: auto;
    line-height: 0;
}

.ye-feed-gallery-modal__image {
    display: block;
    width: auto;
    height: auto;
    max-height: min(calc(88vh - 8px), 912px);
    max-width: min(472px, calc(100vw - 228px));
    object-fit: contain;
    border-radius: 0;
}

.ye-feed-gallery-modal__nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    padding: 0;
    border: 1px solid #e6eaf0;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    z-index: 2;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.ye-feed-gallery-modal__nav:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.16);
}

.ye-feed-gallery-modal__nav img {
    display: block;
    width: 27px;
    height: 22px;
}

.ye-feed-gallery-modal__nav-icon--flip {
    transform: scaleX(-1);
}

.ye-feed-gallery-modal__nav--prev {
    left: max(24px, calc(50% - 360px));
}

.ye-feed-gallery-modal__nav--next {
    right: max(24px, calc(50% - 360px));
}

.ye-home-feed-card__image--btn {
    border: 0;
    padding: 0;
    margin: 0;
    width: 100%;
    cursor: pointer;
    font: inherit;
    color: inherit;
    background: transparent;
    text-align: inherit;
    appearance: none;
}

.ye-home-feed-card__image--btn:focus-visible {
    outline: 2px solid var(--lable-color, #0056a7);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .ye-feed-gallery-modal__stage {
        padding: 24px 72px;
    }

    .ye-feed-gallery-modal__frame {
        max-width: min(420px, calc(100vw - 160px));
    }

    .ye-feed-gallery-modal__image {
        max-width: min(412px, calc(100vw - 168px));
    }

    .ye-feed-gallery-modal__nav {
        width: 48px;
        height: 48px;
    }

    .ye-feed-gallery-modal__nav--prev {
        left: 16px;
    }

    .ye-feed-gallery-modal__nav--next {
        right: 16px;
    }
}

@media (max-width: 640px) {
    .ye-feed-gallery-modal__stage {
        padding: 16px 56px;
    }

    .ye-feed-gallery-modal__nav {
        width: 44px;
        height: 44px;
    }

    .ye-feed-gallery-modal__nav img {
        width: 22px;
        height: 18px;
    }
}
