/*
 * Barrierefreie Ansicht (WCAG 2.2 AA) — loaded after every other stylesheet.
 * The shop keeps its original design by default. Every colour, underline and target-size
 * change below only applies once a visitor switches on "Barrierefreie Ansicht" in the footer
 * (or via the second skip link), which sets html.gx-a11y (saved in localStorage).
 * Values in the mode: gold-deep #96764f → #816544, text-faint #938c85 → #746d67,
 * gold button fill with white text #ae9069 → #8c704c (4.6:1).
 */

html.gx-a11y {
  --gold-deep: #816544;   /* links / labels on paper: 4.9:1 on paper, 5.4:1 on white */
  --text-faint: #746d67;  /* meta / captions: 4.6:1 on paper */
  --gold-btn: #8c704c;    /* gold fill behind white button text */
  --gold-btn-hover: #7a6141;
}

/* Skip link: hidden until focused with the keyboard */
.gx-skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100000;
  padding: 12px 18px;
  border-radius: var(--r-sm, 8px);
  background: var(--ink-850, #100f0e);
  color: #fff;
  font: 600 15px/1.2 var(--font-body, Inter, system-ui, sans-serif);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--dur-fast, .18s) ease;
}
.gx-skip-link:focus,
.gx-skip-link:focus-visible {
  transform: none;
  outline: 2px solid var(--gold-hover, #c6a97d);
  outline-offset: 2px;
}
#content:focus { outline: none; }

/* Gold buttons with white text: darker fill so the label reaches 4.5:1 */
html.gx-a11y body.gx-btn-ink-white :is(
  .gx-btn--primary,
  .gx-product-card__cta,
  .gx-btn--secondary:hover,
  .gx-pdp-buy__cart button.button,
  .single_add_to_cart_button,
  .woocommerce a.button.alt,
  .woocommerce button.button.alt,
  .woocommerce input.button.alt,
  .woocommerce button.button,
  .woocommerce a.button.wc-backward,
  .woocommerce-checkout #place_order,
  #order_review #place_order,
  .wc-proceed-to-checkout a.checkout-button,
  .woocommerce-Button,
  .woocommerce-button,
  .woocommerce-form-login__submit,
  .gx-account a.button,
  .gx-account-modal .woocommerce-button,
  .gx-mini__checkout,
  .gx-pdp-reviews__form .submit,
  .gx-pdp-reviews__form .form-submit input,
  .woocommerce-form-return_request__submit,
  .wc-block-components-button:not(.is-link),
  .gx-consent__btn:not(.gx-consent__btn--light),
  [data-gx-consent-grant],
  .gx-header-action__badge,
  .gx-icon-btn .gx-wishlist-count,
  .gx-checkout-flow__step--active .gx-checkout-flow__number
):not(.is-added):not(:disabled) {
  background-color: var(--gold-btn) !important;
  border-color: var(--gold-btn) !important;
}
html.gx-a11y body.gx-btn-ink-white :is(
  .gx-btn--primary,
  .gx-product-card__cta,
  .gx-pdp-buy__cart button.button,
  .single_add_to_cart_button,
  .woocommerce a.button.alt,
  .woocommerce button.button.alt,
  .woocommerce input.button.alt,
  .woocommerce button.button,
  .woocommerce a.button.wc-backward,
  .woocommerce-checkout #place_order,
  #order_review #place_order,
  .wc-proceed-to-checkout a.checkout-button,
  .woocommerce-Button,
  .woocommerce-button,
  .woocommerce-form-login__submit,
  .gx-account a.button,
  .gx-account-modal .woocommerce-button,
  .gx-mini__checkout,
  .gx-pdp-reviews__form .submit,
  .gx-pdp-reviews__form .form-submit input,
  .woocommerce-form-return_request__submit,
  .wc-block-components-button:not(.is-link),
  .gx-consent__btn:not(.gx-consent__btn--light),
  [data-gx-consent-grant]
):not(.is-added):not(:disabled):is(:hover, :focus-visible) {
  background-color: var(--gold-btn-hover) !important;
  border-color: var(--gold-btn-hover) !important;
  color: #fff !important;
}

/* Gold text on dark surfaces: the lighter gold (6.3:1 on ink) */
html.gx-a11y .gx-pdp-buy__brand,
html.gx-a11y .gx-cat-link a,
html.gx-a11y .gx-pdp-desc__body a:not(.gx-btn) {
  color: var(--gold) !important;
}
html.gx-a11y .gx-pdp-buy__brand:hover,
html.gx-a11y .gx-cat-link a:hover,
html.gx-a11y .gx-pdp-desc__body a:not(.gx-btn):hover {
  color: var(--gold-hover) !important;
}

/* Gold text on white */
html.gx-a11y .gx-pdp-gift-flow__n { color: var(--gold-deep) !important; }

/* Age gate footnote on ink */
html.gx-a11y .gx-age-gate .gx-age-gate__note { color: var(--text-invert-faint, #8a837b) !important; }

/* Links inside running text must not rely on colour alone */
html.gx-a11y .gx-pdp-desc__body a:not(.gx-btn),
html.gx-a11y .gx-cat-link a,
html.gx-a11y .woocommerce-gzd-legal-checkbox-text a,
html.gx-a11y .woocommerce-terms-and-conditions-checkbox-text a,
html.gx-a11y .gx-breadcrumbs a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
html.gx-a11y .gx-breadcrumbs a { text-decoration-color: currentColor; }

/* Touch targets of at least 24 × 24 px */
html.gx-a11y .woocommerce-LostPassword a,
html.gx-a11y .lost_password a,
html.gx-a11y .gx-consent-reopen {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

/* "Vertrag widerrufen" in the footer: outline style with readable text (on shop pages the
   WooCommerce button rule turns it into a low-contrast gold fill). */
html.gx-a11y .gx-site-footer a.gx-btn--widerruf {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(198, 169, 125, 0.72) !important;
  color: #f3ebe1 !important;
}
html.gx-a11y .gx-site-footer a.gx-btn--widerruf:hover,
html.gx-a11y .gx-site-footer a.gx-btn--widerruf:focus-visible {
  background: rgba(198, 169, 125, 0.18) !important;
  color: #fffaf3 !important;
}

/* Toggle in the footer and second skip link */
.gx-a11y-toggle[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 3px; }
.gx-skip-link--a11y { left: 230px; }
@media (max-width: 600px) { .gx-skip-link--a11y { left: 8px; } }
