/**
 * Menu Mobile Shortcode - Toggle e painel
 */

/* Bloquear scroll do site quando o menu está aberto (só o menu faz scroll) */
html.menu-mobile-open,
body.menu-mobile-open {
  overflow: hidden;
  touch-action: none;
}

.menu-mobile-shortcode-wrap {
  position: relative;
  margin: 0 !important;
  left: -5px;
  top: 2px;
}

/* BotÃ£o Toggle (hamburger) */
.menu-mobile-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: inherit;
  transition: opacity 0.2s;
}

.menu-mobile-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

/* AnimaÃ§Ã£o do Ã­cone quando aberto (X) */
.menu-mobile-shortcode-wrap.is-open .menu-mobile-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-mobile-shortcode-wrap.is-open .menu-mobile-toggle-bar:nth-child(2) {
  opacity: 0;
}

.menu-mobile-shortcode-wrap.is-open .menu-mobile-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Painel do menu - fechado por defeito */
.menu-mobile-shortcode-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: max-height 0.3s ease, opacity 0.2s, visibility 0.2s;
  z-index: 9999;
  background: #fff;
}

.menu-mobile-shortcode-wrap.is-open .menu-mobile-shortcode-panel {
  max-height: 100vh;
  height: 89vh;
  top: 57px;
  width: 100vw;
  left: -21px;
  opacity: 1;
  visibility: visible;
  overflow-y: auto;
}

.menu-mobile-shortcode-panel .menu-mobile-shortcode,
.menu-mobile-shortcode-panel nav {
  padding: 1rem 0;
  border: none;
}

.menu-mobile-shortcode-panel .menu-mobile-shortcode-menu,
.menu-mobile-shortcode-panel .menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-mobile-shortcode-panel .menu-mobile-shortcode-menu li,
.menu-mobile-shortcode-panel .menu li {
  margin: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.menu-mobile-shortcode-panel .menu-mobile-shortcode-menu li:last-child,
.menu-mobile-shortcode-panel .menu li:last-child {
  border-bottom: none;
}

.menu-mobile-shortcode-panel .menu-mobile-shortcode-menu a,
.menu-mobile-shortcode-panel .menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 20px;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
}

.menu-mobile-shortcode-panel .menu-mobile-shortcode-menu a:hover,
.menu-mobile-shortcode-panel .menu a:hover {
  background: #EBEFF6;
  gap: 10px;
}

/* Chevron para itens com submenu */
.menu-mobile-shortcode-panel .menu-item-has-children > a::after {
  content: "›";
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.25s ease;
}

.menu-mobile-shortcode-panel .menu-item-has-children.submenu-open > a::after {
  transform: rotate(90deg);
}

/* Submenu â€“ fechado por defeito, abre para baixo */
.menu-mobile-shortcode-panel .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0, 0, 0, 0.03);
}

.menu-mobile-shortcode-panel .menu-item-has-children.submenu-open > .sub-menu {max-height: 10000px;}

.menu-mobile-shortcode-panel .sub-menu li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
}

.menu-mobile-shortcode-panel .sub-menu li > a {
  padding: 25px 20px;
}

.menu-mobile-shortcode-panel .sub-menu .sub-menu {
  padding: 0;
}

.menu-mobile-shortcode-panel .sub-menu li:last-child {
  border-bottom: none;
}

.menu-mobile-shortcode-panel .sub-menu a {
  font-weight: 500;
  gap: 10px;
  padding: 0;
  justify-content: flex-start;
}

.menu-mobile-shortcode-panel .sub-menu a::before {
  content: "— ";
  flex-shrink: 0;
}

/* Submenu com submenu: seta (›), alinhada à direita, roda ao abrir */
.menu-mobile-shortcode-panel .sub-menu .menu-item-has-children > a::after {
  content: "›";
  margin-left: auto;
  flex-shrink: 0;
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.25s ease;
}

.menu-mobile-shortcode-panel .sub-menu .menu-item-has-children.submenu-open > a::after {
  transform: rotate(90deg);
}

/* Sub-submenu: fechado por defeito, expande ao clicar (como submenu) */
.menu-mobile-shortcode-panel .sub-menu .sub-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0, 0, 0, 0.02);
  padding: 0;
}

.menu-mobile-shortcode-panel .sub-menu .menu-item-has-children.submenu-open > .sub-menu {
  max-height: 10000px;
}

/* Só remover chevron de itens SEM submenu */
.menu-mobile-shortcode-panel .sub-menu li:not(.menu-item-has-children) > a::after {
  content: none !important;
}

/* Sub-submenu: mais indentação e traço */
.menu-mobile-shortcode-panel .sub-menu .sub-menu li {
  padding-left: 1.5rem;
}

.menu-mobile-shortcode-panel .sub-menu .sub-menu a::before {
  content: "— ";
}
