/* v=20261119-1910 — dropdown local; carregar após style.css. Sem build. */
/* Os estilos do botão/summary originais são mantidos: sem font/padding reset. */
[data-rnv-theme="rede"] {
  --rnv-panel: #fff;
  --rnv-text: #0d3b46;
  --rnv-hover-bg: #e3f1ef;
  --rnv-hover-text: #0d3b46;
  --rnv-border: rgba(13, 59, 70, .15);
  --rnv-highlight: #1c7c83;
}
[data-rnv-theme="elos"] {
  --rnv-panel: var(--color-cream, #f8f4ea);
  --rnv-text: #0d3b46;
  --rnv-hover-bg: var(--color-primary, #14283c);
  --rnv-hover-text: #fff;
  --rnv-border: rgba(13, 59, 70, .15);
  --rnv-highlight: var(--color-gold, #c9a04a);
}
[data-rnv-theme="grupo"] {
  --rnv-panel: var(--color-primary-dark, #072a33);
  --rnv-text: #fff;
  --rnv-hover-bg: var(--color-gold, #c3913a);
  --rnv-hover-text: var(--color-primary-dark, #072a33);
  --rnv-border: rgba(255, 255, 255, .16);
  --rnv-highlight: var(--color-gold, #c3913a);
}

.rnv-units-desktop { position: relative; }
.rnv-units-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  min-height: 44px;
  cursor: pointer;
}
.rnv-units-chevron {
  display: block;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  transition: transform 150ms ease;
}
.rnv-units-trigger[aria-expanded="true"] .rnv-units-chevron,
.rnv-units-mobile[open] > summary .rnv-units-chevron {
  transform: rotate(180deg);
}
/* Não sobrescreve hover/color do r-navlink, g-navlink ou pill Elos. */
.rnv-units-trigger:focus-visible {
  outline: 2px solid var(--rnv-highlight);
  outline-offset: 3px;
}

.rnv-units-popup {
  position: absolute;
  z-index: 60;
  top: 100%;
  left: 0;
  width: 264px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 112px);
  max-height: calc(100svh - 112px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--rnv-border);
  background: var(--rnv-panel);
  color: var(--rnv-text);
  box-shadow: 0 16px 32px rgba(7, 42, 51, .2);
  text-align: left;
  text-transform: none;
  letter-spacing: .025em;
  white-space: normal;
}
[data-rnv-theme="rede"] > .rnv-units-popup { border-radius: 18px; }
[data-rnv-theme="elos"] > .rnv-units-popup { border-radius: 20px; }
[data-rnv-theme="grupo"] > .rnv-units-popup {
  border-top: 3px solid var(--rnv-highlight);
}
.rnv-units-popup[hidden] { display: none !important; }
.rnv-units-popup a,
.rnv-units-mobile-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 14px;
  color: var(--rnv-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  text-transform: none;
  letter-spacing: .025em;
  transition: background-color 150ms ease, color 150ms ease;
}
[data-rnv-theme="rede"] .rnv-units-popup a,
[data-rnv-theme="elos"] .rnv-units-popup a,
[data-rnv-theme="rede"] .rnv-units-mobile-links a,
[data-rnv-theme="elos"] .rnv-units-mobile-links a { border-radius: 12px; }
.rnv-units-popup a:focus-visible,
.rnv-units-mobile-links a:focus-visible {
  outline: 2px solid var(--rnv-highlight);
  outline-offset: -2px;
  background: var(--rnv-hover-bg);
  color: var(--rnv-hover-text);
}

/* Somente o container mobile decorado pelo helper recebe scroll. */
@media (max-width: 1023.98px) {
  #menu-mobile[data-rnv-theme="rede"] {
    max-height: calc(100vh - 84px);
    max-height: calc(100svh - 84px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
  #menu-mobile[data-rnv-theme="elos"] {
    max-height: calc(100vh - 76px);
    max-height: calc(100svh - 76px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
}
@media (max-width: 1279.98px) {
  #menu-mobile[data-rnv-theme="grupo"] {
    max-height: calc(100vh - 80px);
    max-height: calc(100svh - 80px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
}

.rnv-units-mobile {
  color: var(--rnv-text);
  background: var(--rnv-panel);
}
.rnv-units-mobile[data-rnv-theme="rede"] { border-radius: 16px; }
.rnv-units-mobile[data-rnv-theme="grupo"] {
  border-bottom: 1px solid var(--rnv-border);
}
.rnv-units-mobile > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  list-style: none;
  cursor: pointer;
}
.rnv-units-mobile[data-rnv-theme="grupo"] > summary { padding: 16px 0; }
.rnv-units-mobile > summary::marker { content: ""; }
.rnv-units-mobile > summary::-webkit-details-marker { display: none; }
.rnv-units-mobile > summary:focus-visible {
  outline: 2px solid var(--rnv-highlight);
  outline-offset: -2px;
}
.rnv-units-mobile[data-rnv-theme="grupo"][open] > summary {
  color: var(--rnv-highlight);
}
.rnv-units-mobile-links {
  margin: 0 0 12px;
  padding: 0 0 0 10px;
  list-style: none;
  border-left: 2px solid var(--rnv-highlight);
}

@media (hover: hover) and (pointer: fine) {
  .rnv-units-popup a:hover,
  .rnv-units-mobile-links a:hover {
    background: var(--rnv-hover-bg);
    color: var(--rnv-hover-text);
  }
}
@media (prefers-reduced-motion: reduce) {
  .rnv-units-chevron,
  .rnv-units-popup a,
  .rnv-units-mobile-links a { transition: none; }
}
