/* «Загрузить изображение» (rift_uploads.php, rift-uploads.js), owner 2026-11-11: the old forum's upload box under the
   message. Like the stickers, a new element in each design's chat palette (--rift-chat-*, designs.json; defaults for
   the plain MyBB view in chat.css), not new values. «Выберите файлы», «Загрузить» and «Удалить отмеченные» are the
   forum's own buttons (.button), so each design draws them as its other buttons. */
/* A window over the message, as the old forum's: its width and layer are its source's (`#image-area{width:550px}`,
   `#tags .container{position:absolute;z-index:2}`); its place, 50px below the top of the buttons and 50px in from the
   right, is set by rift-uploads.js, since it lives in body (a form's table.tborder has overflow:hidden). It never runs
   past the window's left edge (max-width: the 50px, its own padding and border, and as much again on the left). */
.rift-uploads{position:absolute;z-index:2;width:550px;max-width:calc(100vw - 160px);display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 16px;box-sizing:content-box;margin:0;padding:12px 14px 8px;border:1px solid var(--rift-chat-line);border-radius:var(--rift-chat-radius);background:var(--rift-chat-surface) var(--rift-chat-surface-image) center top;color:var(--rift-chat-text);font:12px/1.4 Verdana,sans-serif;text-align:left}
.rift-uploads[hidden],.rift-uploads [hidden]{display:none}
.rift-uploads.is-over{border-color:var(--rift-chat-accent);box-shadow:inset 0 0 0 1px var(--rift-chat-accent)}
.rift-uploads :is(select,button):focus-visible{outline:2px solid var(--rift-chat-accent);outline-offset:1px}
.rift-uploads-left{display:flex;flex-direction:column;align-items:flex-start;gap:12px}
.rift-uploads-options{display:flex;flex-direction:column;align-items:flex-start;gap:12px}
/* «пикселей» on the list's line, as on the old forum: the forum's label is a block as narrow as its list. */
.rift-uploads-choice{white-space:nowrap}
.rift-uploads-choice strong{font-size:11px}
.rift-uploads-choice select{margin:4px 4px 0 0;border:1px solid var(--rift-chat-line);border-radius:4px;background:var(--rift-chat-input);color:inherit;font:inherit}
.rift-uploads-right{display:flex;flex-direction:column;gap:8px;min-width:0}
/* A chosen file: its name, size, ✖; while it goes, a bar of the action colour fills it (--rift-uploads-progress). */
.rift-uploads-file{display:flex;align-items:center;gap:4px;min-width:0;padding:6px 10px;border:1px solid var(--rift-chat-line);border-radius:4px;background:linear-gradient(90deg,var(--rift-chat-input) var(--rift-uploads-progress,0%),transparent 0)}
.rift-uploads-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.rift-uploads-size{flex:none}
.rift-uploads-file.is-failed{border-color:currentColor;opacity:.6}
.rift-uploads :is(.rift-uploads-remove,.rift-uploads-link,.rift-uploads-picture){margin:0;padding:0;border:0;background:none;box-shadow:none;color:inherit;font:inherit;text-transform:none;cursor:pointer}
.rift-uploads .rift-uploads-remove{flex:none;margin-left:auto;font-size:14px;line-height:1}
.rift-uploads-file.is-busy .rift-uploads-remove{visibility:hidden}
.rift-uploads-done{display:flex;flex-wrap:wrap;gap:6px}
.rift-uploads .rift-uploads-picture{display:block;line-height:0}
.rift-uploads-picture img{max-width:120px;max-height:90px;border:1px solid var(--rift-chat-line)}
.rift-uploads-picture:hover img{border-color:var(--rift-chat-accent)}
.rift-uploads-hint,.rift-uploads-note{margin:0}
.rift-uploads-note{grid-column:1/-1}
.rift-uploads-note:empty{display:none}
.rift-uploads-footer{grid-column:1/-1;display:flex;justify-content:flex-end;gap:20px}
.rift-uploads .rift-uploads-link{color:var(--rift-chat-muted)}
.rift-uploads .rift-uploads-link:hover{color:var(--rift-chat-text);text-decoration:underline}
@media (max-width:600px){.rift-uploads{width:auto;max-width:none;grid-template-columns:minmax(0,1fr)}.rift-uploads-footer{flex-wrap:wrap;gap:8px 16px}}

/* «Загрузки»: the pictures in tiles, each with its code to copy. */
.rift-uploads-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px}
.rift-uploads-tile{display:flex;flex-direction:column;gap:4px;min-width:0}
.rift-uploads-tile img{display:block;max-width:100%;max-height:120px;margin:0 auto}
.rift-uploads-code{box-sizing:border-box;width:100%;font-size:10px}
.rift-uploads-delete{margin-top:10px}
