/* GG Call — estilos dos recursos adicionados depois da primeira versão (carregado após styles.css). */

/* ---------- tema preto e ajustes de tema */
[data-theme='amoled'] {
  --bg-rail: #000;
  --bg-sidebar: #0a0a0c;
  --bg-account: #050506;
  --bg-chat: #000;
  --bg-input: #1a1b1e;
  --bg-float: #111214;
  --border: rgba(255, 255, 255, 0.09);
}
.icon-btn.flip .icon { transform: rotate(180deg); }

/* ---------- barra de título própria (desktop) */
/* Altura da barra de título: igual à dos botões nativos (titleBarOverlay em src/main/app.js). */
:root { --titlebar-h: 32px; }
.titlebar { display: none; }
.native #app { display: flex; flex-direction: column; }
.native .titlebar {
  display: flex; align-items: center; gap: 8px; flex: none;
  height: var(--titlebar-h); padding: 0 12px; background: var(--bg-rail); color: var(--text-muted);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  -webkit-app-region: drag; user-select: none;
}
.native .titlebar svg { color: var(--brand); }
.native .shell, .native .auth-screen, .native .splash { flex: 1; min-height: 0; height: auto; }
.native.os-darwin .titlebar { padding-left: 78px; }
/* Aviso discreto do modo seguro para jogos da Riot (app.js → applyRiot), no meio da barra de título. */
.riot-safe-pill {
  position: fixed; top: 5px; left: 50%; transform: translateX(-50%); z-index: 50;
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 10px; border-radius: 11px;
  background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green);
  font-size: 0.6875rem; font-weight: 600; white-space: nowrap; cursor: default; -webkit-app-region: no-drag;
}
.riot-safe-pill[hidden] { display: none; }
/* ---------- dicas */
.tooltip {
  position: fixed; z-index: 400; max-width: 260px; padding: 6px 10px; border-radius: 6px;
  background: var(--bg-float); color: var(--text-strong); font-size: 0.8125rem; font-weight: 600;
  box-shadow: var(--shadow); border: 1px solid var(--border); pointer-events: none;
  animation: tip-in 0.1s ease-out;
}
@keyframes tip-in { from { opacity: 0; transform: scale(0.96); } }

/* ---------- avatares e ícones */
.avatar { overflow: visible; }
.avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar.group-avatar { width: 32px; height: 32px; background: var(--brand); }
.rail-btn.has-icon { background: none; }
.rail-btn img { width: 100%; height: 100%; object-fit: cover; }
.avatar-btn { border-radius: 50%; height: 40px; }
.avatar-btn:hover { filter: brightness(1.1); }

