/* =========================================================================
 * sdamp.synlink:album.embedded — default template styles.
 *
 * ВНИМАНИЕ: site-template sdamp.ru агрессивно стилизует <button>, <svg>, <ul>
 * и т.п. (см. errors-log 2026-05-13 «sdamp.ru site-template агрессивно
 * стилизует form-controls»). Нужен nuclear CSS reset с !important для всех
 * наших элементов, иначе:
 *   - <button> получает pill-фон с gradient'ом, padding 6px 22px, text-shadow;
 *   - <svg> получает fill:#000 → все иконки превращаются в чёрные пятна;
 *   - <ul>/<li> получают list-style + ::before маркеры;
 *   - hover-transition меняет размер кнопок → SVG смещается из центра.
 *
 * Решение: явный сброс через !important. Также защита для лайтбокс-элементов
 * (.lb-controls, .lb-card), которые добавляются в <body> shared sdamp-lightbox.js
 * после открытия (вне нашего section, но связаны с embedded use-case).
 * ========================================================================= */

/* ===== Section root ==================================================== */
.sdamp-album-embedded {
    display: block;
    margin: 2em 0;
    color: inherit;
    max-width: 100%;
    position: relative;
}

/* ===== Preview block (16:10 cover) ===================================== */
.sdamp-album-embedded__preview {
    position: relative;
    width: 100%;
    /* 4:3 даёт более «портретное» соотношение чем 16:10 (8:5) — общая высота
     * блока больше, как просил priangle. Filmstrip-overlay занимает нижнюю
     * часть, оставляя cover image видимым во верхней ~75%. */
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #1a1a1a;
    border-radius: 8px;
    color: #fff;
    contain: layout style;
}

.sdamp-album-embedded__preview-img {
    position: absolute !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    transition: opacity 0.15s ease;
}

/* ===== SVG nuclear reset для ВСЕХ icon'ов embedded + lightbox =========== */
/* Site-template ставит `svg { fill: ...black... }` где-то в правилах для
 * `.icon` / generic SVG → наши stroke-icons превращаются в solid black.
 * Force explicit fill: none + stroke: currentColor. Для <text> внутри
 * (ISO label) inverse — fill: currentColor, stroke: none. */
.sdamp-album-embedded svg,
.sdamp-album-embedded__exif-icon svg,
.lb-controls__btn svg,
.lb-card svg {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block !important;
}
.sdamp-album-embedded svg circle,
.sdamp-album-embedded svg rect,
.sdamp-album-embedded svg path,
.sdamp-album-embedded svg polyline,
.sdamp-album-embedded svg line,
.sdamp-album-embedded__exif-icon svg circle,
.sdamp-album-embedded__exif-icon svg rect,
.sdamp-album-embedded__exif-icon svg path,
.sdamp-album-embedded__exif-icon svg polyline,
.sdamp-album-embedded__exif-icon svg line,
.lb-controls__btn svg circle,
.lb-controls__btn svg rect,
.lb-controls__btn svg path,
.lb-controls__btn svg polyline,
.lb-controls__btn svg line,
.lb-card svg circle,
.lb-card svg rect,
.lb-card svg path,
.lb-card svg polyline,
.lb-card svg line {
    fill: none !important;
    stroke: currentColor !important;
}
/* <text>, <circle fill="currentColor"> с explicit fill в inline svg attrs
   (info dot, ISO label background filled rect, cover icon sun-dot) — respect
   inline fill. SVG inline has these set explicitly — но наш CSS перебивает.
   Allow SVG inline `fill="currentColor"` через :where() lower-specificity? Просто
   white-list specific shapes по attr. */
.sdamp-album-embedded svg [fill="currentColor"],
.sdamp-album-embedded__exif-icon svg [fill="currentColor"],
.lb-controls__btn svg [fill="currentColor"],
.lb-card svg [fill="currentColor"] {
    fill: currentColor !important;
    stroke: none !important;
}
.sdamp-album-embedded svg text,
.sdamp-album-embedded__exif-icon svg text,
.lb-controls__btn svg text,
.lb-card svg text {
    fill: currentColor !important;
    stroke: none !important;
}

