/* =============================================================
   file-placeholder — заглушка для файлов без простого превью.
   Крупная иконка типа документа + расширение [+ имя].
   Используется в ImageViewer, карточках files-режима и панели рефов.
   ============================================================= */

.file-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    color: var(--text-muted, #9ca3af);
    text-align: center;
    user-select: none;
}

.file-placeholder__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--banana, #f5c518);
}

.file-placeholder__ext {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--text-muted, #9ca3af);
}

.file-placeholder__name {
    max-width: 90%;
    font-size: 12px;
    line-height: 1.3;
    color: var(--text, #e5e7eb);
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Вариант в карточке грида: заполняет область превью. */
.file-placeholder--card {
    gap: 10px;
    background: var(--panel-bg, #0d0d0f);
}

/* Мелкий вариант для боковой панели рефов. */
.file-placeholder--thumb {
    gap: 4px;
}

.file-placeholder--thumb .file-placeholder__ext {
    font-size: 9px;
}

/* Крупный вариант для полноэкранного просмотра (ImageViewer). */
.file-placeholder--viewer {
    gap: 14px;
}

.file-placeholder--viewer .file-placeholder__ext {
    font-size: 16px;
    color: #fff;
}

.file-placeholder--viewer .file-placeholder__name {
    max-width: 460px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
}

/* =============================================================
   ImageViewer: контейнер плейсхолдера + кнопки «Открыть»/«Скачать».
   ============================================================= */

.image-viewer-file-placeholder {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    max-width: min(520px, calc(100vw - 64px));
    padding: 32px;
    text-align: center;
}

.image-viewer-file-placeholder:not(.hidden) {
    display: flex;
}

.image-viewer-file-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.image-viewer-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: background 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
}

.image-viewer-file-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.32);
}
