/* Shared modal close treatment. Keep existing handlers, names and placement.
   Important declarations also cover legacy inline styles and hover variants. */
:is(
  .modal-close-btn,
  .modal-close,
  .vu-close,
  .compose-choice-close,
  .post-comments-close,
  .as-close,
  .epi-reader-close,
  .wl-epi-dialog-close,
  .acp-close,
  .lightbox-close,
  .unlock-modal-close,
  .chat-gift-close,
  .feed-discovery-close,
  .blv-sheet-close,
  .share-close,
  .cw-share-close,
  .admin-komiks-dialog-close,
  #composeClose,
  #postGiftClose,
  :is(dialog,[role="dialog"],.modal-overlay) button[aria-label^="Close"],
  .audio-social-dialog.ac-editor>.ac-link,
  .audio-social-dialog.ac-editor .ac-heading>.ac-link,
  .ss-dialog>button:first-of-type,
  .au-photo-dialog>button:first-of-type,
  .chat-seen-card>button,
  button[data-act$="-edit-cancel"][aria-label="Close"]
) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  transform: none !important;
  cursor: pointer;
}
:is(
  .modal-close-btn,
  .modal-close,
  .vu-close,
  .compose-choice-close,
  .post-comments-close,
  .as-close,
  .epi-reader-close,
  .wl-epi-dialog-close,
  .acp-close,
  .lightbox-close,
  .unlock-modal-close,
  .chat-gift-close,
  .feed-discovery-close,
  .blv-sheet-close,
  .share-close,
  .cw-share-close,
  .admin-komiks-dialog-close,
  #composeClose,
  #postGiftClose,
  :is(dialog,[role="dialog"],.modal-overlay) button[aria-label^="Close"],
  .audio-social-dialog.ac-editor>.ac-link,
  .audio-social-dialog.ac-editor .ac-heading>.ac-link,
  .ss-dialog>button:first-of-type,
  .au-photo-dialog>button:first-of-type,
  .chat-seen-card>button,
  button[data-act$="-edit-cancel"][aria-label="Close"]
) > * { display: none !important; }
:is(
  .modal-close-btn,
  .modal-close,
  .vu-close,
  .compose-choice-close,
  .post-comments-close,
  .as-close,
  .epi-reader-close,
  .wl-epi-dialog-close,
  .acp-close,
  .lightbox-close,
  .unlock-modal-close,
  .chat-gift-close,
  .feed-discovery-close,
  .blv-sheet-close,
  .share-close,
  .cw-share-close,
  .admin-komiks-dialog-close,
  #composeClose,
  #postGiftClose,
  :is(dialog,[role="dialog"],.modal-overlay) button[aria-label^="Close"],
  .audio-social-dialog.ac-editor>.ac-link,
  .audio-social-dialog.ac-editor .ac-heading>.ac-link,
  .ss-dialog>button:first-of-type,
  .au-photo-dialog>button:first-of-type,
  .chat-seen-card>button,
  button[data-act$="-edit-cancel"][aria-label="Close"]
)::before {
  content: "";
  display: block;
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(45deg, transparent calc(50% - .75px), currentColor calc(50% - .75px), currentColor calc(50% + .75px), transparent calc(50% + .75px)),
    linear-gradient(-45deg, transparent calc(50% - .75px), currentColor calc(50% - .75px), currentColor calc(50% + .75px), transparent calc(50% + .75px));
}
:is(
  .modal-close-btn,
  .modal-close,
  .vu-close,
  .compose-choice-close,
  .post-comments-close,
  .as-close,
  .epi-reader-close,
  .wl-epi-dialog-close,
  .acp-close,
  .lightbox-close,
  .unlock-modal-close,
  .chat-gift-close,
  .feed-discovery-close,
  .blv-sheet-close,
  .share-close,
  .cw-share-close,
  .admin-komiks-dialog-close,
  #composeClose,
  #postGiftClose,
  :is(dialog,[role="dialog"],.modal-overlay) button[aria-label^="Close"],
  .audio-social-dialog.ac-editor>.ac-link,
  .audio-social-dialog.ac-editor .ac-heading>.ac-link,
  .ss-dialog>button:first-of-type,
  .au-photo-dialog>button:first-of-type,
  .chat-seen-card>button,
  button[data-act$="-edit-cancel"][aria-label="Close"]
)::after { content: none !important; }
:is(
  .modal-close-btn,
  .modal-close,
  .vu-close,
  .compose-choice-close,
  .post-comments-close,
  .as-close,
  .epi-reader-close,
  .wl-epi-dialog-close,
  .acp-close,
  .lightbox-close,
  .unlock-modal-close,
  .chat-gift-close,
  .feed-discovery-close,
  .blv-sheet-close,
  .share-close,
  .cw-share-close,
  .admin-komiks-dialog-close,
  #composeClose,
  #postGiftClose,
  :is(dialog,[role="dialog"],.modal-overlay) button[aria-label^="Close"],
  .audio-social-dialog.ac-editor>.ac-link,
  .audio-social-dialog.ac-editor .ac-heading>.ac-link,
  .ss-dialog>button:first-of-type,
  .au-photo-dialog>button:first-of-type,
  .chat-seen-card>button,
  button[data-act$="-edit-cancel"][aria-label="Close"]
):focus-visible {
  outline: 2px solid currentColor !important;
  outline-offset: 2px !important;
}
@media (pointer: coarse) {
  :is(
  .modal-close-btn,
  .modal-close,
  .vu-close,
  .compose-choice-close,
  .post-comments-close,
  .as-close,
  .epi-reader-close,
  .wl-epi-dialog-close,
  .acp-close,
  .lightbox-close,
  .unlock-modal-close,
  .chat-gift-close,
  .feed-discovery-close,
  .blv-sheet-close,
  .share-close,
  .cw-share-close,
  .admin-komiks-dialog-close,
  #composeClose,
  #postGiftClose,
  :is(dialog,[role="dialog"],.modal-overlay) button[aria-label^="Close"],
  .audio-social-dialog.ac-editor>.ac-link,
  .audio-social-dialog.ac-editor .ac-heading>.ac-link,
  .ss-dialog>button:first-of-type,
  .au-photo-dialog>button:first-of-type,
  .chat-seen-card>button,
  button[data-act$="-edit-cancel"][aria-label="Close"]
) { min-width: 44px !important; min-height: 44px !important; }
}
