/* Leonardo Files (Story 3520) -- documents attached to records, across every record.
   Chips, type badges and sheets come from file-kit.css. */

body { background: #F2F2F4; margin: 0; font-family: "Segoe UI", system-ui, sans-serif; }

.page-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
#lwIconBand, .ct-header, .lf-buckets, .lf-controls, .lf-selbar { flex: 0 0 auto; }

.ct-header {
    background: #3C3C3C; color: #fff; padding: 10px 16px;
    display: flex; align-items: center; gap: 12px;
}
.ct-header h1 { margin: 0; font-size: 14pt; font-weight: 600; flex: 1; }
.ct-header button { color: #fff; background: transparent; border: 1px solid #6A6A6A; border-radius: 3px;
    padding: 4px 12px; font: inherit; cursor: pointer; }

/* Buckets: Staging, All files, Important, then one per category. Scrolls sideways on a phone. */
.lf-buckets {
    display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px;
    background: #fff; border-bottom: 1px solid #E2E2E5; scrollbar-width: thin;
}
.lf-bucket { flex: 0 0 auto; }
.lf-bucket.fk-chip { padding: 6px 12px 6px 10px; font-size: 12px; }
.lf-bucket.on { box-shadow: 0 0 0 2px var(--fk-c); background: color-mix(in srgb, var(--fk-c) 22%, #fff); }
.lf-bucket.lf-plain { --fk-c: #0A66C2; }

.lf-controls { background: #fff; border-bottom: 1px solid #E2E2E5; padding: 8px 12px; }
.lf-search {
    display: block; width: 100%; box-sizing: border-box; padding: 8px 10px; margin-bottom: 8px;
    border: 1px solid #C9D0D8; border-radius: 4px; font: 14px "Segoe UI", system-ui, sans-serif;
}
.lf-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lf-sort { display: flex; gap: 6px; align-items: center; flex: 1 1 220px; }
.lf-sort .ps-select, .lf-sort select { flex: 1 1 auto; min-width: 150px; }

.lf-btn {
    background: #fff; color: #0A66C2; border: 1px solid #C9D7E8; border-radius: 4px;
    padding: 6px 12px; font: 12px "Segoe UI", system-ui, sans-serif; cursor: pointer;
}
.lf-btn:hover { background: #ECF4FD; }
.lf-btn.primary, .lf-btn.on { background: #0A66C2; color: #fff; border-color: #0A66C2; }
.lf-btn:disabled { opacity: 0.5; cursor: default; }
.lf-dir { font-size: 14px; line-height: 1; padding: 5px 10px; }

.lf-body { flex: 1 1 auto; overflow-y: auto; padding: 6px; }
.lf-status { font-size: 12px; color: #555; margin-bottom: 10px; }
/* Cards run almost edge to edge, like the Solutions page (Tony, 2026-09-24) -- no centred column. */
.lf-list { max-width: none; margin: 0; }

/* ---- Cards ---- */
.lf-card {
    background: #fff; border: 1px solid #E2E2E5; border-radius: 6px;
    padding: 10px 12px; margin-bottom: 10px;
}
.lf-card.lf-staged { border-left: 3px solid #F59E0B; }
.lf-card.lf-important { border-color: #F2C94C; background: #FFFDF3; }
.lf-card.lf-sel { border-color: #0A66C2; background: #ECF4FD; box-shadow: 0 0 0 1px #0A66C2 inset; }
.lf-selecting .lf-card { cursor: pointer; }

.lf-top { display: flex; align-items: center; gap: 8px; }
.lf-check { width: 18px; height: 18px; flex: 0 0 auto; }
.lf-name { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; color: #111; word-break: break-word; }
.lf-flag { color: #D97706; font-size: 15px; flex: 0 0 auto; }
/* Leonardo Secure Files (Story 3523): a lock on a secure file -- its readable copy is local only,
   the copy in git is encrypted. */
.lf-lock { flex: 0 0 auto; font-size: 11px; font-weight: 600; color: #065F46; background: #D1FAE5;
           border: 1px solid #6EE7B7; border-radius: 10px; padding: 1px 8px; white-space: nowrap; }

.lf-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 11px; color: #64748B; }
.lf-sep { color: #CBD5E1; }
.lf-record {
    display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
    color: #0A66C2; text-decoration: none; font-weight: 600; font-size: 12px;
    background: #F1F6FC; border: 1px solid #D6E4F5; border-radius: 4px; padding: 2px 8px;
}
.lf-record:hover { background: #E3EEFB; }
.lf-record .lf-rtype { color: #64748B; font-weight: 400; }
.lf-docdate { color: #334155; font-weight: 600; }
.lf-desc { font-size: 12px; color: #333; margin-top: 6px; word-break: break-word; }

.lf-fileto {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    margin-top: 8px; padding-top: 8px; border-top: 1px dashed #F5D38A;
}
.lf-fileto-lbl { font-size: 11px; color: #92400E; font-weight: 600; }
.lf-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
.lf-actions .lf-btn { padding: 4px 10px; font-size: 11px; }
.lf-btn.danger { color: #C00000; border-color: #E2B0B0; }
.lf-btn.danger:hover { background: #FDECEC; }
.lf-btn.danger.primary { background: #C00000; color: #fff; border-color: #C00000; }

/* Remove a file: the sheet that lists every link before they go. */
.lf-rm-lead { margin: 4px 0 10px; font-size: 14px; line-height: 1.4; }
.lf-rm-links { list-style: none; margin: 0 0 10px; padding: 0; border: 1px solid #E5E7EB; border-radius: 8px; }
.lf-rm-links li { padding: 8px 10px; border-top: 1px solid #F1F5F9; font-size: 13px; line-height: 1.35; }
.lf-rm-links li:first-child { border-top: 0; }
.lf-rm-kind { display: inline-block; min-width: 92px; color: #475569; font-weight: 600; }
.lf-rm-effect { display: block; color: #64748B; font-size: 12px; }
.lf-rm-this { color: #0A66C2; font-size: 12px; font-weight: 600; }
.lf-rm-note { margin: 0; color: #475569; font-size: 13px; line-height: 1.4; }

.lf-more { text-align: center; padding: 6px 0 16px; }
.lf-more[hidden] { display: none; }

.lf-selbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    background: #1E293B; color: #fff; padding: 10px 12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}
.lf-selbar[hidden] { display: none; }
.lf-selbar #selCount { flex: 1 1 auto; font-size: 13px; }

@media print {
    .lf-actions, .lf-fileto, .lf-check { display: none; }
}
