/*
 * Library — consumption side (Home > Library).
 *
 * Same folder-rail-beside-a-table layout as the management screen in
 * css/resource/library/index.css, and deliberately the same class names so the two
 * stay visually identical. They never load together, so there is no collision.
 *
 * Self-contained by necessity: this screen is in the Home module and does not load
 * css/resource/shared.css, so the palette is declared here rather than inherited.
 * The values match resource/shared.css exactly.
 */

:root {
    --res-navy: #182442;
    --res-green: #5dc19b;
    --res-amber: #f59e0b;
    --res-slate: #94a3b8;
    --res-border: #e2e8f0;
    --res-muted: #64748b;
}

.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;
}

.library-folder-role {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--res-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

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

/* ============================ File cells ============================ */
/* Repeated from resource/shared.css for the same reason as the palette above. */

.file-icon {
    width: 28px;
    text-align: center;
    color: var(--res-muted);
    font-size: 16px;
}

.file-name {
    display: inline-block;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