/* ===== Button nuclear reset (для всех buttons в embedded + lightbox) ==== */
/* НЕ сбрасываем `background` и `transform` здесь — specific rules
 * (`.sdamp-album-embedded__nav--prev { transform: translateY(-50%) }`) имеют
 * меньшую specificity чем `.sdamp-album-embedded button` (1 class + 1 element),
 * и `!important` reset перебивает их. Background+transform устанавливаются
 * per-button-class с явным значением. */
.sdamp-album-embedded button,
.sdamp-album-embedded button:hover,
.sdamp-album-embedded button:focus,
.sdamp-album-embedded button:active,
.sdamp-album-embedded button:disabled,
.sdamp-album-embedded button[disabled] {
    border: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    line-height: 1 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-style: normal !important;
    font-family: inherit !important;
    animation: none !important;
    filter: none !important;
    transition: background-color 0.15s ease, transform 0.1s ease !important;
    color: inherit !important;
    cursor: pointer !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.sdamp-album-embedded button::before,
.sdamp-album-embedded button::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

/* ===== List reset (filmstrip <ul>) ===================================== */
.sdamp-album-embedded__filmstrip,
.sdamp-album-embedded__lb-anchors {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.sdamp-album-embedded__filmstrip-item,
.sdamp-album-embedded__lb-anchors li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.sdamp-album-embedded__filmstrip-item::before,
.sdamp-album-embedded__filmstrip-item::after,
.sdamp-album-embedded__lb-anchors li::before,
.sdamp-album-embedded__lb-anchors li::after {
    content: none !important;
    display: none !important;
}

/* ===== Overlay text (BL, только заголовок альбома, flush с filmstrip top) ===
 * Filmstrip 16:9 thumbnails × 3 columns на full-width preview:
 *   thumb_height = block_width / 3 / (16/9) = block_width * 0.1875
 * Preview aspect 4:3 → block_height = block_width * 0.75
 * filmstrip_height_pct = 0.1875 / 0.75 = 0.25 = 25% от block.
 * Overlay `bottom: 25%` — нижний край overlay касается верхнего края filmstrip,
 * без зазора. Если изменится preview aspect-ratio или filmstrip aspect — нужно
 * пересчитать это значение. */
.sdamp-album-embedded__overlay {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 25% !important;
    padding: 4rem 1.75rem 1rem 1.75rem !important;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.55) 50%, rgba(0, 0, 0, 0) 100%) !important;
    color: #fff !important;
    pointer-events: auto;
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.sdamp-album-embedded__title {
    margin: 0 0 0.35rem 0 !important;
    padding: 0 !important;
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
    border: 0 !important;
    background: none !important;
}
.sdamp-album-embedded__title a {
    color: #fff !important;
    text-decoration: none !important;
}
.sdamp-album-embedded__title a:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

.sdamp-album-embedded__meta {
    margin: 0 0 0.2rem 0 !important;
    padding: 0 !important;
    font-size: 0.85rem !important;
    color: rgba(255, 255, 255, 0.92) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
    line-height: 1.4 !important;
    background: none !important;
    border: 0 !important;
}
.sdamp-album-embedded__meta > span {
    display: inline-block;
    vertical-align: baseline;
}
.sdamp-album-embedded__meta > span + span {
    margin-left: 1.5rem;
}

.sdamp-album-embedded__photo {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.82rem !important;
    color: rgba(255, 255, 255, 0.85) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
    line-height: 1.4 !important;
    background: none !important;
    border: 0 !important;
}
.sdamp-album-embedded__photo em {
    font-style: italic !important;
}

/* ===== Filmstrip — absolute flush с нижним и боковыми краями preview.
 * Aspect 16:9 (cinematic landscape, более кропнутые по высоте чем 3:2).
 * Gap 0 — thumbs впритык друг к другу и к нижнему краю preview. ===== */
.sdamp-album-embedded__filmstrip {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0 !important;
    /* Sliding animation: filmstrip уезжает вниз out of preview block при ACTIVE,
     * appears обратно при IDLE. translate3d для GPU acceleration. */
    transform: translate3d(0, 0, 0);
    transition: transform 0.3s ease;
    will-change: transform;
    z-index: 2;
}
.sdamp-album-embedded__filmstrip-item {
    aspect-ratio: 16 / 9 !important;
    overflow: hidden !important;
    background: #2a2a2a !important;
    border-radius: 0 !important;
}
.sdamp-album-embedded__filmstrip-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* ===== Nav arrows ‹ › (vertically centered, circle background) ========= */
.sdamp-album-embedded__nav {
    position: absolute !important;
    top: 50% !important;
    width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.35) !important;
    color: #fff !important;
    border-radius: 50% !important;
    z-index: 3;  /* выше filmstrip */
}
.sdamp-album-embedded__nav:hover,
.sdamp-album-embedded__nav:focus {
    background: rgba(0, 0, 0, 0.55) !important;
    color: #fff !important;
}
.sdamp-album-embedded__nav:focus-visible {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85) !important;
}
.sdamp-album-embedded__nav svg {
    width: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6)) !important;
}
.sdamp-album-embedded__nav--prev {
    left: 0.5rem !important;
    transform: translateY(-50%) !important;
}
.sdamp-album-embedded__nav--next {
    right: 0.5rem !important;
    transform: translateY(-50%) !important;
}
.sdamp-album-embedded__nav--prev:active,
.sdamp-album-embedded__nav--next:active {
    transform: translateY(-50%) scale(0.92) !important;
}

