/* P1.44.0.1 B2 reader preferences and quick tools */

html[data-aw-font-scale="large"] { font-size: 112.5%; }
html[data-aw-font-scale="larger"] { font-size: 125%; }

html[data-aw-line-spacing="relaxed"] body { line-height: 1.75; }
html[data-aw-line-spacing="spacious"] body { line-height: 1.95; }

html[data-aw-letter-spacing="wider"] main :where(p, li, dt, dd, label, summary),
html[data-aw-letter-spacing="wider"] .site-foot :where(p, li, a, button),
html[data-aw-letter-spacing="wider"] .portal-trustbar { letter-spacing: .045em; }

html[data-aw-paragraph-spacing="relaxed"] main p { margin-bottom: 1.4em; }
html[data-aw-paragraph-spacing="spacious"] main p { margin-bottom: 1.8em; }

html[data-aw-reading-width="comfortable"] :where(.hero-copy, .section-head > div > p, .detail-card > p, .legal-copy, .article-body, .content-copy, .faq-answer, .product-description) { max-width: 72ch; }
html[data-aw-reading-width="narrow"] :where(.hero-copy, .section-head > div > p, .detail-card > p, .legal-copy, .article-body, .content-copy, .faq-answer, .product-description) { max-width: 58ch; }

html[data-aw-readable-mode="on"] :where(.hero-copy, .section-head > div > p, .detail-card > p, .legal-copy, .article-body, .content-copy, .faq-answer, .product-description) {
  max-width: 66ch;
  font-size: 1.08em;
  line-height: 1.78;
}

html[data-aw-emphasize-links="on"] main a:not(.aw-button):not(.main-action):not(.outline-action):not(.small-action):not(.shop-link):not(.brand):not(.portal-brand),
html[data-aw-emphasize-links="on"] .site-foot a {
  text-decoration: underline;
  text-decoration-thickness: .13em;
  text-underline-offset: .18em;
}

html[data-aw-emphasize-focus="on"] :focus-visible {
  outline: 4px solid #ffbf47 !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 2px #10202a !important;
}

html[data-aw-reduced-complexity="on"] body {
  background: var(--bg);
}
html[data-aw-reduced-complexity="on"] *,
html[data-aw-reduced-complexity="on"] *::before,
html[data-aw-reduced-complexity="on"] *::after {
  box-shadow: none !important;
  text-shadow: none !important;
  backdrop-filter: none !important;
}
html[data-aw-reduced-complexity="on"] :where(.hero, .section, .detail-card, .search-panel, .portal-service-strip, .site-foot) {
  background-image: none !important;
}

