/*
  JR — Mobile Group Card Title-Only Tap (Enforced)
  Scope: My Groups Directory cards (.mgd-group / .jr-mgd-enhanced)
*/

@media (max-width: 782px) {
  /* Improve scroll intent on the cards */
  #my-groups-directory .mgd-group,
  #mgd-groups-list .mgd-group,
  #my-groups-directory .mgd-group.jr-mgd-enhanced,
  #mgd-groups-list .mgd-group.jr-mgd-enhanced {
    touch-action: pan-y !important;
    -webkit-tap-highlight-color: transparent;
  }

  /* Make the whole card ignore taps by default (JS will still hard-block too) */
  #my-groups-directory .mgd-group,
  #mgd-groups-list .mgd-group {
    pointer-events: none !important;
  }

  /* Re-enable interactions only where we want them */
  #my-groups-directory .mgd-group .jr-mgd-title a,
  #mgd-groups-list .mgd-group .jr-mgd-title a,
  /* common BP title fallbacks */
  #my-groups-directory .mgd-group a[href*="/groups/"],
  #mgd-groups-list .mgd-group a[href*="/groups/"] {
    pointer-events: auto !important;
  }

  /* But don't accidentally enable other links/buttons inside the card */
  #my-groups-directory .mgd-group .jr-mgd-left,
  #my-groups-directory .mgd-group .jr-mgd-mid,
  #my-groups-directory .mgd-group .jr-mgd-right,
  #mgd-groups-list .mgd-group .jr-mgd-left,
  #mgd-groups-list .mgd-group .jr-mgd-mid,
  #mgd-groups-list .mgd-group .jr-mgd-right {
    pointer-events: none !important;
  }

  #my-groups-directory .mgd-group .jr-mgd-title,
  #mgd-groups-list .mgd-group .jr-mgd-title {
    pointer-events: auto !important; /* allow the title area to pass through to the link */
  }
}