/* ===== Fullscreen btn (TR) ============================================= */
.sdamp-album-embedded__fullscreen-btn {
    position: absolute !important;
    top: 0.75rem !important;
    right: 0.75rem !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.35) !important;
    color: #fff !important;
    border-radius: 6px !important;
    z-index: 3;
}
.sdamp-album-embedded__fullscreen-btn:hover,
.sdamp-album-embedded__fullscreen-btn:focus {
    background: rgba(0, 0, 0, 0.55) !important;
    color: #fff !important;
}
.sdamp-album-embedded__fullscreen-btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85) !important;
}
.sdamp-album-embedded__fullscreen-btn svg {
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6)) !important;
}
.sdamp-album-embedded__fullscreen-btn:active {
    transform: scale(0.92) !important;
}

/* ===== State: ACTIVE (nav click) — sliding animation ====================
 * Overlay text: opacity fade (стандартно).
 * Filmstrip: sliding ВНИЗ за пределы preview block (translateY 100%).
 * После 5s idle — return to translateY(0). */
.sdamp-album-embedded.is-active .sdamp-album-embedded__overlay {
    opacity: 0;
    pointer-events: none;
}
.sdamp-album-embedded.is-active .sdamp-album-embedded__filmstrip {
    transform: translate3d(0, 100%, 0) !important;
    pointer-events: none;
}

/* ===== Mobile/tablet (≤768px) — filmstrip скрыт ============================
 * task 17 A2: было ≤480px, но на iPhone Pro Max (430px) — работало, а на любом
 * 481-768 viewport (iPad portrait, iPhone landscape, узкое окно desktop) filmstrip
 * висел внизу под cover. Поднимаем до 768 — соответствует общему mobile/tablet edge.
 * Без filmstrip overlay прижимается к bottom: 0 (без 25% offset). */
