/*
 * Accessibility layer (Paket B) - medin-child for Johannes, 2026-10-19
 * Decisions (Tobias, G1, 2026-10-19):
 *  - Photo banners: variant A, a dark gradient from the brand colour #1D252D behind the white text.
 *  - Focus ring option 1: double ring (2px white inside, 2px #1D252D outside).
 *  - Links inside text: underline only, link colour unchanged.
 * No colour of the brand palette changes. Everything is an override on top of Medin 1.8.7.
 */
html:root {
  --a11y-ink: #1d252d;   /* brand off-black: 15.5:1 on white */
  --a11y-white: #fff;
}

/* ---- Visible keyboard focus (WCAG 2.4.7). Keyboard only, mouse behaviour unchanged ---- */
*:focus-visible {
  outline: 2px solid var(--a11y-ink) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 2px var(--a11y-white) !important; /* fills the 2px gap: visible on dark and light backgrounds */
}
/* inputs/buttons that use their own box-shadow keep the ring too */

/* ---- Skip link (WCAG 2.4.1), output by functions.php on wp_body_open ---- */
.a11y-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100001;
  padding: 12px 20px;
  background: var(--a11y-white);
  color: var(--a11y-ink);
  font-weight: 700;
  text-decoration: underline;
}
.a11y-skip-link:focus {
  left: 16px;
  top: 16px;
}

/* ---- Links inside text are not only distinguishable by colour (WCAG 1.4.1) ---- */
p a:not(.btn):not(.link):not(.hovicon):not(.nav-link):not(.btn-link):not([class*="button"]),
main li a:not(.btn):not(.link):not(.hovicon):not(.nav-link):not(.btn-link):not([class*="button"]),
.wpb_text_column a:not(.btn):not(.link):not(.hovicon):not(.nav-link):not(.btn-link):not([class*="button"]) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
p a:not(.btn):not(.link):not(.hovicon):hover,
main li a:not(.btn):not(.link):not(.hovicon):hover {
  text-decoration-thickness: 2px;
}

/* ---- White text on photo banners: gradient behind the text (WCAG 1.4.3), variant A ----
 * Left aligned texts get a gradient from the left, centred texts a centred one,
 * on phones the text spans the full width, so a uniform veil is used there.
 * Measured on Local 2026-10-19, see docs/A11y_Analyse_JC.md chapter 3.2.
 */
/* Hero slider: the text layer sits above the photo (position:absolute, z-index:100) */
/* the hero text runs across ~85 % of the width (small text 15px needs 4.5:1), so the gradient fades out late */
.slide-content:has(.slide-txt1),
.slide-content:has(.slide-txt2) {
  background: linear-gradient(90deg, rgba(29, 37, 45, 0.6) 0%, rgba(29, 37, 45, 0.52) 60%, rgba(29, 37, 45, 0.42) 90%, rgba(29, 37, 45, 0.3) 100%);
}
/* "Werden Sie Patient bei uns" block (photo as CSS background, text in the left column) */
.block-full-appointment { position: relative; }
.block-full-appointment::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(29, 37, 45, 0.55) 0%, rgba(29, 37, 45, 0.3) 45%, rgba(29, 37, 45, 0) 75%);
}
.block-full-appointment > .container { position: relative; z-index: 1; }
/* Banner with centred text ("Jetzt Termin vereinbaren", Formulare) */
.banner-center-caption { position: relative; }
.banner-center-caption::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(29, 37, 45, 0.55) 0%, rgba(29, 37, 45, 0.35) 55%, rgba(29, 37, 45, 0) 90%);
}
.banner-center-caption > * { position: relative; z-index: 1; }
@media (max-width: 767.98px) {
  .slide-content:has(.slide-txt1),
  .slide-content:has(.slide-txt2),
  .block-full-appointment::before {
    background: rgba(29, 37, 45, 0.5);
  }
}

/* ---- Motion control (WCAG 2.2.2): button from a11y.js, photos stop zooming ---- */
html.a11y-no-motion [data-animation="kenburns"],
html.a11y-no-motion .kenburns { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  [data-animation="kenburns"], .kenburns { animation: none !important; }
}
.a11y-motion-toggle {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9999;
  padding: 8px 14px;
  border: 2px solid var(--a11y-white);
  border-radius: 4px;
  background: var(--a11y-ink);
  color: var(--a11y-white);
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
}
.a11y-motion-toggle:hover { background: #304248; }
