/* Forum post/comment images + multi-image slideshow (see slideshow.js) */

.post-media, .comment-media { margin: 10px 0 2px; }
.post-media-single img {
    display: block;
    max-width: 100%;
    max-height: 460px;
    border-radius: 12px;
    object-fit: contain;
    background: rgba(0,0,0,.25);
}
/* Comment images: ~2/3 of the comment width, and bounded height so tall
   (portrait) images stay compact — click to view full size in the lightbox. */
.comment-media img {
    display: block;
    max-width: 66%;
    max-height: 340px;
    border-radius: 10px;
}

.wandr-zoomable { cursor: zoom-in; }

/* Fullscreen image preview (lightbox) — see slideshow.js */
.wandr-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0,0,0,.9);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2.5vh 2.5vw;
}
.wandr-lightbox.open { display: flex; }
.wandr-lb-img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 12px 60px rgba(0,0,0,.6);
    cursor: default;
}
.wandr-lb-close {
    position: fixed;
    top: 16px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.wandr-lb-close:hover { background: rgba(255,255,255,.28); }

.wandr-slideshow { margin: 10px 0 2px; user-select: none; }

.wandr-ss-viewport {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0,0,0,.28);
}

.wandr-ss-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;                 /* Firefox */
    -webkit-overflow-scrolling: touch;
}
.wandr-ss-track::-webkit-scrollbar { display: none; }   /* WebKit */

.wandr-ss-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 460px;
}
.wandr-ss-slide img {
    width: 100%;
    max-height: 460px;
    object-fit: contain;
    display: block;
}

.wandr-ss-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, opacity .15s;
    z-index: 2;
}
.wandr-ss-nav:hover { background: rgba(0,0,0,.8); }
.wandr-ss-prev { left: 8px; }
.wandr-ss-next { right: 8px; }
.wandr-ss-nav.disabled { opacity: 0; pointer-events: none; }

.wandr-ss-counter {
    position: absolute;
    top: 8px;
    right: 10px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    z-index: 2;
    pointer-events: none;
}

.wandr-ss-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px 0 2px;
    flex-wrap: wrap;
}
.wandr-ss-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(180,180,200,.4);
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.wandr-ss-dot.active { background: #6366f1; transform: scale(1.25); }

/* Compose-side image previews (post composer + comment/reply boxes) */
.wandr-img-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.wandr-img-thumb {
    position: relative;
    width: 74px;
    height: 74px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0,0,0,.25);
    flex-shrink: 0;
}
.wandr-img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wandr-img-thumb.uploading { opacity: .55; }
.wandr-img-thumb-x {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,.65);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wandr-img-thumb-x:hover { background: rgba(220,38,38,.9); }

.wandr-img-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid rgba(160,180,220,.28);
    color: inherit;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    opacity: .85;
    transition: background .15s, opacity .15s;
}
.wandr-img-btn:hover { background: rgba(255,255,255,.08); opacity: 1; }
.wandr-img-btn:disabled { opacity: .4; cursor: default; }

.cp-images { margin-top: 12px; }
.cp-img-hint { font-size: 12px; opacity: .55; margin-left: 8px; }

/* Comment/reply compose: stack the input row and its image previews */
.comment-compose-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.comment-img-btn {
    background: none;
    border: 1px solid rgba(160,180,220,.2);
    border-radius: 8px;
    color: inherit;
    font-size: 15px;
    line-height: 1;
    padding: 5px 9px;
    cursor: pointer;
    opacity: .8;
    transition: background .15s, opacity .15s;
}
.comment-img-btn:hover { opacity: 1; background: rgba(255,255,255,.06); }

/* Photo + Post buttons match the comment textarea's height (stretch to the row) */
.comment-input-wrap .comment-img-btn,
.comment-input-wrap .comment-submit-btn {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

