/* ===== v1.1 ===== */
body.has-update .screen { top: 70px; }
#update-bar { position: absolute; top: 30px; left: 0; right: 0; height: 40px; background: var(--blurple); color: #fff; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; z-index: 50; padding: 0 12px; }
#update-bar .small-btn { padding: 5px 12px; font-size: 13px; background: #ffffff26; }
#update-bar .small-btn.primary { background: #fff; color: var(--blurple-h); }
#update-bar .icon-btn { color: #fff; }
.up-bar { width: 200px; height: 6px; background: #ffffff40; border-radius: 3px; overflow: hidden; }
.up-bar div { height: 100%; width: 0; background: #fff; transition: width .2s; }
.notes { line-height: 1.5; white-space: normal; }

/* categorias e canais */
.cat { display: flex; align-items: center; justify-content: space-between; }
.cat-add { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; border-radius: 3px; }
.cat-add:hover { color: var(--text-hi); }
.channel .cn { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel .ch-edit { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px; display: none; border-radius: 3px; }
.channel:hover .ch-edit { display: flex; }
.channel .ch-edit:hover { color: var(--text-hi); }
.channel.unread { color: var(--text-hi); font-weight: 700; position: relative; }
.channel.unread::before { content: ''; position: absolute; left: -8px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 0 4px 4px 0; background: var(--text-hi); }
.channel .timer { margin-left: 0; }
.voice-users { padding-left: 24px; margin-bottom: 4px; }

/* botões de voz */
.vp-btn.on { background: var(--green); color: #fff; }

/* cartões de canais de voz (fora da call) */
.vc-cards { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 720px; }
.vc-card { background: var(--bg-rail); border-radius: 12px; padding: 16px; width: 210px; display: flex; flex-direction: column; gap: 8px; align-items: center; cursor: pointer; border: 1px solid var(--bg-side); }
.vc-card:hover { border-color: var(--green); }
.vc-card .vc-name { display: flex; gap: 6px; align-items: center; font-weight: 700; color: var(--text-hi); }
.vc-card .avatars { display: flex; min-height: 36px; padding-left: 10px; }
.vc-card .avatars .avatar { width: 36px; height: 36px; font-size: 14px; border: 3px solid var(--bg-rail); margin-left: -10px; }
.vc-card .muted { text-align: center; }


/* miniaturas de tela no canto */
#pips { position: absolute; right: 16px; bottom: 96px; display: flex; flex-direction: column; gap: 10px; z-index: 5; }
#pips .tile { width: 240px; height: 135px; aspect-ratio: auto; box-shadow: 0 6px 20px #000c; border: 1px solid #ffffff1a; cursor: zoom-in; }
#pips .tile .live { top: 6px; left: 6px; font-size: 11px; }
#pips .tile .label { bottom: 6px; left: 6px; font-size: 11px; padding: 2px 6px; }
#pips .tile .tile-tools button { width: 26px; height: 26px; }
.focus-main .tile.is-screen { cursor: zoom-out; }

/* mensagens: ferramentas, respostas, menções, edição */
.msg .msg-tools { position: absolute; right: 16px; top: -14px; display: none; background: var(--bg-main); border: 1px solid var(--line2); border-radius: 6px; box-shadow: 0 2px 8px #0005; overflow: hidden; z-index: 2; }
.msg:hover .msg-tools { display: flex; }
.msg-tools button { background: none; border: 0; color: var(--icon); width: 32px; height: 30px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.msg-tools button:hover { background: var(--hover); color: var(--text-hi); }
.msg-tools button.danger:hover { color: var(--red); }
.msg.mentioned { background: #f0b2321a; box-shadow: inset 2px 0 0 var(--yellow); }
.msg.mentioned:hover { background: #f0b23226; }
.msg.flash { animation: flash 1.5s; }
@keyframes flash { 0%, 60% { background: #5865f24d; } }
.mention { background: #5865f24d; color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.mention.me { background: #f0b23240; color: #ffd98a; }
.edited { font-size: 11px; color: var(--muted); margin-left: 4px; }
.reply-ref { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 0 0 4px -2px; cursor: pointer; min-width: 0; }
.reply-ref .ic { flex: none; transform: scaleX(-1); }
.reply-ref span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-ref:hover span { color: var(--text); }
.msg.head .reply-ref + .avatar { top: 26px; }
.edit-box textarea { width: 100%; background: var(--bg-input); border: 0; border-radius: 6px; padding: 10px; outline: none; resize: none; line-height: 1.375; }
.edit-box a { color: var(--link); cursor: pointer; }
#reply-bar { background: var(--bg-side); border-radius: 8px 8px 0 0; padding: 8px 12px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
#reply-bar:not(.hidden) ~ .composer-row { border-radius: 0 0 8px 8px; }
#composer { position: relative; }
#mention-pop { position: absolute; left: 16px; right: 16px; bottom: 100%; margin-bottom: 6px; background: var(--bg-side); border-radius: 8px; padding: 6px; box-shadow: 0 8px 24px #0008; z-index: 10; }
.mp-title { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); padding: 4px 8px; }
.mp-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 4px; cursor: pointer; }
.mp-item .avatar { width: 24px; height: 24px; font-size: 11px; }
.mp-item.sel, .mp-item:hover { background: var(--active); }
.at-all { background: var(--btn); }

/* menus */
#ctx-menu { width: 280px; }
#ctx-menu .ctx-title { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); padding: 4px 6px 8px; }
#ctx-menu .ctx-sep { height: 1px; background: var(--line2); margin: 6px 0; }
#ctx-menu .ctx-item.danger { color: var(--red); }
#ctx-menu .ctx-item.danger:hover { background: var(--red); color: #fff; }
#ctx-menu .ctx-item.dev span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ctx-menu .ctx-item.dev.sel { color: var(--text-hi); }

/* configurações: filtros e ruído */
.ns-box { background: var(--bg-side); border-radius: 8px; padding: 12px; margin-top: 6px; }
.check.big { align-items: flex-start; margin-bottom: 10px; }
.check.big input { margin-top: 2px; flex: none; }
.fx-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.fx-btn { background: var(--bg-side); border: 2px solid transparent; border-radius: 8px; padding: 14px 6px; cursor: pointer; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.fx-btn span { font-size: 11px; color: var(--muted); font-weight: 500; }
.fx-btn:hover { background: var(--hover); }
.fx-btn.sel { border-color: var(--blurple); background: #5865f222; }
.tp.hidden { display: none; }
#st-monitor { display: flex; align-items: center; gap: 6px; }

@keyframes spin { to { transform: rotate(360deg); } }

#mention-pop { max-height: min(310px, 40vh); overflow-y: auto; }
#mention-pop .mp-item { color: var(--text-hi); font: inherit; text-align: start; width: 100%; border: 0; background: transparent; }
#mention-pop .mp-item:is(.sel,:hover) { background: var(--active); }
.web-viewer #mention-pop .mp-item { min-height: 44px; }
#chat .msg.chat-jump { outline: 2px solid var(--link); outline-offset: -2px; background: var(--accent-soft); }
html[data-skin] #main[data-shared-chat][data-right-open=true] > #chat { display: flex !important; position: absolute; visibility: visible; z-index: 25; inset: 12px 12px 12px auto; width: min(440px, calc(100% - 24px)); box-shadow: 0 12px 36px #0005; }
