/* Touch targets: at least 44 x 44 px on touch screens.
 *
 * The UX audit found icon buttons of 32-38 px in Messages and the top bar. On a phone those are
 * easy to miss. Where the look should stay the same, an invisible ::after widens the area that
 * takes the tap; where a button is laid out statically in a header, it simply grows to 44 px.
 * Only for coarse pointers (fingers), so desktop layouts are untouched.
 */
@media (pointer: coarse) {
  /* Invisible hit area around small buttons that keep their size. */
  .mobile-topbar .menu-toggle,
  #messages-standalone-root .messages-workspace-portal-link,
  #messages-standalone-root .messages-workspace-action,
  #messages-standalone-root .messages-reference-navigation .inbox-filter-button,
  .messages-direct-call-id-close {
    position: relative;
  }

  .mobile-topbar .menu-toggle::after,
  #messages-standalone-root .messages-workspace-portal-link::after,
  #messages-standalone-root .messages-workspace-action::after,
  #messages-standalone-root .messages-reference-navigation .inbox-filter-button::after,
  .messages-direct-call-id-close::after,
  .message-action-trigger::after {
    content: "";
    position: absolute;
    inset: -6px;
  }

  /* The message actions button is also see-through until touched; make it readable. */
  .message-action-trigger {
    opacity: 1;
  }

  /* Header buttons in a conversation are laid out statically: grow them instead. */
  #messages-standalone-root .group-chat-header .messages-reference-thread-search-toggle {
    inline-size: 44px !important;
    block-size: 44px !important;
    min-inline-size: 44px !important;
    min-block-size: 44px !important;
  }

  #messages-standalone-root .group-chat-header .group-settings-open-button--chat {
    block-size: 44px !important;
    min-block-size: 44px !important;
  }
}
