/* src/styles/topo.css
   Parte de cima do Gmail no estilo Simplify (opção "topoLimpo" → html[data-cl-topo-limpo="on"]).
   Só CSS: nada é inserido no Gmail. Peças do Gmail usadas (podem mudar com atualizações do Google):
     header#gb                       = faixa de cima (menu ☰, logo, busca, botões da direita)
     a[aria-label="Gmail"]            = logo
     .aeN .V6                         = itens Mail · Chat · Meet da coluna à esquerda
     [role="main"] .G-atb             = barra de ferramentas da lista (☐ ⟳ ⋮ … 1–50 de N)
     .aic:has(.T-I.T-I-KE)            = área do botão "Escrever" (some; o lápis do Gary aciona o botão) */

/* ---------- Some com o que não ajuda a ler e-mail ----------
   O botão do Gemini FICA, de propósito. Os nomes valem para o Gmail em português e inglês. */
html[data-cl-topo-limpo="on"] header#gb a[aria-label="Gmail"],
html[data-cl-topo-limpo="on"] header#gb a[title="Gmail"],
html[data-cl-topo-limpo="on"] header#gb [aria-label^="Status:"],
html[data-cl-topo-limpo="on"] header#gb [aria-label="Suporte"],
html[data-cl-topo-limpo="on"] header#gb [aria-label="Support"],
html[data-cl-topo-limpo="on"] header#gb [aria-label="Studio"],
html[data-cl-topo-limpo="on"] header#gb .gcpSp,
html[data-cl-topo-limpo="on"] header#gb [aria-label*="Upgrade" i],
html[data-cl-topo-limpo="on"] header#gb button[role="link"],
html[data-cl-topo-limpo="on"] header#gb a[aria-label="Google Apps"],
html[data-cl-topo-limpo="on"] header#gb a[aria-label="Google apps"] {
  display: none !important;
}

/* Coluna Mail · Chat · Meet: só os itens dela (.V6). O bloco .aeN também guarda a lista
   de pastas (Caixa de entrada, Enviados…), então ele NÃO pode sumir inteiro. */
html[data-cl-topo-limpo="on"] .aeN .Xa:has(> .V6),
html[data-cl-topo-limpo="on"] .aeN .V6 {
  display: none !important;
}

/* ---------- Barra de ferramentas da lista sobe para a faixa de cima ----------
   (como no Simplify: ☐ ⟳ ⋮ ao lado do menu ☰; a paginação vai junto, no fim) */
html[data-cl-topo-limpo="on"] [role="main"] .G-atb {
  position: fixed !important;
  top: 8px;
  left: 64px;
  z-index: 1000;
  height: 48px;
  width: var(--cl-topo-barra, 236px);
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-cl-topo-limpo="on"] [role="main"] .G-atb .aqL {
  flex: 0 0 auto;
}

/* ---------- Busca no centro da faixa de cima ---------- */
html[data-cl-topo-limpo="on"] header#gb div:has(> form[role="search"]) {
  flex: 1 1 auto !important;
  display: flex !important;
  justify-content: center !important;
  max-width: none !important;
}
html[data-cl-topo-limpo="on"] header#gb form[role="search"] {
  flex: 0 1 720px !important;
  max-width: 720px !important;
}

/* ---------- "Escrever": o botão grande some; no lugar, o lápis do Gary (lapis.js) ----------
   O botão do Gmail fica preso dentro do painel lateral e não dá para movê-lo só com CSS. */
html[data-cl-topo-limpo="on"] .aic:has(.T-I.T-I-KE) {
  display: none !important;
}
.cl-lapis {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 18px;
  background: #c2e7ff;
  color: #001d35;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  font-size: 22px;
  line-height: 56px;
  cursor: pointer;
}
.cl-lapis:hover { filter: brightness(0.96); }
html[data-cl-tema="escuro"] .cl-lapis { background: #004a77; color: #c2e7ff; }
