/* Visually matches the existing Browse Map image lightbox on desktop. */
.tradel-fullscreen-open { overflow: hidden; }
.tradel-fullscreen-gallery {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tradel-fullscreen-gallery:not([open]) { display: none; }
.tradel-fullscreen-gallery::backdrop { background: rgba(0, 0, 0, .78); }
.tradel-gallery-panel {
    position: relative;
    width: min(86vw, 900px);
    height: min(76vh, 620px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.tradel-gallery-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(86vw, 860px);
    height: min(76vh, 580px);
    margin: 0;
    padding: 0;
}
.tradel-gallery-frame img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 18px;
}
.tradel-gallery-count {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    color: #e1e7e3;
    font: 600 13px/1.4 system-ui, sans-serif;
    text-shadow: 0 1px 5px rgba(0,0,0,.8);
}
.tradel-gallery-prev,
.tradel-gallery-next {
    position: absolute;
    z-index: 1;
    appearance: none;
    border: 0;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.94);
    color: #17221b;
    box-shadow: 0 10px 28px rgba(0,0,0,.28);
    cursor: pointer;
}
.tradel-gallery-prev:hover,
.tradel-gallery-next:hover { background: #fff; }
.tradel-gallery-prev,
.tradel-gallery-next {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    font: 800 38px/.8 system-ui, sans-serif;
}
.tradel-gallery-prev { left: -18px; }
.tradel-gallery-next { right: -18px; }
.tradel-gallery-prev[hidden],
.tradel-gallery-next[hidden] { display: none; }
[data-open-listing-fullscreen] { cursor: zoom-in; }
[data-open-listing-fullscreen]:focus-visible {
    outline: 3px solid #4b9a6a;
    outline-offset: 3px;
}
@media (max-width: 680px) {
    .tradel-gallery-panel {
        width: calc(100vw - 22px);
        height: min(90dvh, 760px);
    }
    .tradel-gallery-frame {
        width: 100%;
        height: calc(100% - 76px);
    }
    .tradel-gallery-frame img { border-radius: 10px; }
    .tradel-gallery-prev,
    .tradel-gallery-next {
        top: auto;
        bottom: 4px;
        transform: none;
        width: 42px;
        height: 42px;
        font-size: 30px;
    }
    .tradel-gallery-prev { left: 3px; }
    .tradel-gallery-next { right: 3px; }
    .tradel-gallery-count { bottom: 17px; }
}
