/*
 * Default styles of the "404 – Page not found" content element (EXT:wr_error_pages).
 *
 * Adapt the element to a corporate design by setting the custom properties below, for example
 * in the project's own stylesheet:
 *
 *   :root {
 *     --wr-error-accent: #bc1321;
 *     --wr-error-heading-transform: uppercase;
 *   }
 *
 * Every property has a neutral fallback, so the element works without any project CSS.
 * No build step is needed. Set "errorPages.css.includeDefaultStyles = 0" to style it fully yourself.
 */

.wr-error {
  color: var(--wr-error-text, inherit);
  font-family: var(--wr-error-font-body, inherit);
  margin: var(--wr-error-space-top, 2.5rem) 0 var(--wr-error-space-bottom, 3rem);
}

.wr-error *,
.wr-error *::before,
.wr-error *::after {
  box-sizing: border-box;
}

.wr-error__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;
}

/* Hero */

.wr-error__hero {
  display: flex;
  flex-direction: column;
  gap: 0.5rem 4rem;
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 2px solid var(--wr-error-border, #d9d9d9);
}

@media (min-width: 992px) {
  .wr-error__hero {
    flex-direction: row;
    align-items: center;
  }
}

.wr-error__code {
  flex: 0 0 auto;
  margin: 0;
  font-family: var(--wr-error-font-heading, inherit);
  font-size: var(--wr-error-code-size, clamp(5.5rem, 18vw, 15rem));
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--wr-error-accent, #1a1a1a);
  user-select: none;
}

.wr-error__intro {
  flex: 1 1 auto;
  max-width: 48rem;
}

.wr-error__title {
  margin: 0 0 1rem;
  font-family: var(--wr-error-font-heading, inherit);
  font-weight: var(--wr-error-heading-weight, 700);
  text-transform: var(--wr-error-heading-transform, none);
  line-height: 1.1;
  hyphens: auto;
}

.wr-error__lead {
  font-size: 1.25rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}

.wr-error__url {
  margin: 0 0 1.5rem;
  color: var(--wr-error-muted, #595959);
  word-break: break-all;
}

.wr-error__url-value {
  display: inline-block;
  padding: 0.1em 0.5em;
  background: var(--wr-error-surface, #f2f2f2);
  color: var(--wr-error-text, inherit);
  border-radius: var(--wr-error-radius, 0);
}

.wr-error__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Default buttons (used when no project button classes are configured).
   Selectors are qualified with .wr-error and the element, so global link colours
   of the project (e.g. ".content a:visited") do not override the button colours. */

.wr-error__button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border: 2px solid var(--wr-error-accent, #1a1a1a);
  border-radius: var(--wr-error-radius, 0);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.wr-error a.wr-error__button--primary,
.wr-error a.wr-error__button--primary:link,
.wr-error a.wr-error__button--primary:visited,
.wr-error button.wr-error__button--primary {
  background: var(--wr-error-accent, #1a1a1a);
  /* !important: text on the accent colour must stay readable, also against
     project rules like "a { color: black !important }" */
  color: var(--wr-error-accent-contrast, #fff) !important;
}

.wr-error a.wr-error__button--secondary,
.wr-error a.wr-error__button--secondary:link,
.wr-error a.wr-error__button--secondary:visited,
.wr-error button.wr-error__button--secondary {
  background: transparent;
  color: var(--wr-error-text, #1a1a1a);
}

.wr-error a.wr-error__button:hover,
.wr-error a.wr-error__button:focus-visible,
.wr-error button.wr-error__button:hover,
.wr-error button.wr-error__button:focus-visible {
  background: var(--wr-error-text, #1a1a1a);
  border-color: var(--wr-error-text, #1a1a1a);
  /* the background is the text colour here, not the accent: --wr-error-accent-contrast
     can be dark (e.g. black on a light accent) and would be unreadable */
  color: var(--wr-error-text-contrast, #fff) !important;
  text-decoration: none;
}

.wr-error a:focus-visible,
.wr-error button:focus-visible,
.wr-error input:focus-visible {
  outline: 3px solid var(--wr-error-focus, var(--wr-error-accent, #1a1a1a));
  outline-offset: 2px;
}

/* Blocks */

.wr-error__help {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 3rem;
}

@media (min-width: 992px) {
  .wr-error__help {
    grid-template-columns: 1fr 1fr;
  }
}

.wr-error__block {
  margin-bottom: 2.5rem;
}

.wr-error__block-title {
  margin: 0 0 1rem;
  font-family: var(--wr-error-font-heading, inherit);
  font-weight: var(--wr-error-heading-weight, 700);
  text-transform: var(--wr-error-heading-transform, none);
}

/* Search */

.wr-error__search {
  display: flex;
  max-width: 35rem;
  border-bottom: 2px solid var(--wr-error-text, #1a1a1a);
}

.wr-error__search:focus-within {
  border-bottom-color: var(--wr-error-accent, #1a1a1a);
}

.wr-error__search-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.75rem 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1.125rem;
  color: inherit;
}

.wr-error__search-input:focus {
  outline: none;
}

.wr-error__search-button {
  flex: 0 0 auto;
  padding: 0 0 0 1rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
}

.wr-error__search-button:hover,
.wr-error__search-button:focus-visible {
  color: var(--wr-error-accent, #1a1a1a);
}

/* Reasons */

.wr-error__reasons {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wr-error__reasons li {
  position: relative;
  padding: 0.6rem 0 0.6rem 1.75rem;
  border-bottom: 1px solid var(--wr-error-border, #d9d9d9);
}

.wr-error__reasons li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.3rem;
  width: 0.75rem;
  height: 2px;
  background: var(--wr-error-accent, #1a1a1a);
}

/* Tiles and service links */

.wr-error__tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

@media (min-width: 576px) {
  .wr-error__tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .wr-error__tiles {
    grid-template-columns: repeat(4, 1fr);
  }
}

.wr-error a.wr-error__tile,
.wr-error a.wr-error__tile:link,
.wr-error a.wr-error__tile:visited {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
  min-height: 5rem;
  padding: 1.25rem;
  background: var(--wr-error-surface, #f2f2f2);
  border-radius: var(--wr-error-radius, 0);
  color: var(--wr-error-text, #1a1a1a);
  font-weight: 700;
  text-decoration: none;
  text-transform: var(--wr-error-heading-transform, none);
  transition: background-color 0.2s ease, color 0.2s ease;
}

@media (min-width: 576px) {
  .wr-error__tile {
    min-height: 8rem;
  }
}

.wr-error__tile-title {
  font-size: 1.125rem;
  line-height: 1.2;
  hyphens: auto;
}

.wr-error__tile-arrow {
  color: var(--wr-error-accent, #1a1a1a);
  font-size: 1.25rem;
  transition: transform 0.2s ease;
}

.wr-error a.wr-error__tile:hover,
.wr-error a.wr-error__tile:focus-visible {
  background: var(--wr-error-accent, #1a1a1a);
  color: var(--wr-error-accent-contrast, #fff) !important;
  text-decoration: none;
}

.wr-error a.wr-error__tile:hover .wr-error__tile-arrow,
.wr-error a.wr-error__tile:focus-visible .wr-error__tile-arrow {
  color: var(--wr-error-accent-contrast, #fff) !important;
  transform: translateX(0.3rem);
}

.wr-error__service {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.wr-error .wr-error__service a,
.wr-error .wr-error__service a:link,
.wr-error .wr-error__service a:visited {
  color: var(--wr-error-text, inherit);
  font-weight: 700;
}

/* Report */

.wr-error__report {
  padding: 2rem;
  background: var(--wr-error-surface, #f2f2f2);
  border-radius: var(--wr-error-radius, 0);
}

.wr-error__report-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  margin: 1.5rem 0 0;
}

.wr-error__report-phone a {
  font-weight: 700;
  white-space: nowrap;
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .wr-error *,
  .wr-error *::before,
  .wr-error *::after {
    transition: none !important;
  }
}
