/* Dashboard kabugu: FAB guvenli alani + ic ice scrollbar giderme
   ----------------------------------------------------------------------------
   2026-09-24: bu dosya `analytics-stage-b-hardening-2026-06-10.css` idi. Analiz
   sayfasi silinince (PR #7270) 425 satirin 332'si konusuz kaldi; geriye yalniz
   KABUK kurallari kaldi ve dosya adi artik yaniltiyordu.

   Icindekiler ve neden duruyorlar:
   - `--tm-analytics-fab-clearance` + `.tm-dashboard-tab-inner` / `.tm-page` /
     `.tm-live-page` padding-right: yuzen destek dugmesi icerigi kapatmasin diye.
     `:where(:not(.tm-ds *))` dislamalari KALDI cunku kural DS kapsami DISINDAKI
     dashboard bolumlerinde (products, pricing, xml, reports) hala eslesiyor.
   - `body` ve `#tmv2App` icin `overflow-y: clip`: CSS Overflow 3.1 geregi
     `overflow-x:hidden` + `overflow-y:visible` ikinci scrollbar uretiyordu.
   Token adindaki "analytics" tarihsel; degeri FAB genisligi + offset + bosluk.
   ---------------------------------------------------------------------------- */

:root {
  /* FAB clearance = FAB width (--tmv2-sp-11=44px) + FAB right offset
     (--tmv2-sp-4=16px) + visual gap (--tmv2-sp-3=12px). Tokenize so
     theme-variables.css değişirse otomatik takip eder. */
  --tm-analytics-fab-clearance: calc(var(--tmv2-sp-11) + var(--tmv2-sp-4) + var(--tmv2-sp-3));
}
@media (min-width: 769px) {
  /* PR-B4 2026-06-11: kapsam tüm dashboard yüzeylerine genişletildi.
     `#analyticsTab` scope kullanıcı şikayetiyle yetersiz bulundu → Canli/
     Overview/Orders ve `.tm-page` (Live perf gibi) sayfalarda FAB hâlâ
     content kapatıyordu. */
  .tm-dashboard-tab-inner:where(:not(.tm-ds *)),
.tm-page:where(:not(.tm-ds *)),
.tm-live-page:where(:not(.tm-ds *)) {
    padding-right: max(
      var(--tm-analytics-fab-clearance),
      calc(env(safe-area-inset-right, 0px) + var(--tm-analytics-fab-clearance))
    ) !important;
  }
}

/* PR-B4 2026-06-11: body always-show scrollbar (`overflow-y: scroll`) +
   html natural scroll bazı browser'larda 2 sağ-scrollbar gösteriyor.
   FIX 2026-08-20 (agent-Detector + Playwright-doğrulanmış 2→1): 'visible' YETMİYORDU —
   body'nin overflow-x:hidden'ı yüzünden CSS-spec 'visible'ı 'auto'ya COERCE ediyor →
   body yine scroll-container oluyor (2. scrollbar). 'clip' (aynı dosyanın #tmv2App:383
   deseni) coerce OLMAZ → body scroll-container olmaz, içerik kırpılmaz, scroll html'de sürer. */
body {
  overflow-y: clip !important;
}

/* ----------------------------------------------------------------------------
   9) Nested scrollbar elimination (2026-06-10 PR-B3) — `.tmv2-app` is
   declared with `overflow-x: hidden` (tm-shell-v2.css:10-20). Per CSS spec
   (Overflow Module Level 3 §3.1) when `overflow-x` is non-visible and
   `overflow-y` is left as `visible`, the browser FORCES `overflow-y` to
   compute as `auto` to avoid a layout-incompatible combination. Result:
   `#tmv2App` silently becomes a scrollable container.

   PR-B's padding-right inflated `#tmv2App.scrollHeight` past its
   `clientHeight` (measured 2202 vs 2048 @1920, 2373 vs 2219 @1366), which
   surfaced that latent scroll container as a SECOND right-edge scrollbar
   stacked on top of the existing html/body viewport scrollbar.

   Fix: `overflow-y: clip`. CSS Overflow §3.1 explicitly allows
   `overflow-x: hidden + overflow-y: clip` (both non-visible) WITHOUT the
   forcing rule. `clip` is the same as `hidden` for painting EXCEPT it
   does NOT create a scroll container — no nested scrollbar appears, no
   programmatic scrolling on the element. Page-level scrolling on html/
   body is preserved (document overflow continues to scroll normally).

   Scope is global to `#tmv2App` because the architectural rule lives at
   the shell level; the same redundant nested scroll affects overview /
   canli / orders tabs whenever their content overflows. Limiting this
   to `:has(#analyticsTab)` is meaningless — `#analyticsTab` is always
   present in the tabbed DOM (just hidden when another tab is active).
   ---------------------------------------------------------------------------- */
#tmv2App {
  overflow-y: clip !important;
}
