/* ─────────────────────────────────────────────────────────────────
 * home-overlay-stack-fix.css — ITER 393 (BS-paralel)
 * ─────────────────────────────────────────────────────────────────
 * User directive 2026-05-12: "tamam ama anasayfanın en başından
 * en sonuna kadar genişlet taramayı. daha detaylı"
 *
 * Source data (rule #20 numeric evidence from live MR + BS measurement
 * 2026-05-12, MR tab 1067854260 + BS tab 1067854104):
 *
 *   ELEMENT           BS              MR (pre-fix)        ΔBS-MR
 *   ─────────────────────────────────────────────────────────────
 *   ann z-index       953             1200                +247
 *   ann font-size     12px            11px                -1  (ITER 395 fix)
 *   ann bg            rgb(0,0,0)      rgb(0,0,0)          0  ✓
 *   header z-index    auto (static)   1085                +1085
 *   header position   static          fixed               diff
 *   bottom-tab z-idx  950             1200                +250
 *   bottom-tab bg     rgb(18,18,18)   rgb(18,18,18)       0  ✓
 *   live card w       140px           141.6px             +1.6
 *   live card h       188px           189.6px             +1.6
 *     → root cause: box-sizing:content-box + border 0.8px each side
 *       (0.8 + 0.8 = 1.6 outside). Fix: box-sizing:border-box.
 *   crash card w/h    140/188         141.6/189.6         +1.6  (same)
 *   quick-tile bg     rgb(0,0,0)      rgba(0,0,0,0.45)    translucent
 *   quick-tile icon   55×55           35.28×47.03         -19.7×-7.97
 *   quick-tile gap    8px (BS-tile)   8px                 0  ✓
 *
 * Specificity strategy (rule #38 ladder):
 *   Load order: this file loads AFTER bs-live-portrait-fix.css
 *   (line 473 in BaseLayout.astro) so equal-specificity rules win
 *   via source order. For higher-specificity rules from earlier
 *   files (menu-drawer-fixes.css §65-71 z:1200 via .X.X.Y.Y compound,
 *   three-dot-menu.css §35-38 z:1085) we use even-higher specificity
 *   chains (.X.X.X.Y.Y.Y triple-chain).
 *
 * Override registry: AI_USER_OVERRIDES.md (none — pure BS-paralel target).
 * Related: rule #20 (numeric evidence), #30 (file ownership — this
 *   file owned by ITER 393), #34 (full audit), #119 (no BIREBIR),
 *   #144 (pixel-diff), #153 (instant deploy), #156 (systemic audit),
 *   #158 (9-layer render audit), #159 (extract-clone-verify-iterate).
 *
 * Rule #156 systemic z-index audit (other CSS files scanned for z>1000):
 *   theme-robinbet-mobile.css L19097 ann z:1200 → overridden here
 *   three-dot-menu.css       L37    hdr z:1085 → overridden here
 *   menu-drawer-fixes.css    L71    btab z:1200 → overridden here
 *   bottom-tab-fix.css       L25    btab z:950 (already BS-target, no conflict)
 * ───────────────────────────────────────────────────────────────── */

/* ── §1. Announcement bar z-index 1200 → 953 (BS-target)
 *       Theme-robinbet-mobile.css §19090-19098 sets z:1200 with
 *       specificity (0,4,2). This file loads after, equal-specificity
 *       same selector — later wins. */
html.mobile-root body.mobile-site #mobAnnouncementBar,
html.mobile-root body.mobile-site .mob-announcement-bar {
  z-index: 953 !important;
}

/* ── §2. Announcement bar font-size → 12px (BS-exact, ITER 395)
 *       BS computed: 12px / line-height 18px (1.5×12).
 *       Previous ITER 393 set 16px (wrong — MR pre-fix was 11px,
 *       BS-target is 12px not 16px). Corrected 2026-05-12.
 *       Specificity bump retained for theme-robinbet override. */
