/* =========================================================================
   Файл: /_assets/_css/modules/albums.css (Часть 1 из 3)
   Описание: Стили галереи, фотоальбомов, мультивыбора, загрузки и лайтбокса
   ========================================================================= */

.alb-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.alb-head-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.alb-head-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.alb-head-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.alb-head-titles {
    min-width: 0;
}

.alb-title {
    font-size: clamp(18px, 2.5vw, 22px);
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alb-subtitle {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.alb-subtitle strong {
    color: var(--text-primary);
    font-weight: 700;
}

.alb-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.alb-description {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-secondary);
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
}

/* Вкладки Альбомы / Все фото */
.alb-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 4px;
    border-radius: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
}

.alb-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-secondary);
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.alb-tab:hover {
    color: var(--text-primary);
}

.alb-tab.is-active {
    background: var(--accent-grad);
    color: #fff;
    box-shadow: var(--accent-glow);
}

.alb-tab-cnt {
    padding: 1px 7px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.14);
}

.alb-tab:not(.is-active) .alb-tab-cnt {
    background: var(--bg-surface);
    color: var(--text-muted);
}

/* Панель мультивыбора */
.alb-bulk-bar {
    border-color: var(--accent);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alb-bulk-bar[hidden] {
    display: none;
}

.alb-bulk-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.alb-bulk-title {
    font-size: 14px;
    font-weight: 700;
}

.alb-bulk-counter {
    font-size: 13px;
    color: var(--text-secondary);
}

.alb-bulk-counter strong {
    color: var(--accent);
}

.alb-bulk-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.alb-bulk-move-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 220px;
}

.alb-bulk-move-wrap[hidden],
.alb-bulk-del-confirm[hidden] {
    display: none;
}

/* Пустой экран */
.alb-empty-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    gap: 10px;
}

.alb-empty-box .ico {
    color: var(--text-muted);
    opacity: 0.7;
}

.alb-empty-title {
    font-size: 16px;
    font-weight: 700;
}

.alb-empty-text {
    font-size: 13.5px;
    color: var(--text-secondary);
    max-width: 340px;
}
/* Сетка альбомов */
.alb-albums-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 640px) {
    .alb-albums-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }
}

.alb-album-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-shadow);
    transition: transform 0.18s ease, border-color 0.2s ease;
}

.alb-album-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.alb-album-cover {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--bg-elevated);
    overflow: hidden;
}

.alb-album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.alb-album-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.alb-album-count,
.alb-album-lock {
    position: absolute;
    bottom: 8px;
    padding: 4px 8px;
    border-radius: 99px;
    background: rgba(11, 15, 25, 0.72);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.alb-album-count {
    left: 8px;
}

.alb-album-lock {
    right: 8px;
    padding: 5px 7px;
}

.alb-album-info {
    padding: 11px 13px;
}

.alb-album-name {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alb-album-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Сетка фотографий */
.alb-photos-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

@media (min-width: 640px) {
    .alb-photos-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
    }
}

.alb-photo-card {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
}

.alb-photo-trigger {
    width: 100%;
    height: 100%;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    display: block;
}

.alb-photo-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.alb-photo-card:hover .alb-photo-trigger img {
    transform: scale(1.03);
}

.alb-photo-card.is-blurred .alb-photo-trigger img {
    filter: blur(18px) brightness(0.65);
    transform: scale(1.08);
}

.alb-intimate-curtain {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(11, 15, 25, 0.35);
    padding: 8px;
}

.alb-intimate-badge {
    padding: 3px 9px;
    border-radius: 99px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

/* Чекбокс мультивыбора */
.alb-select-check {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
    cursor: pointer;
}

.alb-select-check[hidden] {
    display: none;
}

.alb-select-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.alb-select-box {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 2px solid #fff;
    background: rgba(11, 15, 25, 0.65);
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.alb-select-check input:checked + .alb-select-box {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Бейджи статусов на превью владельца */
.alb-status-badges {
    position: absolute;
    top: 7px;
    left: 7px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    pointer-events: none;
}

.alb-badge {
    padding: 2px 7px;
    border-radius: 7px;
    font-size: 10.5px;
    font-weight: 700;
    color: #fff;
    backdrop-filter: blur(6px);
}

.alb-badge.is-avatar   { background: var(--accent); }
.alb-badge.is-intimate { background: var(--danger); }
.alb-badge.is-pending  { background: rgba(245, 158, 11, 0.9); }
.alb-badge.is-rejected { background: rgba(239, 68, 68, 0.92); pointer-events: auto; }
.alb-badge.is-hidden   { background: rgba(71, 85, 105, 0.88); }

/* Счётчики на превью */
.alb-photo-stats {
    position: absolute;
    left: 7px;
    right: 7px;
    bottom: 7px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.alb-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border-radius: 8px;
    background: rgba(11, 15, 25, 0.68);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.alb-stat-pill.is-liked {
    color: var(--danger);
}
/* =========================================================================
   МОДАЛЬНАЯ ЗАГРУЗКА ФОТО И ПОЛНОЭКРАННЫЙ ЛАЙТБОКС
   ========================================================================= */
.alb-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 22px 16px;
    text-align: center;
    background: var(--bg-elevated);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: border-color 0.2s, background-color 0.2s;
}

.alb-dropzone:hover,
.alb-dropzone.is-dragover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.alb-upload-queue {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
}

.alb-q-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
}

.alb-q-thumb {
    width: 48px;
    height: 48px;
    border-radius: 9px;
    object-fit: cover;
    flex-shrink: 0;
}

.alb-q-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.alb-q-name {
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alb-q-intimate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
}

.alb-upload-progress {
    height: 6px;
    border-radius: 99px;
    background: var(--bg-elevated);
    overflow: hidden;
}

.alb-upload-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-grad);
    transition: width 0.2s ease;
}

/* Полноэкранный лайтбокс */
.alb-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1650;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alb-lightbox[hidden] {
    display: none;
}

.alb-lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 7, 14, 0.92);
    backdrop-filter: blur(8px);
}

