﻿/* Shandiz R57: scoped gallery behavior retained from the accepted R55 layout. */
.hypermedia-gallery .lg-thumb-outer {
    direction: ltr;
}
/* Center short rails in all detail galleries. An overflowing rail keeps its LTR origin, so
   lightGallery can scroll it to every thumbnail on narrow screens. */
.hypermedia-gallery .lg-thumb {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.hypermedia-gallery--audio {
    --hypermedia-audio-player-height: 54px;
}
/* R60: use the original audio/video artwork without stretching or upscaling it.
   Keep the native gallery frame so playback and navigation stay centred. */
.hypermedia-gallery .lg-video-poster {
    object-fit: scale-down;
    object-position: center;
}
.hypermedia-gallery--audio .hypermedia-audio-player {
    position: absolute;
    top: 50%;
    left: 16px;
    display: block;
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: calc(100% - 32px);
    min-width: 0;
    height: var(--hypermedia-audio-player-height);
    transform: translateY(-50%);
    z-index: 4;
}
.hypermedia-gallery--audio .hypermedia-audio-playing .lg-video-poster,
.hypermedia-gallery--audio .hypermedia-audio-playing .lg-video-play-button {
    display: none;
}
.hypermedia-gallery--audio .lg-video-play-button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 5px;
}
/* Retained R55 behavior: The player and navigation share the media area's vertical centre.
   On mobile, anchor the buttons' lower edge above the audio control band.
   Using bottom avoids overriding lightGallery's button hide transforms. */
@media (max-width: 768px) {
    .hypermedia-gallery--audio .lg-prev,
    .hypermedia-gallery--audio .lg-next {
        top: auto;
        bottom: calc(50% + var(--hypermedia-audio-player-height) / 2 + 16px);
        margin-top: 0;
    }
}

/* The server supplies the edit anchor only when its EditLink value is present. */
.article__container .article__edit .edit-link {
    display: inline-block;
    color: #b0081f;
    vertical-align: middle;
    text-decoration: none;
}
.article__container .article__edit .edit-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}
