/* BA Gallery — single post carousel and lightbox */

/* ── Swiper overrides ─────────────────────────────────────────────────────── */

.lv-ba-swiper-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.lv-ba-swiper-main {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    cursor: zoom-in;
}

.lv-ba-swiper-main .swiper-slide {
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lv-ba-swiper-main .lv-ba-slide__figure {
    margin: 0;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lv-ba-swiper-main img {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}

/* Nav arrows — match shortcode carousel arrow style */
.lv-ba-swiper-main .swiper-button-prev,
.lv-ba-swiper-main .swiper-button-next {
    width: 44px !important;
    height: 44px !important;
    margin-top: 0;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    background: #fff;
    border: 1px solid #d9e4e6;
    color: #3a3c41;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    transition: background .2s, border-color .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide Swiper's generated pseudo-element arrow — we're using inline SVG */
.lv-ba-swiper-main .swiper-button-prev::after,
.lv-ba-swiper-main .swiper-button-next::after {
    display: none !important;
}

.lv-ba-nav-icon {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    flex-shrink: 0;
    pointer-events: none;
    fill: #3a3c41;
    overflow: visible;
}

.lv-ba-nav-icon path {
    fill: #3a3c41;
}

.lv-ba-swiper-main .swiper-button-prev:hover,
.lv-ba-swiper-main .swiper-button-next:hover {
    background: #53c4ca;
    border-color: #53c4ca;
}

.lv-ba-swiper-main .swiper-button-prev:hover .lv-ba-nav-icon path,
.lv-ba-swiper-main .swiper-button-next:hover .lv-ba-nav-icon path {
    fill: #fff;
}

.lv-ba-swiper-main .swiper-button-prev.swiper-button-disabled,
.lv-ba-swiper-main .swiper-button-next.swiper-button-disabled {
    opacity: .3;
    pointer-events: none;
}

/* Figcaption inside slide */
.lv-ba-slide__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: .8rem;
    text-align: center;
}

/* ── Thumbnail strip ──────────────────────────────────────────────────────── */

.lv-ba-swiper-thumbs {
    margin-top: 10px;
}

.lv-ba-swiper-thumbs .swiper-slide {
    width: auto !important;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    opacity: .55;
    cursor: pointer;
    border: 2px solid transparent;
    transition: opacity .2s, border-color .2s;
    box-sizing: border-box;
}

.lv-ba-swiper-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border-color: #52C3C9;
}

.lv-ba-swiper-thumbs img {
    height: 100%;
    width: auto;
    display: block;
}

/* ── Lightbox ─────────────────────────────────────────────────────────────── */

#lv-ba-lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    background: rgba(0,0,0,.92);
    border: none;
    padding: 0;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#lv-ba-lightbox::backdrop {
    background: rgba(0,0,0,.92);
}

#lv-ba-lightbox[open] {
    display: flex;
}

.lv-ba-lightbox__img {
    max-width: 88vw;
    max-height: 92vh;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

.lv-ba-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    z-index: 1;
}

.lv-ba-lightbox__close:hover {
    background: rgba(255,255,255,.3);
}

.lv-ba-lightbox__prev,
.lv-ba-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    z-index: 1;
}

.lv-ba-lightbox__prev { left: 16px; }
.lv-ba-lightbox__next { right: 16px; }

.lv-ba-lightbox__prev:hover,
.lv-ba-lightbox__next:hover {
    background: rgba(255,255,255,.3);
}

.lv-ba-lightbox__prev:disabled,
.lv-ba-lightbox__next:disabled {
    opacity: .25;
    cursor: default;
}

/* ── Progression gallery ──────────────────────────────────────────────────── */

.lv-ba-progression {
    margin-top: 24px;
}

.lv-ba-progression__heading {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #888;
    margin: 0 0 8px;
}

.lv-ba-progression__strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.lv-ba-progression__thumb {
    flex: 0 0 auto;
    width: 80px;
    height: 60px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    padding: 0;
    cursor: zoom-in;
    background: none;
    transition: border-color .2s;
}

.lv-ba-progression__thumb:hover {
    border-color: #52C3C9;
}

.lv-ba-progression__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (prefers-color-scheme: dark) {
    .lv-ba-swiper-thumbs .swiper-slide-thumb-active {
        border-color: #7dd8dc;
    }
}
