/* One decorative close mark for touch panels; original buttons and labels remain authoritative. */
body:is([data-layout="mobile"], [data-layout="portrait"]) :is(
  .touch-category-close,
  #touchCartClose,
  #mobileAgentClose,
  #customerDetailsModal[data-mode="touch-profile"] #customerDetailsClose,
  #customerLookupModalClose,
  .touch-config-close,
  #touchProductDetailClose,
  #mobileAnnouncementClose,
  #mobileMenuSearchClose,
  .favorites-close-btn,
  #cashChangeModal > div > button[aria-label]
) {
  position: relative;
  box-sizing: border-box;
  flex: 0 0 44px;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px;
  min-height: 44px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--touch-muted) !important;
  font-size: 0 !important;
  line-height: 0 !important;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #cashChangeModal > div > button[aria-label] {
  position: absolute !important;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) #cashChangeModal > div > button[aria-label] + div {
  box-sizing: border-box;
  padding-right: 48px;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) :is(
  .touch-category-close,
  #touchCartClose,
  #mobileAgentClose,
  #customerDetailsModal[data-mode="touch-profile"] #customerDetailsClose,
  #customerLookupModalClose,
  .touch-config-close,
  #touchProductDetailClose,
  #mobileAnnouncementClose,
  #mobileMenuSearchClose,
  .favorites-close-btn,
  #cashChangeModal > div > button[aria-label]
)::before,
body:is([data-layout="mobile"], [data-layout="portrait"]) :is(
  .touch-category-close,
  #touchCartClose,
  #mobileAgentClose,
  #customerDetailsModal[data-mode="touch-profile"] #customerDetailsClose,
  #customerLookupModalClose,
  .touch-config-close,
  #touchProductDetailClose,
  #mobileAnnouncementClose,
  #mobileMenuSearchClose,
  .favorites-close-btn,
  #cashChangeModal > div > button[aria-label]
)::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) :is(
  .touch-category-close,
  #touchCartClose,
  #mobileAgentClose,
  #customerDetailsModal[data-mode="touch-profile"] #customerDetailsClose,
  #customerLookupModalClose,
  .touch-config-close,
  #touchProductDetailClose,
  #mobileAnnouncementClose,
  #mobileMenuSearchClose,
  .favorites-close-btn,
  #cashChangeModal > div > button[aria-label]
)::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
body:is([data-layout="mobile"], [data-layout="portrait"]) :is(
  .touch-category-close,
  #touchCartClose,
  #mobileAgentClose,
  #customerDetailsModal[data-mode="touch-profile"] #customerDetailsClose,
  #customerLookupModalClose,
  .touch-config-close,
  #touchProductDetailClose,
  #mobileAnnouncementClose,
  #mobileMenuSearchClose,
  .favorites-close-btn,
  #cashChangeModal > div > button[aria-label]
)::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
body:is([data-layout="mobile"], [data-layout="portrait"]) :is(.touch-category-close, #touchCartClose, #mobileAgentClose) > svg,
body:is([data-layout="mobile"], [data-layout="portrait"]) #mobileAgentClose > .mobile-agent-close-legacy,
body:is([data-layout="mobile"], [data-layout="portrait"]) #customerDetailsModal[data-mode="touch-profile"] #customerDetailsClose > :is(.customer-details-close-icon, .touch-customer-back-label) {
  display: none !important;
}
body:is([data-layout="mobile"], [data-layout="portrait"]) :is(
  .touch-category-close,
  #touchCartClose,
  #mobileAgentClose,
  #customerDetailsModal[data-mode="touch-profile"] #customerDetailsClose,
  #customerLookupModalClose,
  .touch-config-close,
  #touchProductDetailClose,
  #mobileAnnouncementClose,
  #mobileMenuSearchClose,
  .favorites-close-btn,
  #cashChangeModal > div > button[aria-label]
):focus-visible {
  outline: 1px solid var(--touch-muted) !important;
  outline-offset: -3px !important;
}
/* Programmatic dialog focus after a tap is not keyboard navigation. Keep the focus itself. */
html[data-touch-input="pointer"] body:is([data-layout="mobile"], [data-layout="portrait"]) :is(
  .touch-category-close,
  #touchCartClose,
  #mobileAgentClose,
  #customerDetailsModal[data-mode="touch-profile"] #customerDetailsClose,
  #customerLookupModalClose,
  .touch-config-close,
  #touchProductDetailClose,
  #mobileAnnouncementClose,
  #mobileMenuSearchClose,
  .favorites-close-btn,
  #cashChangeModal > div > button[aria-label]
):focus {
  outline: none !important;
}
