/* One file identity and an independent authorized download action. */
.file-item { display:inline-flex; align-items:center; gap:10px; max-width:100%; min-width:0; position:relative; vertical-align:middle; }
.file-symbol { display:grid; justify-items:center; align-content:center; width:36px; min-width:36px; height:42px; flex:none; border-radius:5px; color:var(--accent); background:var(--tag-bg); }
.file-symbol svg { width:21px; height:24px; }
.file-symbol small { font:600 9px/1.1 system-ui,sans-serif; max-width:34px; overflow:hidden; }
.file-open { min-width:0; color:var(--fg); overflow-wrap:anywhere; text-decoration:none; }
.file-open:hover .file-label { text-decoration:underline; color:var(--accent); }
.file-open small { display:block; color:var(--muted); font-size:.78rem; font-weight:400; margin-top:2px; }
.file-label { font-weight:600; }
.file-download { display:inline-flex; align-items:center; justify-content:center; flex:none; width:36px; min-height:36px; border:1px solid var(--control-line); border-radius:6px; color:var(--accent); opacity:0; pointer-events:none; text-decoration:none; }
.file-download svg { width:16px; height:16px; }
.file-download.file-download-labeled { width:auto; padding:6px 10px; gap:6px; }
:is(.file-item,.file-entry,.file-card,.chat-library-file):is(:hover,:focus-within) .file-download { opacity:1; pointer-events:auto; }
.file-download:focus-visible { opacity:1; pointer-events:auto; outline:2px solid var(--accent); outline-offset:3px; }
.file-download:hover { background:var(--action-hover); text-decoration:none; }
.file-item .file-open { flex:1; }
.file-item .file-symbol { margin:0; }
.files .file-item { width:min(100%,640px); }
.file-item .chat-file,.file-item .ai-file-chip { flex:1; min-width:0; margin:0; border:0; padding:0; background:transparent; box-shadow:none; }
.file-item .ai-file-chip span,.file-item .chat-file-caption { overflow-wrap:anywhere; white-space:normal; }
.file-item .ai-file-download { display:none; }
.ai-file-item.file-item { border:1px solid var(--line); border-radius:8px; padding:8px; }
.chat-sent-files .file-item { padding:8px; border:1px solid var(--line); border-radius:8px; }
.file-name-cell > .file-download { margin-left:auto; }
.file-card-actions > .file-download { width:auto; padding:4px 8px; }
.file-search-items { display:flex; flex-wrap:wrap; gap:12px; margin-top:8px; }
.file-search-items .file-item { width:min(100%,560px); }
.file-item .shot img { max-width:180px; max-height:120px; }
.file-draft-icon { display:inline-flex; color:var(--accent); flex:none; }
.file-draft-icon svg { width:22px; height:26px; }
@media(hover:none),(pointer:coarse) { .file-download { opacity:1; pointer-events:auto; min-width:44px; min-height:44px; } }
@media print { .file-download { opacity:1; } }
