/* Files in private messages (public/chat-files.js). */
.chat-attach{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px;min-width:0}
.chat-attach-button{flex:0 0 auto;width:44px;height:44px;padding:0;border:1px solid #cbd8d4;border-radius:12px;background:#fff;font-size:20px;line-height:1;cursor:pointer}
.chat-attach-button:hover,.chat-attach-button:focus-visible{border-color:#13958a;background:#eef8f6}
.chat-attach-list{display:flex;flex-wrap:wrap;gap:6px;flex:1 1 220px;min-width:0;margin:0;padding:0;list-style:none}
.chat-attach-chip{display:flex;align-items:center;gap:6px;max-width:100%;padding:5px 6px 5px 10px;border:1px solid #d6e3e1;border-radius:999px;background:#f5fbfa;font-size:13px}
.chat-attach-chip span{min-width:0;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-attach-chip small{color:#536b68;white-space:nowrap}
.chat-attach-chip.failed{border-color:#e8b4ad;background:#fdf1ef}
.chat-attach-chip button{width:26px;height:26px;padding:0;border:0;border-radius:50%;background:transparent;cursor:pointer}
.chat-files{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:6px;margin:6px 0;max-width:420px}
.chat-file-photo{display:block;padding:0;border:0;border-radius:12px;overflow:hidden;background:#e3f2ef;cursor:zoom-in;aspect-ratio:1}
.chat-file-photo img{display:block;width:100%;height:100%;object-fit:cover}
.chat-file-video{width:100%;max-height:260px;border-radius:12px;background:#000;grid-column:1/-1}
.chat-file-pdf{display:flex;align-items:center;gap:10px;grid-column:1/-1;min-width:0;padding:10px;border:1px solid #d6e3e1;border-radius:12px;background:#fff}
.chat-file-pdf-icon{flex:0 0 auto;display:grid;place-items:center;width:42px;height:48px;border-radius:8px;background:#b42318;color:#fff;font-size:12px;font-weight:800}
.chat-file-pdf{flex-wrap:wrap}
.chat-file-pdf .chat-file-pdf-text{display:grid;gap:2px;min-width:0;flex:1 1 140px}
.chat-file-pdf .chat-file-pdf-name{display:block;color:#17332d;font-weight:700;overflow-wrap:anywhere}
.chat-file-pdf .chat-file-pdf-meta{display:block;color:#536b68;font-size:12.5px}
.chat-file-pdf a{flex:0 0 auto;margin-left:auto;padding:8px 12px;border-radius:10px;background:#0b6e69;color:#fff;font-weight:700;text-decoration:none}
.chat-file-warning{grid-column:1/-1;margin:2px 0 0;color:#8a4b00;font-size:12.5px}
.chat-file-viewer{max-width:min(96vw,1100px);max-height:94vh;padding:8px;border:0;border-radius:14px;background:#111}
.chat-file-viewer::backdrop{background:rgba(0,0,0,.75)}
.chat-file-viewer img{display:block;max-width:100%;max-height:calc(94vh - 60px);margin:auto;object-fit:contain}
.chat-file-viewer button{display:block;margin:0 0 8px auto;padding:6px 12px;border:0;border-radius:10px;background:#fff;font-weight:700;cursor:pointer}
.chat-shared-files{width:min(94vw,640px);max-height:88vh;padding:16px;border:0;border-radius:18px;overflow:auto}
.chat-shared-files::backdrop{background:rgba(10,30,28,.5)}
.chat-shared-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.chat-shared-head h2{margin:0;font-size:20px}
.chat-shared-head button{width:40px;height:40px;border:0;border-radius:50%;background:#eef4f2;cursor:pointer}
.chat-shared-title{margin:4px 0 12px;color:#536b68;font-size:14px}
.chat-shared-tabs{display:flex;gap:6px;margin-bottom:12px}
.chat-shared-tabs button{flex:1;padding:9px 12px;border:1px solid #d6e3e1;border-radius:999px;background:#fff;font-weight:700;cursor:pointer}
.chat-shared-tabs button[aria-selected="true"]{border-color:#0b6e69;background:#0b6e69;color:#fff}
.chat-shared-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.chat-shared-grid .chat-file-video{grid-column:auto;aspect-ratio:1;max-height:none;object-fit:cover}
.chat-shared-list{display:grid;gap:8px}
.chat-shared-empty{margin:24px 0;color:#536b68;text-align:center}
.chat-shared-more{display:block;margin:12px auto 0}
@media(max-width:600px){.chat-files{max-width:100%}.chat-shared-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Inside a message bubble (your own bubbles are dark): cards keep dark text on white, the warning
   sits on its own light background, and site-wide button and span styles do not apply. */
.chat-bubble .chat-file-pdf{color:#17332d}
.chat-file-pdf .chat-file-pdf-icon{display:flex;align-items:center;justify-content:center;padding:0;line-height:1}
.chat-bubble .chat-file-warning{padding:6px 8px;border-radius:8px;background:#fff6e5;color:#7a4300}
.chat-shared-files .chat-shared-tabs button{opacity:1;transition:none;box-shadow:none;color:#17332d;background:#fff;border:1px solid #d6e3e1;font-size:15px}
.chat-shared-files .chat-shared-tabs button[aria-selected="true"]{border-color:#0b6e69;background:#0b6e69;color:#fff}
/* Shared files › Files: month headings and the date each PDF was sent. */
.chat-shared-month{margin:10px 0 2px;color:#536b68;font-size:13px;font-weight:800;letter-spacing:.02em;text-transform:uppercase}
.chat-shared-month:first-child{margin-top:0}
.chat-file-pdf .chat-file-pdf-date{display:block;color:#0b6e69;font-size:13px;font-weight:700}
