/* Accessibility (EN 301 549 / WCAG 2.1 AA) */

/* Visible keyboard focus everywhere (2.4.7); overrides the many "outline: none" rules */
:focus-visible {
  outline: 3px solid #005fcc !important;
  outline-offset: 2px !important;
}

/* Skip link (2.4.1) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  padding: 12px 16px;
  background: #000;
  color: #fff;
  font-size: 18px;
  text-decoration: none;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

#main:focus {
  outline: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Headings that replaced plain divs keep their previous look (zero specificity, so the
   existing class rules still win) */
:where(h1.exhHeading, h1.pageTitle, h1.errorTitle, h1.titleHolder, h2.tagTitle, h2.bold, h2.headerElem, h2.fundedProjectsHeaderLeft) {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

/* Buttons that replaced clickable divs look like before */
:where(button.topArrowHolder, button.arrowHolder, button.moreElem, button.gallery_slider_nav_left, button.gallery_slider_nav_right) {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/* exhibition page heading: title and artist keep their own lines */
.exhHeading .exhName,
.exhHeading .exhArtist {
  display: block;
}

/* the collapsed project list must also clip the screen-reader-only (absolutely positioned) texts
   of hidden projects, otherwise they stretch the page far below the footer */
.fundedProjectsElemHolder {
  position: relative;
}

/* the project overview is a plain list (no headings): no bullets, no indent */
ul.fundedProjectsElemHolder {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* project card title: artist and title keep their own lines */
.projectHeading .projectArtist,
.projectHeading .projectTitle {
  display: block;
}

:where(button.moreElem) {
  display: block;
  width: 100%;
}

/* Detail pages: arrow and text are now one link; keep the arrow above the text */
.endlogoHolder .arrowHolder a {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Respect reduced-motion settings */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
}

/* lightbox caption only receives focus so it is read after "next"/"previous"; it is not a control */
.lb-details:focus {
  outline: none;
}