html.mobile-root body.mobile-site #mobAnnouncementBar,
html.mobile-root body.mobile-site .mob-announcement-bar.mob-announcement-bar--styled,
html.mobile-root body.mobile-site .mob-announcement-bar.mob-announcement-bar.mob-announcement-bar,
html.mobile-root body.mobile-site #mobAnnouncementBar .mob-announce-text,
html.mobile-root body.mobile-site #mobAnnouncementBar span.mob-announce-text,
html.mobile-root body.mobile-site #mobAnnouncementBar span.mob-announce-text.mob-announce-text,
html.mobile-root body.mobile-site .mob-announcement-bar.mob-announcement-bar--styled .mob-announce-text,
html.mobile-root body.mobile-site .mob-announcement-bar.mob-announcement-bar--styled span.mob-announce-text {
  font-size: 12px !important;
  line-height: 1.5 !important;
}

/* ── §3. Mobile header z-index 1085 → 950 (BS-target)
 *       three-dot-menu.css §35-38 sets z:1085 with specificity (0,3,3).
 *       Use compound class chain to bump specificity. */
html.mobile-root body.mobile-site header.mobileHeader.mobileHeader,
html.mobile-root body.mobile-site .mobileHeader.mobileHeader,
html.mobile-root body.mobile-site .mobileHeader.mobileHeader .mobileHeader-inner {
  z-index: 950 !important;
}

/* ── §3b. Header inner + outer padding — ITER 431 BS-EXACT (2026-05-18)
 *        User trigger: "exact yap" → rule #160 EXACT KLONLA protocol.
 *        Reverts ITER 430 user override (was: padding-right:6 → 0px gap, too far).
 *        BS measurement (tab 1067854650, 392×594, Android UA, logged-out):
 *          - logo.x = 7  → total left padding to viewport = 7px
 *          - 3-nokta.right = 378 → total right gap to viewport = 14px
 *        MR pre-fix had: outer padding-left:6 + inner padding-left:7 = 13 (BS=7, diff -6)
 *                       outer padding-right:0 + inner padding-right:6 = 6 (BS=14, diff +8)
 *        Fix: zero outer padding, inner padding 0 14 0 7, disable flex gap,
 *             explicit margin-left on KAYIT/3-nokta for BS-exact gaps. */

/* §3b-outer. Zero outer .mobileHeader padding so inner controls all spacing.
 *            theme-robinbet-mobile.css and header.css base default 0 12px / 0 0 0 6
 *            beaten by triple-class chain (0,5,2). */
