/*
 * Shared linked-card interaction, matching the municipal directory.
 * Keep native Breakdance cards editable: adding the mnl-card class is enough.
 * Links retain their own targets; a card's empty area is not made clickable.
 * :has() also covers results inserted by live search, without JavaScript hooks.
 */
body :is(
  .mnl-card,
  .mnl-interactive-card,
  .bde-image-box,
  .bde-icon-box,
  .bde-image-hover-card,
  .mnl-directory-detail-card,
  .mnl-hub__pathways > a,
  .mnl-directory-card,
  .mnl-public-event-card,
  .mnl-event-card-public,
  .mnl-event-agenda-card,
  .mnl-hub__card,
  .mnlopp-card,
  ul.products > li.product,
  .mnl-workspace__card,
  .mnl-workspace__stat,
  .mnl-event-card,
  .mnl-event-stats > a,
  .mnl-event-profile-grid > article
):not(:is(.mnl-card, .mnl-interactive-card) :is(.bde-image-box, .bde-icon-box, .bde-image-hover-card)):is(a[href]:not([href=""]):not([aria-disabled="true"]), :has(a[href]:not([href=""]):not([aria-disabled="true"]))):not(:has(form, .mnl-filter, .mnl-directory-filters, .mnl-event-directory-filters, .mnl-workspace__search)):not(:has(.mnl-card, .mnl-interactive-card, .mnl-directory-card, .mnl-public-event-card, .mnl-event-card-public, .mnl-hub__card, .mnlopp-card, ul.products > li.product, .mnl-workspace__card, .mnl-event-card)) {
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

/* Keep the selector identical so native and application-specific styles agree. */
body :is(
  .mnl-card,
  .mnl-interactive-card,
  .bde-image-box,
  .bde-icon-box,
  .bde-image-hover-card,
  .mnl-directory-detail-card,
  .mnl-hub__pathways > a,
  .mnl-directory-card,
  .mnl-public-event-card,
  .mnl-event-card-public,
  .mnl-event-agenda-card,
  .mnl-hub__card,
  .mnlopp-card,
  ul.products > li.product,
  .mnl-workspace__card,
  .mnl-workspace__stat,
  .mnl-event-card,
  .mnl-event-stats > a,
  .mnl-event-profile-grid > article
):not(:is(.mnl-card, .mnl-interactive-card) :is(.bde-image-box, .bde-icon-box, .bde-image-hover-card)):is(a[href]:not([href=""]):not([aria-disabled="true"]), :has(a[href]:not([href=""]):not([aria-disabled="true"]))):not(:has(form, .mnl-filter, .mnl-directory-filters, .mnl-event-directory-filters, .mnl-workspace__search)):not(:has(.mnl-card, .mnl-interactive-card, .mnl-directory-card, .mnl-public-event-card, .mnl-event-card-public, .mnl-hub__card, .mnlopp-card, ul.products > li.product, .mnl-workspace__card, .mnl-event-card)):is(:hover, :focus-within) {
  border-color: #8DBFC8 !important;
  box-shadow: 0 9px 26px #063B5B10;
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  body :is(.mnl-card, .mnl-interactive-card, .bde-image-box, .bde-icon-box, .bde-image-hover-card, .mnl-directory-detail-card, .mnl-hub__pathways > a, .mnl-directory-card,
    .mnl-public-event-card, .mnl-event-card-public, .mnl-event-agenda-card,
    .mnl-hub__card, .mnlopp-card, ul.products > li.product, .mnl-workspace__card, .mnl-workspace__stat,
    .mnl-event-card, .mnl-event-stats > a, .mnl-event-profile-grid > article) {
    transition: none !important;
    transform: none !important;
  }
}