@media (max-width: 768px) {
    .sdamp-album-embedded__filmstrip {
        display: none !important;
    }
    .sdamp-album-embedded__overlay {
        bottom: 0 !important;
        padding: 3rem 1rem 0.9rem 1rem !important;
    }
}
@media (max-width: 480px) {
    .sdamp-album-embedded__overlay {
        padding: 2.5rem 1rem 0.8rem 1rem !important;
    }
    .sdamp-album-embedded__title {
        font-size: 1rem !important;
    }
    .sdamp-album-embedded__meta,
    .sdamp-album-embedded__photo {
        font-size: 0.78rem !important;
    }
    .sdamp-album-embedded__nav {
        width: 40px !important;
        height: 40px !important;
    }
    .sdamp-album-embedded__nav svg {
        width: 24px !important;
        height: 24px !important;
    }
    .sdamp-album-embedded__fullscreen-btn {
        width: 36px !important;
        height: 36px !important;
        top: 0.5rem !important;
        right: 0.5rem !important;
    }
}

/* ===== Hidden anchors + captions for GLightbox ========================= */
.sdamp-album-embedded__lb-anchors {
    display: none !important;
}
.sdamp-album-embedded__captions {
    display: none !important;
}

/* ===== Error state ===================================================== */
.sdamp-album-embedded--error {
    padding: 1rem;
    background: #fdf2e9;
    border: 1px solid #e6a86b;
    border-radius: 4px;
    color: #7a4a1f;
    margin: 1em 0;
    font-size: 0.9rem;
}

/* =========================================================================
 * Lightbox CSS companions — нужны на embedded page т.к. album.detail style.css
 * не загружен. Минимальный набор для card / controls / blur-bg styling.
 *
 * НЕ дублируем album.detail полностью — только critical SVG + button rules.
 * Position/layout логика — уже в shared sdamp-lightbox.js DOM injection.
 * ========================================================================= */

/* lb-controls — wrap всех контрол-кнопок lightbox (наша обертка в body) */
.lb-controls {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000001;
    transition: opacity 0.3s ease;
}
.lb-controls.is-idle {
    opacity: 0.15;
}

.lb-controls__btn {
    position: absolute;
    pointer-events: auto;
    width: 44px !important;
    height: 44px !important;
    padding: 10px !important;
    margin: 0 !important;
    background: rgba(0, 0, 0, 0.2) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    text-shadow: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    line-height: 1 !important;
    font-family: inherit !important;
    /* НЕ задаём transform: none — иначе ломаются prev/next translateY(-50%)
     * центрирование (см. embedded button reset). Site-template's button transforms
     * не страшны, потому что мы явно перезадаём translateY(-50%) на prev/next. */
    transition: background-color 0.15s ease !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}
.lb-controls__btn:hover {
    background: rgba(0, 0, 0, 0.35) !important;
    color: #fff !important;
}
.lb-controls__btn:focus {
    outline: none !important;
}
.lb-controls__btn:focus-visible {
    background: rgba(0, 0, 0, 0.35) !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85) !important;
}
.lb-controls__btn:active {
    background: rgba(0, 0, 0, 0.45) !important;
    transform: scale(0.92) !important;
}
.lb-controls__btn::before,
.lb-controls__btn::after {
    content: none !important;
    display: none !important;
    background: none !important;
}
.lb-controls__btn svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.75)) !important;
}

