/**
 * Стили лайтбокса ButGallery
 */

.butgallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(10, 10, 10, 0.94);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    user-select: none;
    backdrop-filter: blur(8px);
}

.butgallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

/* Верхняя панель */
.bgl-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 24px;
    z-index: 10;
}

.bgl-counter {
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
}

.bgl-actions {
    display: flex;
    gap: 12px;
}

.bgl-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    text-decoration: none;
}

.bgl-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
    color: #fff;
}

/* Центральная часть: Картинка и стрелки */
.bgl-stage {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
}

.bgl-image-container {
    max-width: 90vw;
    max-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
}

.bgl-image {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    animation: bglFadeIn 0.25s ease;
}

@keyframes bglFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* Навигационные стрелки */
.bgl-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 5;
}

.bgl-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.bgl-prev { left: 20px; }
.bgl-next { right: 20px; }

/* Нижняя информационная панель */
.bgl-caption-bar {
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    padding: 20px 30px;
    color: #ffffff;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.bgl-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #f9fafb;
}

.bgl-desc {
    font-size: 0.95rem;
    color: #d1d5db;
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.bgl-meta-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
}

.bgl-meta-pill {
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #e5e7eb;
}

.bgl-meta-pill a {
    color: #60a5fa;
    text-decoration: none;
}

.bgl-meta-pill a:hover {
    text-decoration: underline;
}

/* Мобильная адаптация */
@media screen and (max-width: 768px) {
    .bgl-nav {
        width: 40px;
        height: 40px;
    }
    .bgl-prev { left: 8px; }
    .bgl-next { right: 8px; }
    .bgl-caption-bar {
        padding: 12px 16px;
    }
    .bgl-title {
        font-size: 1.05rem;
    }
    .bgl-desc {
        font-size: 0.85rem;
    }
}
