/* Swaye Ops v31 — Attachments (reusable: SwayeAttach) */
.att { border: 1px solid var(--sw-line, #e2e8f0); border-radius: 10px; padding: .6rem .7rem; background: #fff; margin: .4rem 0; position: relative; }
.att.att-over { outline: 3px dashed #2563eb; outline-offset: -3px; background: #eff6ff; }
.att-head { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .35rem; }
.att-n, .att-tabn { display: inline-block; min-width: 1.3em; padding: 0 .35em; border-radius: 999px; background: #e0e7ff; color: #1e3a8a; font-size: .78rem; font-weight: 700; text-align: center; }
.att-tabn:empty { display: none; }
.att-actions { margin-left: auto; display: flex; gap: .3rem; }
.att-drop { border: 2px dashed #cbd5e1; border-radius: 8px; padding: .8rem; text-align: center; color: #334155; cursor: pointer; margin-bottom: .5rem; font-size: .9rem; }
.att-drop:hover, .att-drop:focus { border-color: #2563eb; background: #f8fafc; outline: none; }
.att-drop.small { padding: .45rem; font-size: .82rem; }
.att-prog { font-size: .85rem; color: #1d4ed8; margin: .3rem 0; }
.att-err { font-size: .85rem; color: #b91c1c; background: #fef2f2; border-radius: 6px; padding: .3rem .5rem; margin: .3rem 0; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .5rem; margin: .4rem 0; }
.att-compact .att-grid { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: .3rem; }
.att-thumb { margin: 0; position: relative; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; background: #f8fafc; }
.att-img { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; aspect-ratio: 1 / 1; }
.att-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-thumb figcaption { display: flex; flex-direction: column; padding: .25rem .35rem; font-size: .75rem; line-height: 1.25; }
.att-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(15,23,42,.65); color: #fff; cursor: pointer; font-size: .75rem; line-height: 24px; padding: 0; }
.att-del:hover { background: #dc2626; }
.att-more { display: flex; align-items: center; justify-content: center; font-size: .8rem; color: #475569; background: #f1f5f9; border-radius: 8px; }
.att-files { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: .3rem; }
.att-files td { padding: .3rem .35rem; border-top: 1px solid #f1f5f9; vertical-align: middle; }
.att-ic { width: 1.6em; font-size: 1.1em; }
.att-nmcell a { word-break: break-word; }
.att-btns { white-space: nowrap; text-align: right; }
.att-btns .btn { margin-left: .2rem; }
.btn.att-delbtn { background: #fff; color: #b91c1c; border: 1px solid #fecaca; }
.btn.att-delbtn:hover { background: #fef2f2; }
.att-clip { display: inline-block; font-size: .72rem; font-weight: 700; padding: 0 .3em; border-radius: 6px; background: rgba(255,255,255,.85); color: #0f172a; border: 1px solid rgba(15,23,42,.18); line-height: 1.35; white-space: nowrap; }
.att-q { list-style: none; margin: .2rem 0; padding: 0; font-size: .85rem; }
.att-q li { padding: .15rem 0; }
.sch-pop .pop-att .att { margin: .4rem 0; padding: .45rem .5rem; }
.sch-pop { max-height: calc(100vh - 16px); overflow-y: auto; }
.jt-attach .att { border: 0; padding: 0; }
/* lightbox */
.att-lb { position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center; }
.att-lb-back { position: absolute; inset: 0; background: rgba(2,6,23,.86); }
.att-lb-fig { position: relative; margin: 0; max-width: 92vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; }
.att-lb-fig img { max-width: 92vw; max-height: 82vh; object-fit: contain; border-radius: 6px; background: #fff; }
.att-lb-fig figcaption { color: #e2e8f0; font-size: .9rem; margin-top: .5rem; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.att-lb-fig a { color: #93c5fd; }
.att-lb-nav, .att-lb-x { position: absolute; border: 0; background: rgba(255,255,255,.15); color: #fff; cursor: pointer; border-radius: 50%; }
.att-lb-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 2rem; line-height: 44px; }
.att-lb-nav.prev { left: 16px; } .att-lb-nav.next { right: 16px; }
.att-lb-x { top: 14px; right: 16px; width: 40px; height: 40px; font-size: 1.1rem; }
@media (max-width: 899px) { .att-files td:nth-child(3), .att-files td:nth-child(5) { display: none; } .att-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); } }
.sch-ev .ev-clipwrap { position: absolute; right: 3px; bottom: 6px; pointer-events: none; }
.sch-ev .ev-clipwrap .att-clip { font-size: .68rem; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.rr-chip .att-clip { margin-left: .2em; }