/* Position each control. Layout идентичен album.detail. */
.lb-controls__info     { top: 1rem;  left: 1rem; }
.lb-controls__close-lb { top: 1rem;  right: 1rem; }
.lb-controls__set-cover      { top: 1rem; right: calc(1rem + 56px); }
.lb-controls__copy-shortcode { top: 1rem; right: calc(1rem + 112px); }
.lb-controls__download       { top: 1rem; right: calc(1rem + 168px); }
.lb-controls__share          { top: 1rem; right: calc(1rem + 224px); }
.lb-controls--no-shortcode .lb-controls__download { right: calc(1rem + 112px); }
.lb-controls--no-shortcode .lb-controls__share    { right: calc(1rem + 168px); }
.lb-controls--no-admin .lb-controls__copy-shortcode { right: calc(1rem + 56px); }
.lb-controls--no-admin .lb-controls__download       { right: calc(1rem + 112px); }
.lb-controls--no-admin .lb-controls__share          { right: calc(1rem + 168px); }
.lb-controls--no-admin.lb-controls--no-shortcode .lb-controls__download { right: calc(1rem + 56px); }
.lb-controls--no-admin.lb-controls--no-shortcode .lb-controls__share    { right: calc(1rem + 112px); }
.lb-controls__prev     { top: 50%; left: 0.5rem;  transform: translateY(-50%); }
.lb-controls__next     { top: 50%; right: 0.5rem; transform: translateY(-50%); }
.lb-controls__prev:active,
.lb-controls__next:active { transform: translateY(-50%) scale(0.92) !important; }
.lb-controls__prev,
.lb-controls__next {
    width: 56px !important;
    height: 56px !important;
    padding: 12px !important;
}
.lb-controls__prev svg,
.lb-controls__next svg {
    width: 32px !important;
    height: 32px !important;
}

/* lb-card — info card overlay (TL, slide in/out) */
.lb-card {
    position: fixed;
    top: 4.5rem;
    left: 1rem;
    width: 320px;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    background: rgba(20, 20, 20, 0.92);
    color: #fff;
    border-radius: 8px;
    padding: 1rem 1.2rem 1.2rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    z-index: 1000000;
    transform: translateX(calc(-100% - 2rem));
    transition: transform 0.25s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.lb-card.is-open {
    transform: translateX(0);
}
.lb-card__close {
    position: absolute !important;
    top: 0.4rem !important;
    right: 0.4rem !important;
    width: 32px !important;
    height: 32px !important;
    padding: 6px !important;
    background: transparent !important;
    color: rgba(255, 255, 255, 0.7) !important;
    border: 0 !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    text-shadow: none !important;
    margin: 0 !important;
    min-width: 0 !important;
    line-height: 1 !important;
}
.lb-card__close svg {
    width: 18px !important;
    height: 18px !important;
}
.lb-card__close:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
}
.lb-card__time {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 0.6rem 0;
}
.lb-card__body {
    font-size: 0.9rem;
    line-height: 1.5;
}
.lb-card__body p {
    margin: 0.3rem 0 !important;
}
.lb-card__body a {
    color: #98c4ff !important;
}

/* EXIF rows in card (cloned from embedded captions) */
.lb-card .sdamp-album-embedded__exif {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 0.5rem 0.8rem;
    margin-bottom: 0.8rem;
}
.lb-card .sdamp-album-embedded__exif-row {
    display: contents;
}
.lb-card .sdamp-album-embedded__exif-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.lb-card .sdamp-album-embedded__exif-icon svg {
    width: 22px !important;
    height: 22px !important;
}
.lb-card .sdamp-album-embedded__exif-value {
    color: #fff;
    font-size: 0.88rem;
    line-height: 1.3;
    align-self: center;
}
.lb-card .sdamp-album-embedded__caption-credit {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0.6rem 0 0.4rem 0 !important;
}
.lb-card .sdamp-album-embedded__caption-download a {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
}
.lb-card .sdamp-album-embedded__caption-download a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* lb-blur-bg — blurred backdrop layer (2 image layers crossfade) */
.lb-blur-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 99999;
    pointer-events: none;
    background: #000;
}
.lb-blur-bg__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(3px) brightness(0.4);
    will-change: transform;
    transform: scale(6) translateZ(0);
}
.lb-blur-bg__img.is-active {
    opacity: 1;
}

/* lb-toast — transient notification (bottom-center) */
.lb-toast {
    position: fixed;
    left: 50%;
    bottom: 2.5rem;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 0.7rem 1.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    z-index: 1000002;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}
