/* Scrollhinweis, Baustein der Schmiede (B51, 04.12.2026). Gehoert zu scrollhinweis.js.
   Anpassen ueber Variablen an einem Vorfahren: --scrollhinweis-farbe (Zeiger, Text), --scrollhinweis-hell (Schrift im Text),
   --scrollhinweis-balken (Bildlaufbalken). --scrollhinweis-grund setzt das Skript aus dem Hintergrund des Kastens. */
.scrollhinweis { position: relative; --scrollhinweis-farbe: #112F4D; --scrollhinweis-hell: #FFFDF8; --scrollhinweis-balken: #6E604C; }
/* Bildlaufbalken immer sichtbar: Chrome und Safari zeigen mit ::-webkit-scrollbar einen festen Balken statt eines verschwindenden.
   scrollbar-width/-color nur dort, wo es ::-webkit-scrollbar nicht gibt (Firefox), sonst ueberstimmt es den festen Balken in Chrome. */
.scrollhinweis__kasten { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-gutter: stable; }
@supports not selector(::-webkit-scrollbar) { .scrollhinweis__kasten { scrollbar-width: thin; scrollbar-color: var(--scrollhinweis-balken) transparent; } }
.scrollhinweis__kasten::-webkit-scrollbar { inline-size: 10px; block-size: 10px; }
.scrollhinweis__kasten::-webkit-scrollbar-track { background: transparent; }
.scrollhinweis__kasten::-webkit-scrollbar-thumb { background: var(--scrollhinweis-balken); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; min-block-size: 40px; }
.scrollhinweis__kasten.ist-hinweis { scroll-behavior: auto; }
/* Am Handy darf das Wischen am Ende der Mail weiter den Dialog oder die Seite schieben, sonst sitzt man im Kasten fest */
@media (pointer: coarse) { .scrollhinweis .scrollhinweis__kasten { overscroll-behavior-y: auto; } }
@media (hover: hover) and (pointer: fine) {
  .scrollhinweis.ist-scrollbar .scrollhinweis__kasten { cursor: grab; }
  .scrollhinweis.ist-ziehen .scrollhinweis__kasten { cursor: grabbing; }
}
.scrollhinweis.ist-greifen .scrollhinweis__kasten { -webkit-user-select: none; user-select: none; }

/* Verlauf am unteren Rand, solange noch etwas folgt */
.scrollhinweis__verlauf { position: absolute; block-size: 64px; pointer-events: none; opacity: 0; transition: opacity .25s ease;
  background: linear-gradient(to bottom, transparent, var(--scrollhinweis-grund, #FFFFFF) 88%); }
.scrollhinweis.ist-mehr .scrollhinweis__verlauf { opacity: 1; }

/* Ruhiger Text, auch bei "Bewegung reduzieren" */
.scrollhinweis .scrollhinweis__text { position: absolute; margin: 0; transform: translate(-50%, -100%); pointer-events: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px 7px 12px; border-radius: 999px;
  background: var(--scrollhinweis-farbe); color: var(--scrollhinweis-hell); font: 600 0.875rem / 1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
  box-shadow: 0 4px 14px rgba(17, 47, 77, .22); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s; }
.scrollhinweis .scrollhinweis__pfeil { font-size: 1rem; line-height: 1; }
.scrollhinweis.zeigt-text.ist-mehr .scrollhinweis__text { opacity: 1; visibility: visible; transition: opacity .3s ease; }

/* Zeiger: Maus mit Rad oder Finger, nur waehrend des Hinweises */
.scrollhinweis__zeiger { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; will-change: transform, opacity; z-index: 1; }
.scrollhinweis__zeiger--maus svg { display: block; margin: -4px 0 0 -5px; filter: drop-shadow(0 3px 6px rgba(17, 47, 77, .3)); }
.scrollhinweis__kuppe { position: absolute; left: -22px; top: -22px; inline-size: 44px; block-size: 44px; border-radius: 50%;
  background: rgba(255, 253, 248, .94); border: 2px solid var(--scrollhinweis-farbe); box-shadow: 0 6px 16px rgba(17, 47, 77, .3); box-sizing: border-box; }
.scrollhinweis__kuppe::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--scrollhinweis-farbe); opacity: .18; }
.scrollhinweis__spur { position: absolute; left: -11px; top: 0; inline-size: 22px; block-size: 0; border-radius: 11px;
  background: linear-gradient(to bottom, rgba(17, 47, 77, .26), rgba(17, 47, 77, 0)); }

@media (prefers-reduced-motion: reduce) {
  .scrollhinweis__verlauf, .scrollhinweis .scrollhinweis__text, .scrollhinweis.zeigt-text.ist-mehr .scrollhinweis__text { transition: none; }
  .scrollhinweis__zeiger { display: none; }
}
@media (forced-colors: active) {
  .scrollhinweis__text { border: 1px solid CanvasText; }
  .scrollhinweis__verlauf { display: none; }
}
