/* Unified Photo Gallery — Phase 48E */

.unified-photo-gallery {
    width: 100%;
}

.unified-photo-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.unified-photo-filters .form-select,
.unified-photo-filters .form-control {
    min-width: 140px;
    flex: 1 1 auto;
    max-width: 220px;
}

.unified-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.65rem;
}

.unified-photo-gallery--compact .unified-photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 0.4rem;
}

.unified-photo-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    text-align: left;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.unified-photo-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.unified-photo-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.unified-photo-gallery--compact .unified-photo-card img {
    height: 88px;
}

.unified-photo-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.4rem 0.5rem;
}

.unified-photo-card-meta small {
    color: var(--bs-secondary-color, #94a3b8);
    font-size: 0.7rem;
}

.unified-photo-wo {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unified-photo-empty {
    text-align: center;
    padding: 1.5rem;
    color: var(--bs-secondary-color, #94a3b8);
}

.unified-photo-empty i {
    font-size: 2rem;
    opacity: 0.4;
    display: block;
    margin-bottom: 0.5rem;
}

.unified-photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.unified-photo-lightbox-inner {
    position: relative;
    max-width: min(960px, 100%);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.unified-photo-lightbox-inner img {
    max-width: 100%;
    max-height: calc(90vh - 80px);
    object-fit: contain;
    border-radius: 8px;
}

.unified-photo-lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    padding: 0.5rem;
}

.unified-photo-lightbox-caption {
    color: #fff;
    text-align: center;
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
}

@media (min-width: 768px) {
    .unified-photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}
