/* 파일 카드 — AI 말풍선 아래 턴 산출물 (ARCHITECTURE_FILE_DOWNLOAD §5.1·§5.7)
   소유: filecard.js. 말풍선 폭 규칙(.msg.ai .bubble max-width 92%) 안에서
   min-width:0 + ellipsis — 긴 한글 파일명도 짤리지 않고 줄임표로 끝난다(§5.5).
   색은 app.css 토큰만(--accent 계열) — 보라 하드코딩 금지. 시큐어는 초록 틴트. */
/* 카톡처럼 카드 폭 고정(420px) — 말풍선 폭 상한(92%)을 넘지 않게 좁은 창에선 92% 로 */
.file-cards{display:flex;flex-direction:column;gap:6px;width:min(420px,92%);min-width:0;align-self:flex-start;
  --aho-rise:6px;--aho-dur:var(--motion-dur-pop)}
.file-card{display:flex;align-items:center;gap:10px;min-width:0;padding:8px 12px 8px 10px;
  border:1px solid var(--line);border-radius:12px;background:var(--card);color:inherit;
  text-decoration:none;cursor:pointer;box-shadow:0 6px 18px #27225d0a;
  transition:background var(--motion-dur-micro) var(--motion-ease-out),border-color var(--motion-dur-micro) var(--motion-ease-out)}
.file-card:hover{background:var(--hover);border-color:rgba(var(--accent-rgb),.35)}
/* 확장자 배지(§5.6) — 종류별 배경 토큰 */
.file-card{--fc-doc:#3b6fd8;--fc-sheet:#2e9a5f;--fc-slide:#e0702b;--fc-pdf:#d3433f;
  --fc-img:#8e5fd6;--fc-code:#4b5566;--fc-etc:#8c91a1}
.fc-ico{flex:none;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;
  border-radius:9px;font-style:normal;font-size:10.5px;font-weight:700;letter-spacing:.02em;color:#fff;
  background:var(--fc-etc)}
.fc-ico[data-kind="doc"]{background:var(--fc-doc)}
.fc-ico[data-kind="sheet"]{background:var(--fc-sheet)}
.fc-ico[data-kind="slide"]{background:var(--fc-slide)}
.fc-ico[data-kind="pdf"]{background:var(--fc-pdf)}
.fc-ico[data-kind="img"]{background:var(--fc-img)}
.fc-ico[data-kind="code"]{background:var(--fc-code)}
.fc-b{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.fc-b b{font-weight:640;font-size:13px;color:#3c4160;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fc-b small{font-size:11.5px;color:var(--dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* [저장] → "저장됨 HH:MM" — 상태 전이는 --motion-dur-micro */
.fc-act{flex:none;font-size:12px;font-weight:640;color:var(--accent-deep);padding:4px 9px;border-radius:8px;
  background:var(--accent-soft);white-space:nowrap;
  transition:background var(--motion-dur-micro) var(--motion-ease-out),color var(--motion-dur-micro) var(--motion-ease-out)}
.file-card.is-saved .fc-act{background:#edf7f0;color:#1f7a47}
.file-card.is-saved .fc-ico{opacity:.85}
html.secure .file-card:hover{border-color:#2cb57866}
html.secure .fc-act{background:#e8f5ec;color:#177a4c}
html.secure .file-card.is-saved{border-color:#2cb57866;background:#f2f9f5}
/* 방 말풍선 안 첨부 카드(MEDIA §5.6) — 말풍선 폭 안에서 280px, 받은/보낸 두 톤은 카드 흰 바탕 그대로 */
.co-msg .file-card{width:280px;max-width:100%;margin:2px 0 1px;box-shadow:none}
.co-msg.me .file-card{border-color:transparent}
.co-msg.has-file{padding:6px;max-width:min(92%,calc(100% - 40px))}   /* 카드 말풍선은 좁은 창에서도 이름 폭 확보 */
/* 좁은 폭(420px·모바일 375px): 보관 중 부제는 숨기고 이름·용량만 — 한 줄 ellipsis 유지 */
@media (width<=520px){
  .file-cards{width:100%}
  .file-card{padding:7px 10px 7px 8px;gap:8px}
  .fc-ico{width:32px;height:32px}
  .fc-act{padding:4px 7px}
}