html[data-aw-contrast="high"] {
  --ink: #000000;
  --muted: #252525;
  --line: #333333;
  --soft: #f2f2f2;
  --paper: #ffffff;
  --bg: #ffffff;
  --green: #006b3c;
  --green-dark: #004e2b;
  --teal: #002b36;
  --blue: #003f88;
}
html[data-aw-contrast="high"] body { background: #fff; color: #000; }
html[data-aw-contrast="high"] :where(input, select, textarea, button) { border-color: #333; }
html[data-aw-contrast="high"] :where(.detail-card, .search-panel, article, .site-head) { border-color: #333; }

html[data-aw-contrast="dark"] {
  color-scheme: dark;
  --ink: #f5f7fa;
  --muted: #c6d0da;
  --line: #526170;
  --soft: #273644;
  --paper: #1c2936;
  --bg: #101923;
  --green: #55c98b;
  --green-dark: #8addad;
  --teal: #dceaf5;
  --blue: #a8d2ff;
  --gold: #ffd27b;
}
html[data-aw-contrast="dark"] body { background: #101923; color: var(--ink); }
html[data-aw-contrast="dark"] :where(.site-head, .portal-head, .search-panel, .detail-card, .suggest-box, .portal-service-strip, .site-foot, .reader-preferences-shell) {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}
html[data-aw-contrast="dark"] :where(input, select, textarea) {
  background: #101923;
  color: var(--ink);
  border-color: var(--line);
}
html[data-aw-contrast="dark"] :where(.outline-action, .small-action, .aw-button-secondary, .example-row a) {
  background: #182531;
  color: var(--ink);
  border-color: var(--line);
}
html[data-aw-contrast="dark"] :where(.portal-trustbar, .portal-category-nav) { background: #13202c; color: var(--ink); }
html[data-aw-contrast="dark"] img:not([src*="logo"]) { opacity: .94; }

html[data-aw-motion="reduce"] *,
html[data-aw-motion="reduce"] *::before,
html[data-aw-motion="reduce"] *::after {
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
  scroll-behavior: auto !important;
}

.reader-preferences-dialog {
  width: min(760px, calc(100% - 24px));
  max-height: min(88vh, 900px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(16, 32, 42, .24);
}
.reader-preferences-dialog::backdrop { background: rgba(6, 20, 30, .64); }
.reader-preferences-shell { display: grid; gap: 18px; padding: 24px; margin: 0; }
.reader-preferences-shell > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.reader-preferences-shell h2 { margin: 0 0 8px; font-size: clamp(1.55rem, 4vw, 2.15rem); }
.reader-preferences-shell header p:last-child { margin: 0; color: var(--muted); }
.reader-dialog-close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1.6rem;
  cursor: pointer;
}
.reader-preferences-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; overflow: auto; padding: 2px; }
.reader-pref-select,
.reader-pref-toggle { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.reader-pref-select > span,
.reader-pref-toggle strong { font-weight: 800; }
.reader-pref-select select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--paper); color: var(--ink); font: inherit; }
.reader-pref-toggle { grid-template-columns: auto 1fr; align-items: start; cursor: pointer; }
.reader-pref-toggle input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--green); }
.reader-pref-toggle span { display: grid; gap: 5px; }
.reader-pref-toggle small { color: var(--muted); line-height: 1.45; }
.reader-preferences-shell > footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.reader-preferences-status { min-height: 1.5em; margin: 0; color: var(--green-dark); font-weight: 700; }
.reader-preferences-status.is-error { color: #9f1d2b; }
.reader-guest-adopt { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.reader-guest-adopt p { margin: 0 0 10px; }
.reader-footer-button {
  border: 0;
  padding: 0;
  background: none;
  color: rgba(255,255,255,.78);
  font: inherit;
  font-size: .9rem;
  text-decoration: none;
  cursor: pointer;
}
.reader-footer-button:hover { color: #fff; }
.reader-settings-page .reader-preferences-grid { overflow: visible; }
.reader-settings-page .reader-settings-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.reader-settings-page .reader-settings-note { color: var(--muted); }

@media (max-width: 680px) {
  .reader-preferences-shell { padding: 18px; }
  .reader-preferences-grid { grid-template-columns: 1fr; }
  .reader-preferences-shell > footer .aw-button { width: 100%; }
}


/* P1.44.0.2: Schnellzugang im Kopfbereich oberhalb von Konto und Kontakt. */
.header-account-cluster {
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  align-items: center;
  gap: 4px;
  min-width: 246px;
}
.header-account-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.reader-quick-tools {
  position: static;
  z-index: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 34px;
  padding: 2px 4px;
  border: 1px solid #d5e0ec;
  border-radius: 999px;
  background: #f8fbfe;
  color: #08275b;
  box-shadow: none;
}
.reader-quick-tools.is-busy { opacity: .72; }
.reader-quick-button {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}
.reader-quick-button:hover { background: #e8f1fa; }
.reader-quick-button[aria-pressed="true"] {
  background: #0b3d73;
  color: #fff;
}
.reader-quick-button:disabled { cursor: wait; }
.reader-quick-open {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  background: #08275b;
  color: #fff;
}
.reader-quick-open:hover { background: #0b3d73; }
.reader-quick-open svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reader-quick-separator {
  width: 1px;
  height: 22px;
  margin: 0 1px;
  background: #d5e0ec;
}
.reader-quick-font { display: inline-flex; align-items: center; gap: 0; }
.reader-quick-font-small { font-size: .72rem; }
.reader-quick-font-medium { font-size: .88rem; }
.reader-quick-font-large { font-size: 1.04rem; }
.reader-quick-theme svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reader-quick-theme .reader-theme-moon { display: none; }
.reader-quick-theme[aria-pressed="true"] .reader-theme-sun { display: none; }
.reader-quick-theme[aria-pressed="true"] .reader-theme-moon { display: block; }

html[data-aw-contrast="dark"] .reader-quick-tools {
  background: rgba(28,41,54,.97);
  color: var(--ink);
  border-color: var(--line);
}
html[data-aw-contrast="dark"] .reader-quick-button:hover { background: #314354; }
html[data-aw-contrast="dark"] .reader-quick-button[aria-pressed="true"],
html[data-aw-contrast="dark"] .reader-quick-open { background: #a8d2ff; color: #101923; }
html[data-aw-contrast="high"] .reader-quick-tools { border-color: #000; box-shadow: none; }
html[data-aw-contrast="high"] .reader-quick-button[aria-pressed="true"],
html[data-aw-contrast="high"] .reader-quick-open { background: #000; color: #fff; }

@media (max-width: 1180px) {
  .header-account-cluster {
    display: contents;
    min-width: 0;
  }
  .header-account-row {
    display: contents;
  }
  .reader-quick-tools {
    position: fixed;
    top: auto;
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(78px + env(safe-area-inset-bottom));
    z-index: 55;
    min-height: 48px;
    padding: 5px;
    gap: 4px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 12px 32px rgba(8,39,91,.17);
    backdrop-filter: blur(12px);
  }
  .reader-quick-button { width: 38px; height: 38px; flex-basis: 38px; }
  .reader-quick-open { width: 42px; height: 42px; flex-basis: 42px; }
  .reader-quick-open svg { width: 25px; height: 25px; }
  .reader-quick-separator { height: 28px; margin: 0 2px; }
  .reader-quick-font-small { font-size: .8rem; }
  .reader-quick-font-medium { font-size: 1rem; }
  .reader-quick-font-large { font-size: 1.2rem; }
  .reader-quick-theme svg { width: 21px; height: 21px; }
}
@media (max-width: 620px) {
  .reader-quick-tools { min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
  .reader-quick-tools .reader-quick-separator,
  .reader-quick-tools .reader-quick-font,
  .reader-quick-tools .reader-quick-theme { display: none; }
  .reader-quick-open { box-shadow: 0 10px 28px rgba(8,39,91,.24); }
}
@media print {
  .reader-quick-tools { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .reader-preferences-dialog,
  .reader-pref-select,
  .reader-pref-toggle,
  .reader-dialog-close { border: 1px solid CanvasText; forced-color-adjust: auto; }
  .reader-preferences-dialog::backdrop { background: rgba(0,0,0,.7); }
}