.lb-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* lb-fit-h / lb-fit-w — image fit classes added by shared lightbox JS */
.glightbox-container .gslide img.lb-fit-w {
    width: 100vw !important;
    height: auto !important;
    max-width: 100vw !important;
    max-height: none !important;
}
.glightbox-container .gslide img.lb-fit-h {
    width: auto !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: 100vh !important;
}

/* Hide vendor default GLightbox arrows + close (наши custom controls лучше) */
.glightbox-container .gnext,
.glightbox-container .gprev,
.glightbox-container .gclose {
    display: none !important;
}

/* Hide vendor default description — мы используем custom info card (.lb-card)
 * через info-button в shared sdamp-lightbox.js. Default description rendering
 * problematic: SVG icons в EXIF rows stretch до полной ширины (viewBox без
 * explicit size constraint), description достигает ~1200px высоты, и GLightbox
 * vendor выставляет `style="max-height: calc(100vh - <descHeight>)"` на slide
 * image → image collapse в нулевую высоту. Скрытие description fixes. */
.glightbox-container .gslide-description,
.glightbox-container .gdesc-inner,
.glightbox-container .description-bottom,
.glightbox-container .gslide-title,
.glightbox-container .gslide-desc {
    display: none !important;
}

/* Force image max-height vendor inline `style` override. GLightbox set
 * `max-height: calc(100vh - descHeight)` если description visible; даже после
 * скрытия description vendor inline style остаётся в DOM. */
.glightbox-container .gslide-media img {
    max-height: 100vh !important;
}

/* GLightbox container baseline — все vendor backgrounds transparent, чтобы
 * blur-bg layer (под container, z-index 99999) был виден сквозь lightbox. */
.glightbox-container {
    background: transparent !important;
}
.glightbox-container .gslide {
    background: transparent !important;
}
.glightbox-container .gslide-image,
.glightbox-container .gslide-media {
    background: transparent !important;
}
/* `.goverlay` — vendor backdrop. Default `rgba(0,0,0,0.92)` блокирует blur layer
 * за lightbox-ом. Делаем transparent — blur с brightness(0.4) играет роль backdrop. */
.glightbox-container .goverlay,
.goverlay {
    background: transparent !important;
}

/* Lightbox image error placeholder */
.sdamp-album__lightbox-error,
.sdamp-album-embedded__lightbox-error {
    color: #fff;
    text-align: center;
    padding: 2rem;
}

/* Tooltip for lb-controls__btn (hover/focus, dark pill below button) */
@media (hover: hover) {
    .lb-controls__btn[data-tooltip]:hover::after,
    .lb-controls__btn[data-tooltip]:focus-visible::after {
        content: attr(data-tooltip);
        position: absolute;
        top: calc(100% + 4px);
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.85);
        color: #fff;
        padding: 0.35rem 0.65rem;
        border-radius: 4px;
        font-size: 0.8rem;
        line-height: 1.3;
        white-space: nowrap;
        pointer-events: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
        z-index: 1000003;
    }
    .lb-controls__info[data-tooltip]:hover::after,
    .lb-controls__info[data-tooltip]:focus-visible::after {
        left: 0;
        right: auto;
        transform: none;
    }
    .lb-controls__close-lb[data-tooltip]:hover::after,
    .lb-controls__close-lb[data-tooltip]:focus-visible::after,
    .lb-controls__set-cover[data-tooltip]:hover::after,
    .lb-controls__set-cover[data-tooltip]:focus-visible::after,
    .lb-controls__copy-shortcode[data-tooltip]:hover::after,
    .lb-controls__copy-shortcode[data-tooltip]:focus-visible::after,
    .lb-controls__download[data-tooltip]:hover::after,
    .lb-controls__download[data-tooltip]:focus-visible::after,
    .lb-controls__share[data-tooltip]:hover::after,
    .lb-controls__share[data-tooltip]:focus-visible::after {
        left: auto;
        right: 0;
        transform: none;
    }
}
