/* V11.37.0-R16.0 — estabilização transversal de cards, Academia e hit-targets. */
:root{--ecoa-r16-action-z:60}

/* CTAs: camada de interação acima de elementos decorativos, sem alterar dimensões/copy/hrefs. */
#wrap :is(.ecoa-v127-actions,.ecoa-v101-card__actions,.ecoa-v101-detail-actions,.ecoa-v114-plan-detail__actions,.ecoa-v120-format-card__actions){
  position:relative!important;z-index:var(--ecoa-r16-action-z)!important;pointer-events:auto!important;isolation:isolate!important;
}
#wrap a[href]:is(.ecoa-v127-action,.ecoa-v128-owned-action,.ecoa-v129-owned-action,.ecoa-v118-authoritative-action,.ecoa-v116-service-primary,.ecoa-v114-plan-primary,.ecoa-v114-plan-buy,.ecoa-v101-shop-cta),
#wrap .ecoa-v127-actions>a[href],
#wrap .ecoa-v101-card__actions>a[href],
#wrap .ecoa-v101-detail-actions>a[href],
#wrap .ecoa-v114-plan-detail__actions>a[href],
#wrap .ecoa-v120-format-card__actions>a[href]{
  position:relative!important;z-index:calc(var(--ecoa-r16-action-z) + 1)!important;
  pointer-events:auto!important;cursor:pointer!important;touch-action:manipulation!important;
}
#wrap :is(.ecoa-v127-actions,.ecoa-v101-card__actions,.ecoa-v101-detail-actions,.ecoa-v114-plan-detail__actions,.ecoa-v120-format-card__actions)::before,
#wrap :is(.ecoa-v127-actions,.ecoa-v101-card__actions,.ecoa-v101-detail-actions,.ecoa-v114-plan-detail__actions,.ecoa-v120-format-card__actions)::after{
  pointer-events:none!important;
}

/* R16 é CSS-first: sem alturas globais calculadas em JS. O Grid equaliza a linha naturalmente. */
body #wrap .ecoa-v1514-grid.ecoa-v1514-grid,
body #wrap .ecoa-v1514-path-grid.ecoa-v1514-path-grid{
  align-items:stretch!important;
}
body #wrap .ecoa-v1514-card.ecoa-v1514-card,
body #wrap .ecoa-v1514-format-card.ecoa-v1514-format-card{
  --ecoa-v1514-equal-h:auto!important;
  height:100%!important;min-height:0!important;max-height:none!important;
  transition:none!important;animation:none!important;
}
body #wrap .ecoa-v1514-grid,
body #wrap .ecoa-v1514-path-grid{
  transition:none!important;animation:none!important;
}

/* Academia: a matriz de preços é de detalhe largo; dentro do card deve empilhar. */
body:is(.ecoa-v7-route-academia,.ecoa-v101-route-academia) #wrap #ecoa-course-carousel .ecoa-v114-plan-spec > div,
body:is(.ecoa-v7-route-academia,.ecoa-v101-route-academia) #wrap #formatos-academia .ecoa-v114-plan-spec > div{
  grid-template-columns:minmax(0,1fr)!important;
  gap:2px 0!important;align-items:start!important;
}
body:is(.ecoa-v7-route-academia,.ecoa-v101-route-academia) #wrap #ecoa-course-carousel .ecoa-v114-plan-spec > div > *,
body:is(.ecoa-v7-route-academia,.ecoa-v101-route-academia) #wrap #formatos-academia .ecoa-v114-plan-spec > div > *{
  min-width:0!important;max-width:100%!important;white-space:normal!important;
  overflow-wrap:anywhere!important;word-break:normal!important;
}
body:is(.ecoa-v7-route-academia,.ecoa-v101-route-academia) #wrap #ecoa-course-carousel .ecoa-v114-plan-spec,
body:is(.ecoa-v7-route-academia,.ecoa-v101-route-academia) #wrap #ecoa-course-carousel .ecoa-v114-plan-detail__grid,
body:is(.ecoa-v7-route-academia,.ecoa-v101-route-academia) #wrap #formatos-academia .ecoa-v114-plan-spec{
  grid-template-columns:minmax(0,1fr)!important;max-width:100%!important;min-width:0!important;
}

/* Conteúdo dos cards não pode criar scroll horizontal nem ultrapassar a barra. */
body #wrap .ecoa-v1514-card > *:not(.ecoa-v1514-media):not(.ecoa-v101-card__top),
body #wrap .ecoa-v1514-format-card > *:not(.ecoa-v122-format-card__visual):not(.ecoa-v124-format-visual):not(.ecoa-v114-format-card__visual){
  min-width:0!important;max-width:100%!important;overflow-wrap:anywhere!important;
}
body:is(.ecoa-v7-route-academia,.ecoa-v101-route-academia) #wrap #ecoa-course-carousel.ecoa-v1514-grid,
body:is(.ecoa-v7-route-academia,.ecoa-v101-route-academia) #wrap #formatos-academia.ecoa-v1514-grid,
body:is(.ecoa-v7-route-servicos,.ecoa-v101-route-servicos) #wrap .ecoa-v1514-grid,
body:is(.ecoa-v7-route-caminhos,.ecoa-v101-route-caminhos) #wrap .ecoa-v1514-path-grid{
  max-width:100%!important;overflow-x:clip!important;
}

/* Ações sempre no fundo quando o card está numa linha esticada. */
body #wrap .ecoa-v1514-card :is(.ecoa-v101-card__actions,.ecoa-v127-actions,.o_svc_accoes,.ecoa-catalogue__actions,.o_card_rodape),
body #wrap .ecoa-v1514-format-card :is(.ecoa-v120-format-card__action,.ecoa-v121-format-card__action,.ecoa-v122-format-card__action,.ecoa-v127-actions){
  margin-top:auto!important;
}

@media(max-width:639px){
  body #wrap .ecoa-v1514-card.ecoa-v1514-card,
  body #wrap .ecoa-v1514-format-card.ecoa-v1514-format-card{
    height:auto!important;
  }
}
