/* A small, consistent close icon with a full, transparent touch target.
   The explicit states also prevent host-theme button colours from bleeding in. */
body :is(.dialog-close, .dd-brief-close, .studio-back, #close-planner, #close-library),
body :is(.dialog-close, .dd-brief-close, .studio-back, #close-planner, #close-library):is(:hover, :focus, :focus-visible, :active) {
  -webkit-appearance: none;
  appearance: none;
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  box-sizing: border-box;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  color: #171b1b !important;
  box-shadow: none !important;
  font-size: 0 !important;
  line-height: 1;
  text-decoration: none !important;
  text-shadow: none !important;
  transform: none !important;
  filter: none !important;
  transition: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

body :is(.dialog-close.inline, .studio-back, #close-planner) {
  position: relative;
}

body :is(.dialog-close, .dd-brief-close, .studio-back, #close-planner, #close-library)::before,
body :is(.dialog-close, .dd-brief-close, .studio-back, #close-planner, #close-library)::after {
  content: "" !important;
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 16px;
  height: 1.5px;
  border: 0;
  border-radius: 1px;
  background: #171b1b !important;
  box-shadow: none !important;
  opacity: 1;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(45deg) !important;
  transition: none;
}

body :is(.dialog-close, .dd-brief-close, .studio-back, #close-planner, #close-library)::after {
  transform: translate(-50%, -50%) rotate(-45deg) !important;
}

body :is(.dialog-close, .dd-brief-close, .studio-back, #close-planner, #close-library):focus {
  outline: none;
}

body :is(.dialog-close, .dd-brief-close, .studio-back, #close-planner, #close-library):focus-visible {
  outline: 1.5px solid #171b1b !important;
  outline-offset: -5px;
}

@media (forced-colors: active) {
  body :is(.dialog-close, .dd-brief-close, .studio-back, #close-planner, #close-library)::before,
  body :is(.dialog-close, .dd-brief-close, .studio-back, #close-planner, #close-library)::after {
    background: ButtonText !important;
    forced-color-adjust: none;
  }
  body :is(.dialog-close, .dd-brief-close, .studio-back, #close-planner, #close-library):focus-visible {
    outline-color: ButtonText !important;
  }
}
