/* All Albums page */
.all-albums-page {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    background: var(--light-mode-bg, #f5f5f5);
}

.all-albums-filters {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: rgba(60, 60, 60, 0.98);
    border-radius: 6px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.all-albums-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.all-albums-filter-group label {
    font-size: 14px;
    white-space: nowrap;
}

.all-albums-filter-group select {
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    min-width: 160px;
}

.all-albums-filter-group select option {
    background: #3c3c3c;
    color: #fff;
}

/* On desktop, panel is always visible and inline with filters */
.all-albums-filters-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

/* Toggle button: hidden on desktop, shown on mobile for collapse */
.all-albums-filters-toggle {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.all-albums-filters-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.all-albums-filters-toggle-icon {
    transition: transform 0.2s ease;
}

.all-albums-filters.is-open .all-albums-filters-toggle-icon {
    transform: rotate(180deg);
}

.all-albums-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    min-height: 200px;
}

.all-albums-photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #e0e0e0;
}

.all-albums-photo-thumb-wrap {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    overflow: hidden;
}

.all-albums-photo-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.all-albums-photo-thumb-wrap:hover .all-albums-photo-thumb {
    transform: scale(1.03);
}

/* Info icon: show on image hover */
.all-albums-photo-info-icon {
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #2196F3;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.all-albums-photo-thumb-wrap:hover .all-albums-photo-info-icon {
    opacity: 1;
}

.all-albums-photo-info-icon:hover {
    background: #1976D2;
}

.all-albums-photo-info-icon i {
    font-size: 14px;
}

.all-albums-photo-caption {
    padding: 6px 8px;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.all-albums-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
}

.all-albums-loader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #2196F3;
    border-radius: 50%;
    animation: all-albums-spin 0.8s linear infinite;
}

@keyframes all-albums-spin {
    to { transform: rotate(360deg); }
}

.all-albums-loader-text {
    font-size: 14px;
    color: #666;
}

.all-albums-empty,
.all-albums-error {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 15px;
}

/* Empty state shown inside the gallery so it's always visible in the content area */
.all-albums-empty-inline {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    color: #666;
    font-size: 16px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Photo info card – floating next to icon (no full overlay to avoid cursor flicker and blocking the photo) */
.all-albums-photo-info-wrapper {
    position: fixed;
    z-index: 10001;
    width: 600px;
    max-width: calc(100vw - 24px);
    pointer-events: none;
}

.all-albums-photo-info-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 600px;
    max-height: min(400px, 85vh);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(40, 44, 52, 0.97) 0%, rgba(30, 33, 39, 0.97) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #e6e6e6;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
}

.all-albums-photo-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 700;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.98);
    flex-shrink: 0;
}

.all-albums-photo-info-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 4px;
}

.all-albums-photo-info-close:hover {
    color: #fff;
}

.all-albums-photo-info-body {
    padding: 16px 20px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.all-albums-photo-info-body::-webkit-scrollbar {
    width: 6px;
}

.all-albums-photo-info-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.all-albums-photo-info-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
}

.all-albums-photo-info-title {
    padding: 8px 0;
    padding-top: 0;
    font-weight: 700;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.98);
    word-break: break-word;
}

.all-albums-photo-info-description {
    padding: 8px 0;
    color: #dadadae6;
    white-space: pre-wrap;
    word-break: break-word;
}

.all-albums-photo-info-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 0;
    color: #dadadae6;
}

.all-albums-photo-info-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #576276;
    border-radius: 6px;
    font-size: 13px;
}

.all-albums-photo-info-meta-item i {
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

.all-albums-photo-info-uploaded {
    display: inline-block;
    padding: 6px 12px;
    background: #576276;
    border-radius: 8px;
    font-size: 13px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Mobile: collapsible filters + aligned panel + two photos per row */
@media (max-width: 768px) {
    .all-albums-page {
        padding: 12px;
    }

    .all-albums-filters-toggle {
        display: flex;
    }

    .all-albums-filters-panel {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.25s ease, opacity 0.2s ease;
    }

    .all-albums-filters.is-open .all-albums-filters-panel {
        max-height: 400px;
        opacity: 1;
    }

    .all-albums-filters {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 0;
    }

    .all-albums-filters-panel {
        padding: 12px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        text-align: left;
    }

    .all-albums-filter-group {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        width: 100%;
    }

    .all-albums-filter-group label {
        display: block;
        font-size: 13px;
        font-weight: 500;
        text-align: left;
    }

    .all-albums-filter-group select {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        padding: 8px 10px;
        box-sizing: border-box;
    }

    .all-albums-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}
