/* Attachment viewer (js/attachment_viewer.js) */
.av-overlay { position: fixed; inset: 0; z-index: 100000; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.72); }
.av-overlay.av-show { display: flex; }
.av-panel { display: flex; flex-direction: column; width: min(1040px, 100%); height: min(92vh, 100%); background: #10402c; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 16px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6); overflow: hidden; color: #fff; }
.av-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.av-title { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-btn { font: inherit; font-size: 0.85rem; padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.08); color: #fff; text-decoration: none; cursor: pointer; white-space: nowrap; }
.av-btn:hover { background: rgba(255, 255, 255, 0.16); }
.av-body { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; background: #0b2e20; }
.av-image { max-width: 100%; max-height: 100%; object-fit: contain; margin: auto; }
.av-page { max-width: 100%; height: auto; background: #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); }
.av-msg { margin: auto; opacity: 0.8; text-align: center; }
@media (max-width: 600px) {
  .av-overlay { padding: 0; }
  .av-panel { height: 100%; border-radius: 0; }
  .av-open { display: none; }
}
