/* A11y Toolbar – Frontend CSS */
:root {
  --aat-bg: #ffffff;
  --aat-text: #000000;
  --aat-border: #e0e0e0;
  --aat-accent: #1976d2;
  --aat-accent-contrast: #ffffff;
  --aat-tool-active-bg: #e53935;
  --aat-tool-active-text: #ffffff;
  --aat-highlight-links-bg: #ffff99;
  --aat-highlight-links-text: #000000;
  --aat-shadow: rgba(0,0,0,0.1);
}

/* Toolbar & Access icon */
#toolbar { position: fixed; z-index: 9999999; max-width: 360px; border-radius: 10px; max-height: 80vh; overflow: hidden; border: 1px solid var(--aat-border); box-shadow: 0 8px 30px rgba(0,0,0,.15); background: var(--aat-bg); }
#accessarea { position: fixed; z-index: 10002; width: 60px; height: 60px; border-radius: 50%; display:flex; align-items:center; justify-content:center; cursor:pointer; box-shadow: 0 6px 18px rgba(0,0,0,.25); background: var(--aat-accent); color: var(--aat-accent-contrast); }
#accessarea i { font-size: 42px; line-height: 1; }
#accessarea.has-active::after {
  content: "▴";
  position: absolute;
  right: -6px;
  top: -6px;
  background: #ff4757;
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 9px;
  font-size: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

/* Position classes for toolbar */
.aat-pos-oben-links    { top: 10px; left: 10px; }
.aat-pos-oben-mitte    { top: 10px; left: 50%; transform: translateX(-50%); }
.aat-pos-oben-rechts   { top: 10px; right: 10px; }
.aat-pos-mitte-links   { top: 50%; left: 10px; transform: translateY(-50%); }
.aat-pos-mittig        { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.aat-pos-mitte-rechts  { top: 50%; right: 10px; transform: translateY(-50%); }
.aat-pos-unten-links   { bottom: 10px; left: 10px; }
.aat-pos-unten-mitte   { bottom: 10px; left: 50%; transform: translateX(-50%); }
.aat-pos-unten-rechts  { bottom: 10px; right: 10px; }

/* Position classes for access icon */
.aat-access-oben-links    { top: 30px; left: 30px; }
.aat-access-oben-mitte    { top: 30px; left: 50%; transform: translateX(-50%); }
.aat-access-oben-rechts   { top: 30px; right: 30px; }
.aat-access-mitte-links   { top: 50%; left: 30px; transform: translateY(-50%); }
.aat-access-mittig        { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.aat-access-mitte-rechts  { top: 50%; right: 30px; transform: translateY(-50%); }
.aat-access-unten-links   { bottom: 30px; left: 30px; }
.aat-access-unten-mitte   { bottom: 30px; left: 50%; transform: translateX(-50%); }
.aat-access-unten-rechts  { bottom: 30px; right: 30px; }

/* Header with Close & Reset */
.aat-header {
  display:flex;
  align-items:center;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--aat-border);
  background: var(--aat-bg);
}
.aat-header .aat-btn {
  width: 36px; height: 36px;
  display:inline-flex; align-items:center; justify-content:center;
  border: 1px solid var(--aat-border);
  border-radius: 8px;
  background: #f6f7f7;
  cursor: pointer;
  color: var(--aat-accent);
}
.aat-header .aat-btn:hover { background:var(--aat-accent); color:#ffffff; }

/* Scrollable content */
.aat-body {
  max-height: calc(80vh - 54px);
  overflow: auto;
  padding: 8px;
}

/* Sliders */
.control { display: block; padding: 6px 8px; background: #fafafa; border: 1px solid var(--aat-border); border-radius: 8px; margin: 6px 0; }
.control label { font-size:12px; color: var(--aat-text); display:block; margin-bottom: 6px; text-align:center; }
.range { display:flex; align-items:center; gap:8px; justify-content:center; }
.range-btn { width:28px; height:28px; line-height:26px; text-align:center; border:2px solid #000000; border-radius:6px; background:#f0f0f0; cursor:pointer; user-select:none; font-weight:700; }
.range input[type="range"] { width: 120px; }

/* Tools grid - 3 columns desktop */
.aat-tools-grid {
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 6px;
}
.tool {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap: 4px; min-height: 90px; padding: 8px;
  border: 1px solid var(--aat-border);
  border-radius: 10px;
  background: var(--aat-bg);
  color: var(--aat-text); cursor: pointer; user-select: none;
}
.tool .tool-icon { font-size: 22px; line-height:1; }
.tool .tool-label { font-size:11px; text-align:center; line-height: 15px; }
.tool.active { background: var(--aat-tool-active-bg); color: var(--aat-tool-active-text); border-color: var(--aat-tool-active-bg); }
.tool.active .tool-icon, .tool.active .tool-label { color: var(--aat-tool-active-text); }

/* States */
.highlighted { outline: 2px solid rgba(0,128,255,0.5); }
.grayscale-mode { filter: grayscale(100%) !important; }
.saturation-mode { filter: saturate(200%) !important; }
.combo-mode { filter: grayscale(100%) saturate(200%) !important; }
.hide-images-mode img { visibility: hidden !important; }
.hide-images-mode * { background-image:none !important; }
.no-anim, .no-anim * { transition:none !important; animation:none !important; }

/* Magnifier */
#magnifier { position: fixed; pointer-events: none; background: rgba(0,0,0,0.7); color: #fff; font-size: 30px; padding: 8px; border-radius: 4px; display: none; z-index: 10001; line-height: 40px; }

/* Custom cursor */
.custom-cursor { position: fixed; transform: translate(-10%, -10%); pointer-events: none; z-index: 9999999; display: none; color: #fff; font-size: 5rem; transition: transform 0.2s ease-in-out; text-shadow: 0 0 3px #000; }
.custom-cursor .hover-icon { display: none; }
.custom-cursor.hover-effect .default-icon { display: none; }
.custom-cursor.hover-effect .hover-icon { display: inline; }
.custom-cursor.hover-effect { transform: scale(1.9) translate(-10%, -10%); }
body.large-cursor-active { cursor: none; }
body.large-cursor-active .custom-cursor { display: block; }
/* Regeln für "Lesemaske" */
#lesemask {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999998;
  pointer-events: none;
}
#maskTop, #maskBottom {
  position: fixed; /* <-- Hier ist die entscheidende Eigenschaft */
  left: 0; right: 0;
  background: rgba(0, 0, 0, 0.6);
}
/* Links hervorheben */
.highlight-links-mode a { background: var(--aat-highlight-links-bg) !important; color: var(--aat-highlight-links-text) !important; border-radius:2px; display:inline-block; padding: 10px 10px !important; margin: 2px !important; min-width: fit-content;}
.highlight-links-mode i, .highlight-links-mode span, .highlight-links-mode span::before { color: var(--aat-highlight-links-text) !important; }

/* Mobile fullscreen */
@media (max-width: 768px) {
  #toolbar {
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    width: 100vw; height: 100vh; max-width: none; max-height: none; border-radius: 0;
    transform: none !important;
  }
  .aat-body { max-height: calc(100vh - 54px); }
  .aat-tools-grid { grid-template-columns: repeat(2, 1fr); }
}
