/* Otto attachments: a small fan of reference cards and movable work windows. */
#attachment-ui{position:absolute;inset:0;z-index:35;pointer-events:none;--attachment-paper:#fafbfc;--attachment-muted:#777b84;--attachment-blue:#346bfa}
#attachment-ui [hidden]{display:none!important}#attachment-ui button{touch-action:manipulation}#attachment-ui button .icon{pointer-events:none}#attachment-ui .icon{width:19px;height:19px}
.attachment-trigger{position:absolute;pointer-events:auto;width:31px;height:31px;transform:translate(-50%,-50%);padding:6px;border-radius:50%;color:#777b84;transition:color .16s,background .16s,box-shadow .16s}
.attachment-trigger.has-attachments{color:#346bfa}.attachment-trigger:hover,.attachment-trigger[aria-expanded=true]{background:#fff;color:#346bfa;box-shadow:0 5px 20px #414d7324}.attachment-trigger small{position:absolute;right:-6px;top:-5px;min-width:15px;height:15px;padding:1px 3px;border-radius:8px;background:#346bfa;color:white;font-size:9px;font-weight:600;border:1px solid #fff}.attachment-trigger small:empty{display:none}
.attachment-fan{position:absolute;height:230px;pointer-events:none;isolation:isolate}
.attachment-fan-card,.attachment-fan-add{position:absolute;left:var(--fan-x);top:var(--fan-y);pointer-events:auto;transform:translate(-50%,-50%) rotate(var(--fan-tilt));animation:attachment-fan-in .24s cubic-bezier(.2,.7,.25,1) both;animation-delay:var(--fan-delay)}
.attachment-fan-card{width:64px;height:84px;padding:4px 4px 3px;display:flex;flex-direction:column;gap:3px;background:#fcfcfdf5;border:1px solid #fff;border-radius:9px;box-shadow:0 3px 5px #2e38510a,0 8px 22px #2e385129;overflow:hidden;transition:box-shadow .18s,background .18s}
.attachment-fan-card:hover,.attachment-fan-card:focus-visible{background:white;box-shadow:0 4px 9px #2e38511a,0 12px 28px #2e38512e;z-index:2}.attachment-fan-card>img,.attachment-fan-card>.attachment-type,.attachment-fan-card>[data-pdf-thumbnail]{display:block;width:54px;height:52px;flex:none;object-fit:cover;border-radius:5px;overflow:hidden;background:#eceef3}
.attachment-fan-card>span:last-child{font-size:9px;font-weight:500;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-align:center;line-height:12px;color:#565d6b}
.attachment-type{position:relative;color:#777f91;padding:10px}.attachment-type.type-pdf{background:#f4e9e8;color:#a96760}.attachment-type.type-note{padding:4px;background:#f4f0e4;color:#877e61}.attachment-type.type-note .icon{width:12px!important;height:12px!important}.attachment-type i{display:block;text-align:left;font-style:normal;font-size:4px;line-height:1.55;white-space:normal;max-height:23px;overflow:hidden}
.attachment-fan-add{width:40px;height:40px;display:grid;place-items:center;padding:8px;border-radius:50%;background:#346bfa;color:#fff;border:1px solid #ffffff80;box-shadow:0 6px 20px #346bfa35}.attachment-fan-add:hover{background:#285bea}.attachment-fan-caption{position:absolute;top:204px;left:50%;transform:translateX(-50%);display:flex;gap:4px;align-items:center;white-space:nowrap;font-size:10px;color:#747b89;text-shadow:0 1px 5px #fff}.attachment-fan-caption button{pointer-events:auto;width:40px;height:40px;padding:4px;background:#f6f7faeb}.attachment-fan-caption .icon{width:15px!important;height:15px!important}
.attachment-add-menu{position:absolute;left:var(--menu-x,50%);top:246px;transform:translateX(-50%);display:flex;gap:4px;padding:5px;border-radius:16px;pointer-events:auto;z-index:3}.attachment-add-menu button{width:43px;height:42px;padding:10px;border-radius:12px}
.attachment-window{position:absolute;display:flex;flex-direction:column;pointer-events:auto;padding:0;border-radius:20px;background:#f7f8fbea;border:1px solid #ffffffed;box-shadow:0 12px 45px #27324a24,0 2px 8px #27324a0c;overflow:hidden;min-width:0;outline:none;transition:box-shadow .15s}.attachment-window:focus-within{box-shadow:0 14px 50px #27324a2b,0 2px 8px #27324a0f}.attachment-window.is-moving{box-shadow:0 20px 65px #27324a30}
.attachment-window-heading{display:flex;gap:9px;align-items:center;padding:11px 10px 11px 15px;min-height:59px;flex:none;cursor:grab;touch-action:none;user-select:none;border-bottom:1px solid #d6dae244}.attachment-window.is-moving .attachment-window-heading{cursor:grabbing}.attachment-window-kind{display:grid;place-items:center;color:#7b8392;width:24px;flex:none}.attachment-window-titles{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.attachment-window-titles strong{font-size:12px;font-weight:600;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;letter-spacing:-.15px}.attachment-owner{font-size:10px;color:#777f8e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.attachment-window-actions{display:flex;gap:1px;flex:none}.attachment-window-actions button{padding:6px;width:29px;height:31px;border-radius:10px;color:#7a8190}.attachment-window-actions .icon{width:16px!important;height:16px!important}.attachment-readonly .attachment-write{display:none}
.attachment-window-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;position:relative;scrollbar-width:thin;scrollbar-color:#aab1bf66 transparent;background:#f7f8fb60}.attachment-window-footer{display:flex;align-items:center;justify-content:center;gap:3px;padding:6px 15px 7px 10px;min-height:42px;flex:none;color:#737b8b;border-top:1px solid #d6dae233}.attachment-window-footer:empty{display:none}.attachment-window-footer button{width:30px;height:29px;padding:5px;border-radius:10px}.attachment-window-footer .icon{width:16px!important;height:16px!important}.attachment-window-footer i{width:1px;height:15px;background:#d6dae2;margin:0 8px}.attachment-page,.attachment-zoom{font-size:10px;font-variant-numeric:tabular-nums;min-width:43px;text-align:center}
.attachment-resize{position:absolute;right:0;bottom:0;width:22px;height:22px;border-radius:0;padding:4px;touch-action:none;cursor:nwse-resize;z-index:4;color:#a0a7b4}.attachment-resize svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.15;pointer-events:none}.attachment-window-menu{position:absolute;right:44px;top:48px;padding:5px;border-radius:13px;z-index:5}.attachment-window-menu button{padding:9px;font-size:11px;gap:7px}.attachment-window-menu .icon{width:16px!important;height:16px!important}
.attachment-message{display:block;padding:22px;font-size:12px;line-height:1.6;color:#777f8e}.attachment-image-view{display:grid;place-items:center;padding:12px}.attachment-image-view>img{display:block;max-width:none;max-height:none;border-radius:3px;flex:none}.attachment-pdf-view{padding:14px;background:#e7e9ee}.attachment-pdf-view canvas{display:block;margin:0 auto;background:#fff;box-shadow:0 2px 10px #333e5515}
.attachment-note-view{padding:22px 25px;background:#fbfaf5bf}.attachment-note-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.75;color:#424956}.attachment-text-view{padding:18px}.attachment-text-view pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;line-height:1.6;margin:0}
.attachment-link-view{padding:15px 19px 22px}.attachment-link-image{display:block;width:calc(100% + 38px);max-height:250px;object-fit:cover;margin:-15px -19px 18px}.attachment-link-host{display:block;font-size:10px;letter-spacing:.2px;color:#858c99;margin-bottom:8px}.attachment-link-view h3{font-size:17px;line-height:1.3;letter-spacing:-.45px;margin:0 0 10px;font-weight:600}.attachment-link-view p{font-size:12px;color:#777f8e;line-height:1.6;margin:0 0 18px}.attachment-external{display:inline-flex;align-items:center;gap:7px;color:#346bfa;font-size:12px;text-decoration:none;padding:8px 0}.attachment-external .icon{width:15px!important;height:15px!important}.attachment-external:hover{text-decoration:underline}
.attachment-file-view{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:13px;min-height:100%;padding:30px;text-align:center}.attachment-file-view>.icon{width:35px!important;height:35px!important;color:#9da5b4}.attachment-file-view strong{font-size:13px;overflow-wrap:anywhere}.attachment-file-view>span{font-size:11px;color:#858c99}.attachment-player-view{display:grid;place-items:center;padding:15px}.attachment-player-view video,.attachment-player-view audio{width:100%;max-height:100%}
.attachment-editor{padding:20px}.attachment-editor form{display:flex;flex-direction:column;gap:14px;min-height:100%;font-size:12px}.attachment-editor label{display:flex;flex-direction:column;gap:9px;color:#858c99}.attachment-editor input,.attachment-editor textarea{width:100%;background:#ffffffaa;border:1px solid #d6dae270;border-radius:11px;padding:10px 12px;font:inherit;outline:none}.attachment-editor input:focus,.attachment-editor textarea:focus{border-color:#346bfa80}.attachment-note-form>input{font-weight:600;font-size:15px;background:transparent;border:0;padding:2px 0 8px;border-radius:0}.attachment-note-form>textarea{flex:1;min-height:120px;resize:none;line-height:1.65;background:#fbfaf5bf}.attachment-note-form>div{display:flex;justify-content:flex-end;gap:7px}.attachment-form-status{font-size:11px;line-height:1.55;color:#858c99;margin:0}.attachment-link-form>button{align-self:flex-end}
@keyframes attachment-fan-in{from{opacity:0;transform:translate(-50%,10px) rotate(0deg) scale(.6)}to{opacity:1;transform:translate(-50%,-50%) rotate(var(--fan-tilt)) scale(1)}}
@media(max-width:700px){.attachment-window{border-radius:18px}.attachment-window-heading{padding:10px 7px 10px 11px;gap:6px}.attachment-window-kind{width:20px}.attachment-window-actions button{width:27px}.attachment-window-titles strong{font-size:11px}.attachment-owner{font-size:9px}.attachment-editor{padding:16px}.attachment-window-footer{padding:5px 18px 6px 8px}}
@media(prefers-reduced-motion:reduce){.attachment-fan-card,.attachment-fan-add{animation:none}.attachment-trigger,.attachment-window{transition:none}}

/* Metadata management belongs to the object's properties, without loading files. */
.attachment-properties{border-top:1px solid #d6dae266;margin-top:14px;padding-top:9px;font-size:12px}.attachment-properties>summary{display:flex;align-items:center;gap:8px;cursor:pointer;padding:9px 2px;color:#565e6c;list-style:none}.attachment-properties>summary::-webkit-details-marker{display:none}.attachment-properties>summary .icon{width:17px;height:17px}.attachment-properties>summary small{margin-left:auto;background:#e9ecf2;padding:3px 7px;border-radius:9px;font-variant-numeric:tabular-nums}.attachment-properties[open]>summary{color:#346bfa}.attachment-manager-actions{display:flex;gap:4px;align-items:center;justify-content:flex-end;padding:5px 0}.attachment-manager-actions button{font-size:11px;padding:8px 7px;gap:4px;min-height:34px}.attachment-manager-actions .icon{width:15px;height:15px}.attachment-manager-actions>small{margin-right:auto;font-size:10px;color:#858c99}.attachment-manager-list{max-height:200px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}.attachment-manager-row{display:flex;align-items:center;gap:6px;padding:2px 0;border-bottom:1px solid #d6dae233}.attachment-manager-row>input{width:17px;height:17px;flex:none;accent-color:#346bfa}.attachment-manager-row>button{min-width:0;flex:1;text-align:left;padding:8px 3px;gap:7px}.attachment-manager-row>button>span{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.attachment-manager-row small{display:block;color:#939aa7;font-size:9px;margin-top:3px}.attachment-manager-row .icon{width:16px;height:16px;flex:none;color:#8a92a0}.attachment-manager-row .icon:last-child{width:12px}.attachment-batch-actions{border-top:1px solid #d6dae266;margin-top:5px}.attachment-batch-form{display:flex;flex-direction:column;gap:13px}.attachment-batch-form>p{color:#858c99;font-size:11px;margin:8px 0}.attachment-batch-form section{display:flex;flex-direction:column;gap:9px;padding-bottom:12px;border-bottom:1px solid #d6dae244}.attachment-batch-form section>small{color:#346bfa;font-size:10px}.attachment-batch-form label{display:flex;flex-direction:column;gap:5px;font-size:10px;color:#858c99}.attachment-batch-form input,.attachment-batch-form textarea{width:100%;padding:9px;border:1px solid #d6dae270;background:#ffffffaa;border-radius:9px;font:12px system-ui;color:#252832}.attachment-batch-form textarea{min-height:92px;resize:vertical}.attachment-batch-form input:focus,.attachment-batch-form textarea:focus{outline:1px solid #346bfa80}.attachment-message button{display:inline-flex;vertical-align:middle;padding:7px;border:1px solid #d6dae2;border-radius:9px}

#attachment-ui button:focus-visible{outline:2px solid #346bfa;outline-offset:2px}

@media(max-width:700px){.attachment-trigger{width:40px;height:40px}.attachment-window-actions button{width:40px;height:40px}}



@media(max-width:700px){.attachment-fan-add{width:44px;height:44px}}

.attachment-fan-caption{padding:0 3px;border-radius:16px;background:#f6f7faeb;backdrop-filter:blur(12px)}
