/* §TOUCH-GESTURES-2026-11-13 — Optik zu ec-touch-gestures.js (Wischgesten der Handy-Shell).
   Monochrom wie §MONO-2026-11-11. Antwort-Symbol und Pfeil haengen an <body> (nie im Chat-Stream),
   daher keine Shell-ID-Kaskade noetig. */

/* Chat-Panel waehrend des Zurueck-Wischens: Schatten an der linken Kante (setzt das Skript inline mit
   !important — diese Regel allein verlor gegen die Glas-Schatten der Shell). */
#ec-mobile-shell [data-ecm-panel="chat"].ec-tg-dragging {
  box-shadow: -14px 0 28px rgba(0, 0, 0, 0.55);
}

/* Waehrend eines Dialog-Wischs nicht an die Seite weiterreichen (Chrome: Ziehen zum Aktualisieren). */
html.ec-tg-pull,
html.ec-tg-pull body {
  overscroll-behavior-y: none;
}

/* Antwort-Symbol links neben der gezogenen Blase. */
.ec-tg-reply {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2147482001;   /* knapp ueber #cd-shell (fixed, 2147482000), die die ganze App traegt; Dialoge/Sperre: siehe unten */
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f5f5f5;
  background: rgba(28, 28, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
}
.ec-tg-reply.is-on { visibility: visible; }
.ec-tg-reply.is-armed {
  color: #0a0a0a;
  background: #f5f5f5;
  border-color: #f5f5f5;
}
.ec-tg-reply svg { width: 18px; height: 18px; }

/* Pfeil „Zur neuesten Nachricht“ unten rechts ueber der Eingabeleiste (bottom setzt das Skript). */
.ec-tg-pill {
  position: fixed;
  right: calc(14px + env(safe-area-inset-right, 0px));
  bottom: 84px;
  z-index: 2147482001;   /* knapp ueber #cd-shell (fixed, 2147482000), die die ganze App traegt; Dialoge/Sperre: siehe unten */
  width: 42px;
  height: 42px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f5f5f5;
  background: rgba(22, 22, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  transform: translate3d(0, 8px, 0) scale(0.92);
  transition: opacity 180ms ease-out, transform 220ms cubic-bezier(.34, 1.4, .64, 1);
}
.ec-tg-pill.is-on { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
.ec-tg-pill[hidden] { display: none !important; }
.ec-tg-pill:active { transform: scale(0.94); }
.ec-tg-pill:focus-visible { outline: 2px solid #f5f5f5; outline-offset: 2px; }
.ec-tg-pill svg { width: 20px; height: 20px; }

/* Nie ueber Dialogen, Menues, Sperrbild, Sichtschutz, Anruf oder Vorschau (der Pfeil liegt ueber #cd-shell). */
html.ec-call-open .ec-tg-pill,
body.ec-blur-active .ec-tg-pill,
body:has(.modal-overlay.active) .ec-tg-pill,
body:has(.ec-ctx-overlay) .ec-tg-pill,
body:has(#pin-screen.active) .ec-tg-pill,
body:has(#media-preview.active) .ec-tg-pill,
body:has(.ec-voice-dock) .ec-tg-pill,
body:has(#aura-chat-window.aura-active) .ec-tg-pill,
body:has(#ec-intro-overlay.active) .ec-tg-pill { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .ec-tg-pill { transition: none; }
}

/* §TOUCH-PHYSICS-2026-11-13 — Chatliste UNTER dem Chat, solange der Zurueck-Wisch laeuft (ec-tg-peek an der
   Shell, setzt/entfernt nur ec-touch-gestures.js). Die Liste ist sonst [hidden] = display:none (setTab);
   hier liegt sie absolut im selben Bereich, ohne Klicks (aria-hidden bleibt "true"), Transform/Deckkraft
   inline aus dem Skript. 7× ID: mobile-overrides.css erzwingt [hidden]{display:none!important}. */
html body.ec-mobile-shell-active:not(.ec-split) #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell.ec-tg-peek .ec-mobile-content {
  position: relative !important;
}
html body.ec-mobile-shell-active:not(.ec-split) #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell.ec-tg-peek .ec-mobile-content > [data-ecm-panel="chats"] {
  display: grid !important;
  visibility: visible !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;
}
html body.ec-mobile-shell-active:not(.ec-split) #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell.ec-tg-peek .ec-mobile-content > [data-ecm-panel="chat"] {
  position: relative !important;
  z-index: 1 !important;
}

/* Waagerechter Wisch im Chat gehoert den Gesten: der Browser schwenkt dort nur senkrecht. Ohne das scrollte
   der Verlauf bei einem schraegen Wisch gleichzeitig mit (passive Listener koennen das nicht verhindern).
   Beginnt die Bewegung senkrecht, scrollt alles wie gewohnt; innere Scroller (z. B. Code) bleiben waagerecht. */
html body.ec-mobile-shell-active:not(.ec-split) #ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell#ec-mobile-shell [data-ecm-panel="chat"] :is(#ec-mobile-chat-stream, .ecm-chat-head) {
  touch-action: pan-y pinch-zoom !important;
}