/* ---------- barra de canais */
.section-head.category { padding-left: 0; }
.category-toggle { display: flex; align-items: center; gap: 2px; min-width: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; }
.category-toggle:hover { color: var(--text-strong); }
.category-toggle span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-wrap.is-thread .nav-row { margin-left: 24px; width: calc(100% - 24px); min-height: 28px; font-size: 0.875rem; }
.nav-main .icon:last-child:not(:first-child) { opacity: 0.6; }
.dragging { opacity: 0.4; }
.drop-before { box-shadow: 0 -2px 0 var(--brand); }
.drop-after { box-shadow: 0 2px 0 var(--brand); }
button.voice-user { width: 100%; border-radius: 4px; text-align: left; }
button.voice-user:hover { background: var(--bg-hover); color: var(--text-strong); }
.voice-note { font-size: 0.6875rem; color: var(--text-muted); margin-top: 4px; }
.voice-ping { display: inline-flex; align-items: center; gap: 4px; padding: 0 4px; flex: none; white-space: nowrap; font-size: 0.6875rem; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.voice-ping.good { color: var(--green); }
.voice-ping.ok { color: var(--yellow); }
.voice-ping.bad { color: var(--red); }
.live-tag.muted { background: var(--grey); }
.stream-preview { position: fixed; z-index: 350; width: 320px; padding: 8px; border-radius: 8px; background: var(--bg-float); box-shadow: var(--shadow); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.stream-preview img { width: 100%; border-radius: 4px; background: #000; }
.stream-preview strong { font-size: 0.8125rem; color: var(--text-strong); }

/* ---------- barra superior */
.crumb { color: var(--text-channel); font-size: 0.875rem; }
.crumb:hover { color: var(--text-strong); text-decoration: underline; }

/* ---------- mensagens */
.msg-author { font-weight: 600; text-align: left; }
.msg-author:hover { text-decoration: underline; }
.msg.pinned { box-shadow: inset 2px 0 0 var(--brand); }
.pin-tag { color: var(--text-muted); display: inline-flex; }
.msg.blocked { margin-top: 4px; color: var(--text-muted); }
.msg.blocked .msg-gutter { align-items: center; }
.emoji-custom { width: 1.375em; height: 1.375em; vertical-align: -0.3em; object-fit: contain; }
.channel-link { cursor: pointer; font: inherit; }
.channel-link:hover { text-decoration: underline; }
.thread-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; padding: 6px 10px; border-radius: 6px; background: var(--bg-sidebar); font-size: 0.875rem; color: var(--text-channel); }
.thread-link strong { color: var(--text-strong); }
.thread-link:hover span { text-decoration: underline; }
.attachments, .embeds { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; align-items: flex-start; }
.attach-image { display: block; max-width: 100%; border-radius: 8px; overflow: hidden; background: var(--bg-sidebar); cursor: zoom-in; }
.attach-image img { display: block; width: 100%; height: 100%; max-width: 400px; max-height: 300px; object-fit: contain; }
.attach-image[style*='aspect-ratio'] img { max-width: none; max-height: none; object-fit: cover; }
.attach-video { max-width: min(480px, 100%); max-height: 320px; border-radius: 8px; background: #000; }
.attach-file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; background: var(--bg-sidebar); border: 1px solid var(--border); max-width: min(420px, 100%); color: var(--text-channel); }
.attach-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.attach-info a, .attach-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-info small { color: var(--text-muted); font-size: 0.75rem; }
.attach-info audio { height: 32px; max-width: 100%; }
.embed { display: flex; gap: 12px; max-width: min(520px, 100%); padding: 10px 12px; border-radius: 4px; background: var(--bg-sidebar); border-left: 4px solid var(--bg-active); }
.embed.has-video { flex-direction: column; }
.embed-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.embed-text small { color: var(--text-muted); font-size: 0.75rem; }
.embed-text a { font-weight: 600; overflow-wrap: anywhere; }
.embed-text p { font-size: 0.875rem; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.embed-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; flex: none; }
.embed-video { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: #000; }
.embed-video img { width: 100%; height: 100%; object-fit: cover; }
.play-badge { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; background: rgba(0, 0, 0, 0.7); color: #fff; font-size: 1.25rem; display: flex; align-items: center; justify-content: center; }
.embed-video:hover .play-badge { background: var(--brand); }
.embed-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 4px; }

/* ---------- campo de envio */
.chat { position: relative; }
.composer { position: relative; }
.composer-host { position: relative; }
.composer-row.locked { opacity: 0.6; }
.composer-row .attach { align-self: flex-end; margin-left: -8px; }
.pending-files { display: flex; gap: 8px; padding: 10px; overflow-x: auto; background: var(--bg-input); border-radius: 8px 8px 0 0; border-bottom: 1px solid var(--border); }
.pending-files:not([hidden]) + .composer-row { border-radius: 0 0 8px 8px; }
.reply-bar:not([hidden]) + .pending-files { border-radius: 0; }
.pending-file { position: relative; flex: none; width: 150px; padding: 8px; border-radius: 6px; background: var(--bg-sidebar); display: flex; flex-direction: column; gap: 4px; color: var(--text-channel); }
.pending-file img { width: 100%; height: 84px; object-fit: contain; border-radius: 4px; background: var(--bg-rail); }
.pending-file > .icon { margin: 28px auto; }
.pending-name { font-size: 0.8125rem; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-file small { font-size: 0.6875rem; color: var(--text-muted); }
.pending-file.failed small { color: var(--red); }
.pending-bar { height: 4px; border-radius: 2px; background: var(--bg-active); overflow: hidden; }
.pending-bar i { display: block; height: 100%; background: var(--brand); }
.pending-remove { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; background: var(--bg-float); }
.drop-hint { display: none; position: absolute; inset: 8px; z-index: 5; border-radius: 12px; border: 2px dashed var(--brand); background: rgba(88, 101, 242, 0.25); color: #fff; align-items: center; justify-content: center; flex-direction: column; gap: 12px; font-size: 1.125rem; pointer-events: none; }
.chat.dropping .drop-hint { display: flex; }
.autocomplete { position: absolute; left: 0; right: 0; bottom: 8px; z-index: 10; max-height: 300px; overflow-y: auto; padding: 8px; border-radius: 8px; background: var(--bg-float); box-shadow: var(--shadow); border: 1px solid var(--border); }
.autocomplete-head { padding: 4px 8px; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); }
.autocomplete-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 4px; cursor: pointer; color: var(--text-channel); }
.autocomplete-item.active { background: var(--bg-active); color: var(--text-strong); }
.autocomplete-item small { color: var(--text-muted); font-size: 0.75rem; }
.ac-emoji { font-size: 1.25rem; width: 24px; text-align: center; }

/* ---------- seletor de emojis e GIFs */
.picker { position: fixed; z-index: 220; width: 372px; height: 420px; max-height: calc(100vh - 16px); display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 8px; background: var(--bg-float); box-shadow: var(--shadow); border: 1px solid var(--border); }
.picker .tabs { margin-bottom: 0; }
.picker-body { flex: 1; min-height: 0; overflow-y: auto; }
.picker-head { margin: 8px 0 4px; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); }
.emoji-grid-full { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-btn { aspect-ratio: 1; font-size: 1.375rem; border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.emoji-btn img { width: 26px; height: 26px; object-fit: contain; }
.emoji-btn:hover, .emoji-btn:focus-visible { background: var(--bg-active); outline: none; }
.gif-grid { columns: 2; column-gap: 6px; }
.gif-btn { display: block; width: 100%; margin-bottom: 6px; border-radius: 6px; overflow: hidden; background: var(--bg-sidebar); }
.gif-btn img { display: block; width: 100%; }
.gif-btn:hover, .gif-btn:focus-visible { outline: 2px solid var(--brand); }

/* ---------- amigos e pessoas */
.people-tabs { flex: none; gap: 8px; }
.people-tabs .tab { display: inline-flex; align-items: center; gap: 6px; }
.people-tabs .tab.accent { color: var(--green); }
.people-tabs .tab.accent.active { border-bottom-color: var(--green); }
.people-title { font-size: 1rem; color: var(--text-strong); margin: 8px 0; text-transform: uppercase; }
.person-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; }
.person-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.person-check { align-items: center; }

/* ---------- cartão de perfil */
.user-card { position: fixed; z-index: 210; width: 320px; max-height: calc(100vh - 16px); overflow-y: auto; border-radius: 10px; background: var(--bg-float); box-shadow: var(--shadow); border: 1px solid var(--border); }
.card-banner { height: 60px; opacity: 0.85; }
.card-avatar { margin: -36px 0 0 16px; display: inline-flex; border-radius: 50%; padding: 4px; background: var(--bg-float); }
.card-avatar .status-dot { width: 20px; height: 20px; border-color: var(--bg-float); border-width: 4px; }
.card-body { padding: 4px 16px 16px; }
.card-body h3 { font-size: 1.125rem; color: var(--text-strong); }
.card-username { font-size: 0.8125rem; color: var(--text-channel); }
.card-status { margin-top: 8px; font-size: 0.875rem; }
.card-activity { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px; border-radius: 6px; background: var(--bg-sidebar); font-size: 0.875rem; }
.card-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--bg-active); }
.card-section h4 { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; color: var(--text-channel); margin: 0 0 6px; }
.card-bio { font-size: 0.875rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.role-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.role-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 4px; background: var(--bg-sidebar); font-size: 0.75rem; white-space: nowrap; flex: none; }
.role-chip i, .role-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; margin-right: 2px; }
.volume-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.volume-row input { flex: 1; accent-color: var(--brand); }
.card-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.card-actions .icon-btn { margin-left: auto; }

/* ---------- painel lateral */
.search-result { display: flex; flex-direction: row; align-items: flex-start; padding: 0; }
.result-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px; text-align: left; }
.result-action { margin: 6px 6px 0 0; }
.member small { display: flex; align-items: center; gap: 4px; }

/* ---------- chamada */
.tile-buttons { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity 0.12s; }
.tile:hover .tile-buttons, .tile:focus-within .tile-buttons { opacity: 1; }
.tile-buttons .icon-btn { background: rgba(0, 0, 0, 0.65); color: #fff; }
.tile-wait { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; text-align: center; }

/* ---------- configurações: ui-forms.css */
.auth-card .forgot { display: block; margin: -8px 0 16px; }
