/* AUTO-GIRO-V396-CARDS — desktop actions + clickable card media */
.bb-company-visual-link,
.ag-company-media-link,
.bb-card-media-link{
  display:block!important;
  width:100%!important;
  height:100%!important;
  color:inherit!important;
  text-decoration:none!important;
  cursor:pointer!important;
}
.bb-company-visual-link:focus-visible,
.ag-company-media-link:focus-visible,
.bb-card-media-link:focus-visible{
  outline:3px solid #ffc43d!important;
  outline-offset:-3px!important;
}
.bb-company-visual-link img,
.ag-company-media-link img,
.bb-card-media-link img{
  display:block!important;
}

/* Corrige de vez o estouro/dispersão dos atalhos comerciais no desktop. */
@media (min-width:681px){
  .bb-company-actions--compact{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:5px!important;
    flex-wrap:nowrap!important;
    width:100%!important;
    min-width:0!important;
    overflow:visible!important;
  }
  .bb-company-actions--compact .bb-view-company{
    flex:0 0 auto!important;
    min-width:98px!important;
    min-height:38px!important;
    padding:0 10px!important;
    white-space:nowrap!important;
  }
  .bb-company-actions--compact .bb-card-quick-actions{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:4px!important;
    margin-left:0!important;
    flex:0 0 auto!important;
    min-width:0!important;
  }
  .bb-company-actions--compact .bb-card-icon{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 32px!important;
    width:32px!important;
    min-width:32px!important;
    height:32px!important;
    padding:0!important;
  }
  .bb-company-actions--compact .bb-card-icon svg{
    width:16px!important;
    height:16px!important;
  }

  /* A home usa 5 cards; ali não há largura para botão + 4 ícones na mesma linha.
     Empilha de forma limpa em vez de cortar o último ícone. */
  .ag-featured-card .bb-company-actions--compact{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:7px!important;
    align-items:start!important;
  }
  .ag-featured-card .bb-company-actions--compact .bb-view-company{
    width:100%!important;
    min-width:0!important;
  }
  .ag-featured-card .bb-company-actions--compact .bb-card-quick-actions{
    width:100%!important;
    justify-content:flex-start!important;
  }

  /* O CSS dos polos antigos empurrava o botão e os ícones para lados opostos. */
  .ag-hub-company__actions .bb-company-actions--compact>a:first-child{
    margin-right:0!important;
  }
  .ag-hub-company__actions .bb-company-actions--compact{
    justify-content:flex-start!important;
    flex-wrap:nowrap!important;
  }
}

@media (max-width:680px){
  .bb-company-visual-link,
  .ag-company-media-link,
  .bb-card-media-link{height:100%!important}
}
