﻿/* files-gallery.css
   Галерея изображений, документы, модернизированные блоки.
   НЕ содержит глобального .card:hover.
*/

/* Современные блоки галереи (бывшие files-gallery.css) */
.file-block.modern {
    position: relative;
    width: 200px;
    min-height: 210px;
    background: #fff;
    border: 1px solid #cde9d3;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    display: flex;
}

    .file-block.modern.placeholder {
        background: #f5fcf7;
    }

    .file-block.modern .file-block-inner {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: .55rem .55rem .6rem;
        gap: .45rem;
    }

/* Thumb */
.file-thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    border: 1px solid #cde9d3;
    border-radius: 10px;
    overflow: hidden;
    background: #fafefd;
}

    .file-thumb-wrapper img.file-thumb-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.file-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 600;
    color: #1f5e3a;
    background: repeating-linear-gradient(45deg,#fbfffc 0 16px,#e9f7ed 16px 32px);
}

/* Metadata */
.file-meta {
    font-size: .7rem;
    line-height: 1.1;
}

.file-meta-name {
    font-weight: 600;
    color: #1f5e3a;
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    align-items: center;
}

.file-extension {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .07em;
    color: #2e8b57;
    text-transform: uppercase;
}

.file-ops {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
}

.btn.btn-xs {
    --bs-btn-padding-y: .15rem;
    --bs-btn-padding-x: .4rem;
    font-size: .65rem;
    border-radius: 8px;
}

/* Add-block */
.file-block.add-block {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 2px dashed #bce5c7;
    background: #fff;
    cursor: pointer;
    transition: .2s;
}

    .file-block.add-block:hover {
        border-color: #2e8b57;
        background: #f1fcf4;
    }

    .file-block.add-block .add-block-link {
        text-align: center;
        font-weight: 600;
        color: #2e8b57;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

/* Grid */
.file-blocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(190px,1fr));
    gap: .9rem;
}

.file-empty-message {
    grid-column: 1/-1;
    text-align: center;
    padding: 1.2rem;
    border: 1px dashed #cde9d3;
    border-radius: 14px;
    background: #f5fcf7;
    font-weight: 500;
    color: #2e8b57;
}

/* Documents icons */
.doc-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: #2e8b57;
    background: #f5fcf7;
}

/* Gallery items (простая линейка + стрелки reorder) */
.gallery-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    border: 1px solid #cde9d3;
    border-radius: 8px;
    background: #fff;
    padding: .45rem .55rem;
}

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .gallery-item .move-up, .gallery-item .move-down {
        width: 32px;
        height: 32px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Мини-превью контейнер 70x70 */
    .gallery-item .thumb-box {
        width: 70px;
        height: 70px;
        position: relative;
        overflow: hidden;
        border: 1px solid #cde9d3;
        border-radius: 8px;
        background: #f5fcf7;
        display: flex;
        align-items: center;
        justify-content: center;
    }

/* Reorder notification */
#order-notification {
    display: none;
    margin-top: .6rem;
}

/* Убираем глобальные эффекты .card:hover из старых файлов — не дублируем */

/* Документы (иконка Bootstrap) */
.gallery-item .doc-icon {
    font-size: 2rem;
    color: #2e8b57;
}
