/* Good Place In — Header Account 0.7.9
   Estilos completos para o menu do Astra (desktop e mobile).
   A tipografia é herdada do tema. */

.gpi-ha {
  --gpi-ha-ink: #242D62;
  --gpi-ha-accent: #F47B4C;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: inherit !important;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
  z-index: 40;
}
.gpi-ha *,
#gpi-ha-guest-fallback,
#gpi-ha-guest-fallback * { box-sizing: border-box; font-family: inherit !important; }
.gpi-ha a { text-decoration: none !important; }
.gpi-ha-svg { flex: none; }

/* Visitantes: botões visíveis quando o shortcode é apresentado pelo Astra. */
.gpi-ha.gpi-ha-guest {
  display: inline-flex !important;
  align-items: center;
  flex-wrap: nowrap;
  visibility: visible !important;
  opacity: 1 !important;
}
.gpi-ha-guest .gpi-ha-signin,
.gpi-ha-guest .gpi-ha-register {
  min-height: 40px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 700;
  transition: background .15s ease, color .15s ease;
}
.gpi-ha-guest .gpi-ha-signin { background: #181144 !important; color: #fff !important; }
.gpi-ha-guest .gpi-ha-signin:hover { background: #f47b4c !important; }
.gpi-ha-guest .gpi-ha-register { background: #e1e2f9 !important; color: #181144 !important; }
.gpi-ha-guest .gpi-ha-register:hover { background: #cacbe9 !important; }

/* Proprietário autenticado: manter menu existente. */
.gpi-ha-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 43px;
  border: 1px solid #d8e6ea;
  border-radius: 999px;
  background: #fff;
  color: #242D62;
  padding: 4px 11px 4px 5px;
  font-family: inherit !important;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(3,68,85,.07);
}
.gpi-ha-trigger:hover,
.gpi-ha-trigger[aria-expanded="true"] {
  border-color: #F47B4C;
  box-shadow: 0 5px 20px rgba(3,68,85,.14);
}
.gpi-ha-avatar {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #242D62;
  color: #fff;
  font-size: 14px;
}
.gpi-ha-name {
  max-width: 115px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gpi-ha-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 999999;
  width: 270px;
  max-width: min(90vw, 320px);
  padding: 9px;
  background: #fff;
  border: 1px solid #dfebee;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(3,43,52,.2);
  color: #163c46;
}
.gpi-ha-panel[hidden] { display: none !important; }
.gpi-ha-panel-head {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid #edf1f2;
  margin-bottom: 7px;
}
.gpi-ha-panel-head strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.gpi-ha-panel-head small { font-size: 12px; color: #61818a; }
.gpi-ha-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 9px;
  color: #242D62 !important;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
}
.gpi-ha-item:hover,
.gpi-ha-item:focus-visible { background: #eff1fd; color: #242D62 !important; }
.gpi-ha-item .gpi-ha-svg { color: #242D62; }
.gpi-ha-divider { height: 1px; background: #edf1f2; margin: 7px 3px; }
.gpi-ha-trigger:focus-visible,
.gpi-ha a:focus-visible,
#gpi-ha-guest-fallback a:focus-visible {
  outline: 3px solid #F47B4C;
  outline-offset: 3px;
}

/* Acesso público: fica como último item do menu, após «Serviços».
   Não altera o dropdown do proprietário e não usa posição absoluta. */
#masthead .gpi-ha-menu-item {
  display: inline-flex !important;
  align-items: center;
  vertical-align: middle;
  margin-left: 20px;
  padding: 0;
  list-style: none;
}
#masthead #gpi-ha-guest-fallback {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
  gap: 7px !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap;
  font-family: inherit !important;
}
#masthead #gpi-ha-guest-fallback[hidden] {display:none!important;}
#masthead #gpi-ha-guest-fallback a {
  font-family: inherit !important;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap !important;
}
#masthead #gpi-ha-guest-fallback .gpi-ha-fallback-login {
  background:#242D62 !important;
  color:#fff !important;
}
#masthead #gpi-ha-guest-fallback .gpi-ha-fallback-reg {
  background:#e7f3f6 !important;
  color:#242D62 !important;
}
/* Mobile Astra: manter os botões lado a lado, sem ocupar a linha inferior. */
@media (max-width: 921px) {
  .gpi-ha { gap: 5px; }
  .gpi-ha-guest .gpi-ha-signin,
  .gpi-ha-guest .gpi-ha-register { min-height: 36px; padding: 8px 10px; font-size: 12px; }
  .gpi-ha-name { display: none; }
  .gpi-ha-trigger { padding: 4px 8px 4px 4px; }
  .gpi-ha-panel { width: 260px; top: calc(100% + 9px); }
  #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-container,
  #masthead .ast-mobile-header-wrap .ast-builder-grid-row { position: relative; }
  #masthead #gpi-ha-guest-fallback { gap: 5px !important; }
  #masthead .gpi-ha-menu-item { margin-left: 8px; }
  #gpi-ha-guest-fallback a { font-size: 12px !important; padding: 8px 10px !important; min-height: 35px !important; }
}
@media (max-width: 380px) {
  .gpi-ha-guest .gpi-ha-signin,
  .gpi-ha-guest .gpi-ha-register { padding: 7px 8px !important; font-size: 11px !important; }
  #gpi-ha-guest-fallback a { padding: 7px 7px !important; font-size: 11px !important; }
}