html.mobile-root body.mobile-site header.mobileHeader.mobileHeader.mobileHeader,
html.mobile-root body.mobile-site .mobileHeader.mobileHeader.mobileHeader {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* §3b-inner. Inner padding BS-exact: 7px left (logo offset), 14px right (3-nokta gap)
 *            Disable flex gap; explicit margins below for BS-exact inter-button gaps. */
html.mobile-root body.mobile-site .mobileHeader.mobileHeader .mobileHeader-inner {
  padding: 0 14px 0 7px !important;
  gap: 0 !important;
}

/* §3b-gaps. BS-exact inter-button margins (was actions gap:7px, BS uses inline margins).
 *           BS: KAYIT margin-left:12 (GIRIS→KAYIT gap=12), 3-nokta margin-left:6 (KAYIT→3-nokta gap=6).
 *           Specificity bumped to (0,4,2) to defeat header-init-fix.css L155 chain
 *           `html.mobile-root body.mobile-site header.mobileHeader .mobileHeader-actions` (0,3,2). */
html.mobile-root body.mobile-site header.mobileHeader .mobileHeader-actions #openRegister,
html.mobile-root body.mobile-site header.mobileHeader .mobileHeader-actions .hdr-btn-register {
  margin-left: 12px !important;
}
html.mobile-root body.mobile-site header.mobileHeader .mobileHeader-actions #smart-panel-holder,
html.mobile-root body.mobile-site header.mobileHeader .mobileHeader-actions .hdr-toggle-button-bc {
  margin-left: 6px !important;
}
html.mobile-root body.mobile-site header.mobileHeader.mobileHeader .mobileHeader-actions {
  gap: 0 !important;
}

/* §3b-letter. BS-exact letter-spacing: normal (MR had 0.5px which made buttons +1-2px wider).
 *             theme-robinbet-mobile.css §3431 sets 0.5px !important — beaten by triple chain. */
html.mobile-root body.mobile-site .mobileHeader.mobileHeader .mobileHeader-actions #Giris,
html.mobile-root body.mobile-site .mobileHeader.mobileHeader .mobileHeader-actions #openRegister,
html.mobile-root body.mobile-site .mobileHeader.mobileHeader .mobileHeader-actions .hdr-btn-login,
html.mobile-root body.mobile-site .mobileHeader.mobileHeader .mobileHeader-actions .hdr-btn-register {
  letter-spacing: normal !important;
}

/* ── §4. Bottom-tab z-index 1200 (ITER 544 user override — 2026-05-20)
 *       User: bottom-bar (CANLI BAHIS / KUPON / SLOT OYNA / DESTEK / MENÜ) HER
 *       ZAMAN drawer (z:1100) üstünde olacak. Previous "BS-exact 950" stale.
 *       This rule still has top specificity (0,7,2) so it must stay aligned
 *       with menu-drawer-fixes.css §74-78 — both now z:1200. */
html.mobile-root body.mobile-site .tab-navigation-w-bc.tab-navigation-w-bc.tab-navigation-w-bc.mobFooter.mobFooter,
html.mobile-root body.mobile-site .mobFooter.mobFooter.mobFooter.mobFooter,
html[lang] body.mobile-site .tab-navigation-w-bc.tab-navigation-w-bc.mobFooter.mobFooter,
html[lang] body.mobile-site .mobFooter.mobFooter.mobFooter {
  z-index: 1200 !important;
}

/* ── §5. Live + Crash card width fix: box-sizing content-box → border-box
 *       Root cause: bs-live-portrait-fix.css §1 sets width:140 + border:1px
 *       but NO box-sizing rule. Browser default content-box adds border
 *       (0.8px each side = 1.6px total) OUTSIDE the 140 width → renders 141.6.
 *       Fix: force border-box so 140 width includes border.
 *       Same fix for height: 188 includes border top+bottom. */
html.mobile-root body.mobile-site section.bs-live-section .bs-live-cards .game-item,
html.mobile-root body.mobile-site section.bs-live-section .bs-live-cards .game-cta,
html.mobile-root body.mobile-site .bs-live-section .bs-live-cards .game-item,
html.mobile-root body.mobile-site .bs-live-section .bs-live-cards .game-cta {
  box-sizing: border-box !important;
  width: 140px !important;
  height: 188px !important;
  min-width: 140px !important;
  min-height: 188px !important;
  flex: 0 0 140px !important;
}

/* ── §6. Quick tile (rb-cat-banner) background rgba(0,0,0,0.45) → rgb(0,0,0)
 *       category-banners-show.css §215-224 sets bg rgba(0,0,0,0.45).
 *       BS uses solid black tile bg (image bakes text/icon onto solid bg).
 *       Specificity bump via 5× chained class. */
html.mobile-root body.mobile-site .rb-category-banners.rb-category-banners.rb-category-banners.rb-category-banners.rb-category-banners > .rb-cat-banner,
html.mobile-root body.mobile-site .rb-category-banners.rb-category-banners.rb-category-banners.rb-category-banners.rb-category-banners > a,
html.mobile-root body.mobile-site .rb-category-banners.rb-category-banners.rb-category-banners.rb-category-banners.rb-category-banners > .rb-category-banner,
html.mobile-root body.mobile-site .rb-category-banners.rb-category-banners.rb-category-banners.rb-category-banners.rb-category-banners > .category-item {
  background: rgb(0, 0, 0) !important;
}

/* ── §7. Quick tile icon size 35.28×47.03 → 55×55 (BS-target)
 *       category-banners-show.css §133-140 sets width:clamp(28px,9vw,44px).
 *       BS icons are 55×55 baked artwork. Force 55×55 via fixed dims. */
html.mobile-root body.mobile-site .rb-category-banners.rb-category-banners .rb-cat-banner > .rb-cat-icon-img,
html.mobile-root body.mobile-site .rb-category-banners.rb-category-banners .rb-cat-banner > img,
html.mobile-root body.mobile-site .rb-category-banners.rb-category-banners > a > img,
html.mobile-root body.mobile-site .rb-category-banners.rb-category-banners .rb-category-banner-icon {
  width: 55px !important;
  height: 55px !important;
  max-width: 55px !important;
  object-fit: contain !important;
}

/* ── §8. iOS safe-area: bottom-tab + announcement keep BS-target z-index
 *       even when env(safe-area-inset-bottom) > 0. No additional rule needed
 *       — §1, §4 are unconditional !important. Documentation only. */