.alb-lb-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100dvh;
    max-width: 1180px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    background: var(--bg-main);
}

@media (min-width: 900px) {
    .alb-lb-shell {
        height: min(88dvh, 780px);
        border-radius: 22px;
        overflow: hidden;
        border: 1px solid var(--border-color);
        grid-template-columns: minmax(0, 1fr) 360px;
        grid-template-rows: minmax(0, 1fr);
    }
}

.alb-lb-stage {
    position: relative;
    background: #05070e;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46dvh;
    overflow: hidden;
}

.alb-lb-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 4;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: linear-gradient(to bottom, rgba(5, 7, 14, 0.78), transparent);
}

.alb-lb-counter {
    padding: 5px 10px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.alb-lb-top-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.alb-lb-pill-btn,
.alb-lb-close {
    height: 34px;
    padding: 0 11px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 20, 34, 0.78);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.alb-lb-pill-btn.is-active {
    background: var(--accent);
    border-color: var(--accent);
}

.alb-lb-pill-btn.is-danger {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.45);
}

.alb-lb-close {
    width: 34px;
    padding: 0;
    justify-content: center;
}

.alb-lb-img-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alb-lb-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.alb-lb-loader {
    position: absolute;
    color: #fff;
}

.alb-lb-loader[hidden] {
    display: none;
}

.alb-lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 20, 34, 0.72);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.alb-lb-nav.is-prev { left: 10px; }
.alb-lb-nav.is-next { right: 10px; }
.alb-lb-nav[hidden] { display: none; }

/* Боковая/нижняя колонка комментариев */
.alb-lb-sidebar {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    max-height: 46dvh;
}

@media (min-width: 900px) {
    .alb-lb-sidebar {
        border-top: none;
        border-left: 1px solid var(--border-color);
        max-height: none;
    }
}

.alb-lb-author {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.alb-lb-author-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.alb-lb-author-name {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alb-lb-photo-date {
    font-size: 11.5px;
    color: var(--text-muted);
}

.alb-lb-like-box {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 3px 6px;
}

.alb-lb-like-btn,
.alb-lb-likes-cnt {
    border: none;
    background: transparent;
    height: 30px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.alb-lb-like-btn.is-liked {
    color: var(--danger);
}

.alb-lb-status-notice {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(245, 158, 11, 0.14);
    color: var(--warning);
    border-bottom: 1px solid var(--border-color);
}

.alb-lb-status-notice[hidden] {
    display: none;
}

.alb-lb-comments {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alb-lb-comments-empty {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    padding: 18px 0;
}

.alb-comm-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.alb-comm-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.alb-comm-body {
    flex: 1;
    min-width: 0;
    background: var(--bg-elevated);
    border-radius: 12px;
    padding: 7px 10px;
}

.alb-comm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 2px;
}

.alb-comm-author {
    font-size: 12.5px;
    font-weight: 700;
}

.alb-comm-time {
    font-size: 11px;
    color: var(--text-muted);
}

.alb-comm-text {
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

.alb-comm-del {
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 11.5px;
}

.alb-comm-del:hover {
    color: var(--danger);
}

.alb-lb-comment-form {
    padding: 10px 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.alb-lb-comment-input {
    min-height: 38px;
    font-size: 13.5px;
}

.alb-lb-send-btn {
    min-height: 38px;
    padding: 0 12px;
}

.alb-lb-guest-note {
    padding: 10px 12px;
    border-top: 1px solid var(--border-color);
}

.alb-likes-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
}

/* Визуальное выделение всей карточки фото в режиме мультивыбора */
.alb-photo-card {
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.alb-photo-card.is-selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
}

.alb-photo-card.is-selected .alb-photo-trigger img {
    transform: scale(0.92);
    border-radius: 10px;
}

.alb-status-badges {
    z-index: 3;
}
