/* ============================================================
   Augusto Castro Advocacia — seletor de idiomas
   Visual do design system (ink / dourado / IBM Plex Mono)
   + regras de layout invertido (RTL) para o árabe
   ============================================================ */

.acg-lang {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  font-family: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

/* botão */
.acg-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 14px;
  background: #1A1A18;
  color: #FBFAF7;
  border: 1px solid rgba(251, 250, 247, .28);
  border-radius: 0;
  font: 500 12px/1 inherit;
  letter-spacing: .1em;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .26);
  transition: border-color .25s ease, color .25s ease, background-color .25s ease;
}
.acg-lang-btn:hover,
.acg-lang-btn:focus-visible {
  border-color: #B0904F;
  color: #B0904F;
}
.acg-lang .acg-fl { font-size: 17px; line-height: 1; }
.acg-lang .acg-cod { letter-spacing: .12em; }

/* menu */
.acg-lang-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  min-width: 190px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #1A1A18;
  border: 1px solid rgba(251, 250, 247, .18);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.acg-lang.aberto .acg-lang-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.acg-lang-menu li { margin: 0; padding: 0; list-style: none; }
.acg-lang-menu li::before { content: none !important; }   /* anula marcadores do tema */

.acg-lang-menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  color: rgba(251, 250, 247, .8);
  font: 400 13px/1.2 inherit;
  letter-spacing: .04em;
  text-align: start;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.acg-lang-menu button:hover,
.acg-lang-menu button:focus-visible { background: rgba(176, 144, 79, .16); color: #FBFAF7; }
.acg-lang-menu button[aria-selected="true"] { color: #B0904F; }
.acg-lang-menu button[aria-selected="true"] .acg-nm { font-weight: 500; }

/* estado de carregamento */
.acg-i18n-carregando body { opacity: .72; transition: opacity .15s ease; }

/* quando existe o botao flutuante do WhatsApp, o seletor sobe */
.acg-lang.acima { bottom: 88px; }

@media (max-width: 600px) {
  .acg-lang { right: 16px; }
  .acg-lang.acima { bottom: 84px; }
  .acg-lang-btn { padding: 10px 12px; }
  .acg-lang-menu { min-width: 170px; }
}

/* ============================================================
   RTL — árabe
   ============================================================ */

html[dir="rtl"] body { direction: rtl; text-align: right; }

/* o seletor e o WhatsApp trocam de lado */
html[dir="rtl"] .acg-lang { right: auto; left: 20px; }
html[dir="rtl"] .acg-lang-menu { right: auto; left: 0; }
html[dir="rtl"] .wa-float { right: auto; left: 20px; }
@media (max-width: 600px) {
  html[dir="rtl"] .acg-lang { left: 16px; }
}

/* tipografia: o árabe pede um corpo um pouco maior e mais respiro */
html[dir="rtl"] body,
html[dir="rtl"] p,
html[dir="rtl"] li,
html[dir="rtl"] .lead,
html[dir="rtl"] .sub {
  font-family: 'Noto Naskh Arabic', 'Geeza Pro', 'Segoe UI', Tahoma, sans-serif;
  line-height: 1.95;
}
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] .brand-name,
html[dir="rtl"] .name {
  font-family: 'Noto Naskh Arabic', 'Geeza Pro', 'Times New Roman', serif;
  letter-spacing: 0;
  line-height: 1.5;
}
/* rótulos em mono ficam ilegíveis em árabe */
html[dir="rtl"] .label,
html[dir="rtl"] .acg-label,
html[dir="rtl"] .meta,
html[dir="rtl"] .sub,
html[dir="rtl"] .brand-sub,
html[dir="rtl"] .credbar li,
html[dir="rtl"] .btn,
html[dir="rtl"] .map-link,
html[dir="rtl"] .more {
  font-family: 'Noto Naskh Arabic', 'Geeza Pro', 'Segoe UI', Tahoma, sans-serif;
  letter-spacing: 0;
  text-transform: none;
}

/* espelha margens e bordas usadas no design */
html[dir="rtl"] .compare-note,
html[dir="rtl"] .docs-note,
html[dir="rtl"] .nicho .destaque,
html[dir="rtl"] blockquote,
html[dir="rtl"] .entry-content blockquote,
html[dir="rtl"] .acg-box {
  border-left: 0;
  border-right: 2px solid #B0904F;
  padding-left: 0;
  padding-right: 24px;
}
html[dir="rtl"] .entry-content ul li,
html[dir="rtl"] .card li,
html[dir="rtl"] .nicho li,
html[dir="rtl"] .doc-group li,
html[dir="rtl"] ul.docs li,
html[dir="rtl"] .guia-card li {
  padding-left: 0;
  padding-right: 28px;
}
html[dir="rtl"] .entry-content ul li::before,
html[dir="rtl"] .card li::before,
html[dir="rtl"] .nicho li::before,
html[dir="rtl"] .doc-group li::before,
html[dir="rtl"] ul.docs li::before,
html[dir="rtl"] .guia-card li::before {
  left: auto;
  right: 0;
}
html[dir="rtl"] .entry-content ol li { padding-left: 0; padding-right: 36px; }
html[dir="rtl"] .entry-content ol li::before { left: auto; right: 0; }

/* setas apontam para o outro lado */
html[dir="rtl"] .lk .ar,
html[dir="rtl"] .more,
html[dir="rtl"] .map-link,
html[dir="rtl"] .alt-link { unicode-bidi: plaintext; }

/* elementos que devem permanecer da esquerda para a direita */
html[dir="rtl"] .searchform input,
html[dir="rtl"] .field input,
html[dir="rtl"] .field textarea,
html[dir="rtl"] a[href^="tel:"],
html[dir="rtl"] a[href^="mailto:"],
html[dir="rtl"] .map-address,
html[dir="rtl"] time {
  direction: ltr;
  text-align: start;
}

/* o mapa e o vídeo não devem espelhar */
html[dir="rtl"] .map-static,
html[dir="rtl"] .hero-video,
html[dir="rtl"] .bg-video { transform: none; }
