/* Private task images: compact thumbnails and a viewer above the task form. */
.task-attachments{min-width:0;margin:2px 0 20px;padding:16px;border:1px solid var(--line);border-radius:12px;background:#0d1828}
.attachment-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.attachment-heading h3{font-size:14px;letter-spacing:0;margin:0}
.attachment-heading .button{min-height:44px}
.attachment-file-input{display:none!important}
.attachment-status{font-size:12px;line-height:1.6;color:#a5bfdc;margin:12px 0;overflow-wrap:anywhere}
.attachment-status.is-error,.attachment-error{color:#ffb8a8}
.attachment-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px;min-width:0}
.attachment-empty{grid-column:1/-1;font-size:12px;margin:3px 0;line-height:1.6}
.attachment-card{min-width:0;overflow:hidden;border:1px solid #29405d;border-radius:10px;background:#111f31}
.attachment-card.pending{border-style:dashed;border-color:#517db0}
.attachment-card.has-error{border-color:#ac6651}
.attachment-preview{display:block;width:100%;padding:0;border:0;background:transparent;color:var(--text);text-align:left;font:inherit}
.attachment-preview img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;background:#0a121e}
.attachment-preview>span{display:block;padding:10px 10px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.attachment-card-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 8px 5px;font-size:11px;color:#a5bfdc}
.attachment-card-actions .text-button{min-height:44px;padding:6px 2px;font-size:12px;text-decoration:none;display:inline-flex;align-items:center}
.attachment-error{padding:0 10px 10px;margin:0;font-size:11px;line-height:1.5;overflow-wrap:anywhere}
.attachment-login{margin-top:12px;min-height:44px}
.attachment-viewer{position:fixed;inset:0;z-index:180;background:#04070def;display:flex;flex-direction:column;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}
.attachment-viewer-toolbar{display:flex;align-items:center;gap:10px;padding:12px 18px;border-bottom:1px solid #29405d;background:#0e1b2e;flex:none}
.attachment-viewer-toolbar strong{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.attachment-viewer-toolbar .button,.attachment-viewer-toolbar .icon-button{min-height:44px;min-width:44px;flex:none}
.attachment-viewer-image{display:flex;align-items:center;justify-content:center;position:relative;flex:1;min-height:0;min-width:0;overflow:auto;padding:16px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.attachment-viewer-image>img{display:block;max-width:100%;max-height:100%;object-fit:contain}
.attachment-viewer-image.zoomed{display:block}
.attachment-viewer-image.zoomed>img{max-width:none;max-height:none;min-width:100%;width:auto;height:auto;margin:auto}
.attachment-viewer-error{position:absolute;inset:auto 16px 16px;padding:12px;border-radius:8px;background:#49271f;color:#ffd6c8;line-height:1.5}
@media(max-width:780px){
  .task-attachments{padding:12px;margin-bottom:18px}
  .attachment-heading{gap:8px}
  .attachment-heading .button{font-size:12px;padding-inline:12px}
  .attachment-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .attachment-viewer-toolbar{padding:10px 12px;gap:7px;flex-wrap:wrap}
  .attachment-viewer-toolbar strong{flex-basis:calc(100% - 55px);order:0}
  .attachment-viewer-toolbar .icon-button{order:1}
  .attachment-viewer-toolbar .button{order:2;font-size:13px;padding:9px 14px}
  .attachment-viewer-image{padding:8px}
}
