/*
 * Library — management side.
 *
 * A folder rail beside a file table. The rail is the whole navigation model: the
 * Library is a curated flat set of folders, not a tree, so there is no breadcrumb
 * trail here the way File Storage has one.
 *
 * css/home/library/index.css renders the read-only consumption side with the same
 * two class names, so the two screens stay visually identical. They never load
 * together, so there is no collision.
 */

.library-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
    align-items: start;
}

@media (max-width: 900px) {
    .library-layout { grid-template-columns: 1fr; }
}

/* ============================ Folder rail ============================ */

.library-folders {
    background: #fff;
    border: 1px solid var(--res-border);
    border-radius: 8px;
    overflow: hidden;
}

.library-folder {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    color: #334155;
    font-size: 14px;
}

.library-folder:last-child { border-bottom: none; }

.library-folder:hover { background: #f8fafc; }

.library-folder.is-selected {
    background: #f0fdf9;
    color: var(--res-navy);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--res-green);
}

.library-folder-icon {
    width: 18px;
    text-align: center;
    color: var(--res-amber);
}

.library-folder-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.library-folder-count {
    font-size: 12px;
    color: var(--res-muted);
    font-variant-numeric: tabular-nums;
}

/* The role each folder is intended for. Displayed only — nothing enforces it yet,
   so this is a label, not a permission indicator. */
.library-folder-role {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--res-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* The four seeded folders cannot be deleted; the rail hides the control entirely
   rather than showing one that errors. */
.library-folder.is-system .library-folder-delete {
    display: none;
}

.library-files {
    min-width: 0;
}
