/* =========================================================
   traducao.css — botão de idioma e lista de idiomas (js/traducao.js)
   + esconde a barra e os balões que o Google Tradutor coloca na página.
   A lista tem cores próprias (fica igual em qualquer tema do cardápio).
   ========================================================= */

/* ---------- Google: sem barra no topo, sem balão, sem destaque ---------- */
#tr-google, #goog-gt-tt, .goog-te-balloon-frame, .goog-te-banner-frame, iframe.skiptranslate, .skiptranslate > iframe,
.VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf, .VIpgJd-yAWNEb-L7lbkb { display: none !important; }
html, body { top: 0 !important; }
/* o Google deixa o <body> "relative"; alguns temas desenham o fundo (body::before/after) contando com ele normal */
html.translated-ltr body, html.translated-rtl body { position: static !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* ---------- globo no topo dos painéis (ao lado do sol/lua) ---------- */
.tr-btn {
  position: relative; display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer; background: transparent; color: var(--ink, #241b16);
  box-shadow: inset 0 0 0 1px var(--line-strong, #dccfbd); transition: background .2s, transform .15s;
}
.tr-btn:hover, .tr-btn[aria-expanded="true"] { background: var(--primary-soft, #f6ece8); }
.tr-btn:active { transform: scale(.94); }
/* idioma escolhido: a sigla num selinho (EN, ES…) */
.tr-btn[data-idioma]:not([data-idioma=""])::after {
  content: attr(data-idioma); position: absolute; right: -5px; bottom: -4px; min-width: 18px; padding: 1px 4px;
  border-radius: 999px; background: var(--primary, #b8452c); color: #fff; font-size: .58rem; font-weight: 800; line-height: 1.3;
  box-shadow: 0 0 0 2px var(--surface, #fff);
}

/* ---------- cardápio: botão no canto superior direito da PÁGINA (globo + sigla), igual em todos os temas ----------
   Mesmo "vidro escuro" do convite do topo (css/rodape.css): legível sobre qualquer tema. */
.tr-flutua {
  position: absolute; z-index: 60; top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right));   /* no alto da página: sobe junto ao rolar (pedido do dono) */
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px 0 8px; border: 0; border-radius: 999px;
  background: rgba(16, 12, 10, .74); color: #fff; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18), 0 6px 16px -8px rgba(0, 0, 0, .55);
  font: 700 11.5px/1 "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: .03em; text-transform: none;
  -webkit-tap-highlight-color: transparent; transition: background .15s, transform .15s;
}
.tr-flutua:hover, .tr-flutua[aria-expanded="true"] { background: rgba(16, 12, 10, .9); }
.tr-flutua:active { transform: scale(.95); }
.tr-flutua:focus-visible { outline: 3px solid #ffe08a; outline-offset: 2px; }
.tr-flutua svg { flex: none; color: #ffe08a; }
/* o convite do topo (centralizado) não fica embaixo do botão no celular */
@media (max-width: 480px) { body.menu .cv-topo { margin-left: 10px; margin-right: auto; max-width: calc(100% - 86px); } }

/* ---------- lista de idiomas ---------- */
.tr-painel {
  position: fixed; z-index: 2147483000; width: 300px; max-height: min(460px, calc(100vh - 90px));
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; color: #241b16; border: 1px solid #e7dccd; border-radius: 18px;
  box-shadow: 0 18px 50px -12px rgba(20, 14, 10, .35), 0 2px 8px rgba(20, 14, 10, .08);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.35;
  text-align: left; letter-spacing: normal; text-transform: none; animation: tr-abre .16s ease-out;
}
@keyframes tr-abre { from { opacity: 0; transform: translateY(-6px); } }
.tr-topo { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 6px 16px; }
.tr-topo strong { font-size: 1rem; font-weight: 800; }
.tr-x { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #f3ede4; color: #241b16; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.tr-x:hover { background: #eadfd1; }
.tr-busca { position: relative; display: block; margin: 0 12px 8px; }
.tr-busca svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #85766a; pointer-events: none; }
.tr-busca input {
  width: 100%; box-sizing: border-box; padding: 9px 12px 9px 36px; border: 1px solid transparent; border-radius: 999px;
  background: #f6f1ea; color: #241b16; font: inherit; font-size: .9rem; outline: none;
}
.tr-busca input:focus { background: #fff; border-color: #dccfbd; }
.tr-lista { list-style: none; margin: 0; padding: 0 6px 8px; overflow-y: auto; overscroll-behavior: contain; }
.tr-lista button {
  width: 100%; display: flex; align-items: baseline; gap: 8px; padding: 8px 10px; border: 0; border-radius: 10px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.tr-lista button:hover, .tr-lista button:focus-visible { background: #f6efe6; outline: none; }
.tr-lista button[aria-selected="true"] { background: #fbe9e3; }
.tr-nativo { font-weight: 700; }
.tr-pt { color: #85766a; font-size: .82rem; }
.tr-lista i { margin-left: auto; font-style: normal; font-weight: 900; color: #b8452c; }
.tr-grupo { padding: 10px 10px 4px; color: #85766a; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.tr-nada { padding: 16px 10px; color: #85766a; text-align: center; }

/* celular: folha que sobe de baixo */
.tr-painel.tr-folha {
  left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 72vh; border-radius: 22px 22px 0 0;
  padding-bottom: env(safe-area-inset-bottom); animation: tr-sobe .2s ease-out;
}
@keyframes tr-sobe { from { transform: translateY(30%); opacity: .4; } }
.tr-folha .tr-lista button { padding: 11px 12px; }
@media (prefers-reduced-motion: reduce) { .tr-painel { animation: none !important; } }

@media (max-width: 520px) {
  .tr-btn { width: 34px; height: 34px; }
  .tr-btn svg { width: 18px; height: 18px; }
}

/* painéis: o globo no pé do menu lateral, com o mesmo jeito dos outros ícones do menu (.grp, css/menu-lateral.css) */
.tr-rot { display: none; }
.side-idioma { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line, #ebe1d3); }
.side-idioma .tr-btn {
  width: 100%; height: auto; display: flex; align-items: center; justify-content: flex-start; gap: 12px;
  padding: .72rem .85rem; border-radius: 12px; box-shadow: none; background: none;
  font: inherit; font-weight: 700; color: var(--muted, #85766a); text-align: left; white-space: nowrap;
}
.side-idioma .tr-btn:hover, .side-idioma .tr-btn[aria-expanded="true"] { background: var(--primary-soft, #f6ece8); color: var(--ink, #241b16); }
.side-idioma .tr-btn svg { width: 20px; height: 20px; }
.side-idioma .tr-rot { display: inline; }
.side-idioma .tr-btn::after { position: static; margin-left: auto; box-shadow: none; }
/* menu recolhido (só ícones): só o globo, centralizado; a sigla vira selinho no canto */
body.side-recolhido .side-idioma .tr-btn { justify-content: center; padding: .72rem 0; }
body.side-recolhido .side-idioma .tr-rot { display: none; }
body.side-recolhido .side-idioma .tr-btn::after { position: absolute; top: 3px; right: 8px; margin: 0; }
@media (max-width: 760px) {                          /* celular: o menu é a gaveta do ☰, sempre com os nomes */
  body.side-recolhido .side-idioma .tr-btn { justify-content: flex-start; padding: .72rem .85rem; }
  body.side-recolhido .side-idioma .tr-rot { display: inline; }
  body.side-recolhido .side-idioma .tr-btn::after { position: static; margin-left: auto; }
}

/* painel do restaurante: o Idioma é uma aba da engrenagem Configurações (28/11/2026); o globo vira um botão com o nome */
.tr-lugar .tr-btn {
  display: inline-flex; width: auto; height: auto; gap: 10px; padding: .75rem 1.3rem; border-radius: 999px;
  font: inherit; font-weight: 700; color: var(--ink, #241b16); box-shadow: inset 0 0 0 1px var(--line-strong, #dccfbd);
}
.tr-lugar .tr-btn svg { width: 20px; height: 20px; }
.tr-lugar .tr-rot { display: inline; }
.tr-lugar .tr-btn::after { position: static; box-shadow: none; }
