/* tenant-theme-override.css — 2026-05-29 (rev2: regression-safe)
 *
 * STRICT PRINCIPLE (user directive):
 *   "Frontend mevcut halini koru. DB seed = mevcut frontend rengi.
 *    Default state'te bu override sıfır görsel delta üretmeli;
 *    sadece admin form'da bir değer değiştirdiğinde paint farkı oluşmalı."
 *
 * Rev1 (the version before this) painted properties whose form/DB seed
 * did NOT match the actual legacy CSS, so even "default" state changed
 * visuals:
 *   - KAYIT text became #000 (legacy #1a1a00)
 *   - GİRİŞ text became gold (legacy #fff)
 *   - GİRİŞ bg became transparent (legacy rgba(10,40,25,0.6))
 *   - GİRİŞ border became gold (legacy #1a8a5c green) — no form field
 *   - Active tab text became gold (legacy #fff/#000) — no form field
 * Rev2 fixes by:
 *   (a) Removing properties that have NO form backing (border-color on
 *       GİRİŞ, color on active-tab) — legacy continues to paint them.
 *   (b) DB seed updated to actual legacy values for the remaining
 *       form-backed properties (see SQL applied 2026-05-29 to both
 *       tenant 1 and tenant 11).
 *   (c) Var fallbacks now match legacy paint exactly so even if the
 *       cssOverrides block fails to inject, visual stays close.
 *
 * Form CAN control (var-wired here):
 *   theme_primary           -> KAYIT background, .bg-primary, .text-primary
 *   theme_btn_primary_text  -> KAYIT text, .bg-primary text
 *   theme_login_btn_bg      -> GİRİŞ background
 *   theme_login_btn_text    -> GİRİŞ text
 *   theme_secondary         -> balance widget text
 *   theme_primary (also)    -> active-tab UNDERLINE, bottom-tab active icon
 *
 * Form CANNOT control (legacy hardcoded literal — no override here):
 *   GİRİŞ border color (legacy #1a8a5c green, no form field)
 *   Active-tab text color (legacy #fff/#000 varies, no form field)
 *   KAYIT gradient stops (legacy linear-gradient, single-color form
 *     field can't represent a 2-stop gradient — KAYIT bg becomes flat
 *     when form is used, gradient lost. Trade-off documented for the
 *     user; can be enriched with theme_primary_light/_dark later.)
 *
 * Safe rollback: remove the <link> tag from BaseLayout.astro + delete
 * this file. No legacy CSS touched.
 */

/* KAYIT — bg (flat: gradient lost) + text follow form */
html.mobile-root body.mobile-site .mobileHeader-actions .hdr-btn-register,
html.mobile-root body.mobile-site .mobileHeader-actions #openRegister,
html.mobile-root body.mobile-site .hdr-btn-register,
html.mobile-root body.mobile-site #openRegister,
html.mobile-root body.mobile-site .btn-register {
  background: var(--primary, #d4af37) !important;
  /* ITER 1008 (2026-05-31): fallback #1a1a00 → #fff. Merit DB'de --btntText
     explicit set ediyor (#1a1a00 koyu zeytin gold üstünde), Ferrari'de DB'de
     bu key YOK (sadece theme.text=#fff, theme.primary=#DC0000 var) → CSS
     fallback paint. Eski fallback Ferrari'de Merit-leak yapıyordu (ITER 1003
     KAYIT siyah bug'ın aslında HÂLÂ devam eden tarafı, agent tanı 2026-05-31).
     #fff fallback = Ferrari için doğru beyaz, Merit explicit set bozulmuyor. */
  color: var(--btntText, #fff) !important;
}

/* GİRİŞ — bg + text follow form. Border intentionally NOT touched
   so legacy green border (#1a8a5c) keeps painting until a form field
   exists for it. */
html.mobile-root body.mobile-site .mobileHeader-actions .hdr-btn-login,
html.mobile-root body.mobile-site .hdr-btn-login,
html.mobile-root body.mobile-site #Giris,
html.mobile-root body.mobile-site .btn-login {
  background: var(--login-button-bg, rgba(10, 40, 25, 0.6)) !important;
  color: var(--login-button-text, #ffffff) !important;
}

/* Active tab UNDERLINE only — text color intentionally NOT touched.
   Legacy tabs paint text white or black depending on variant; no form
   field exists to override that, and painting --primary universally
   would change tab text color (regression). */
html.mobile-root body.mobile-site .slot-hero-tab--active,
html.mobile-root body.mobile-site .bs-deposit-tab.is-active,
html.mobile-root body.mobile-site .nav-tab.active,
html.mobile-root body.mobile-site .tab.active {
  border-bottom-color: var(--primary, #d4af37) !important;
}

/* Bottom-tab active icon — legacy uses --mobileFootIcon already
   in some files, gold by convention. Form theme_mobile_foot_icon was
   "dead var" per audit; we now bind it. DB seed must = legacy gold so
   default state is identical. */
html.mobile-root body.mobile-site .bottom-tab-item.active,
html.mobile-root body.mobile-site .bottom-tab a.active,
html.mobile-root body.mobile-site .mobileFooter-item.active {
  color: var(--mobileFootIcon, var(--primary, #d4af37)) !important;
}
html.mobile-root body.mobile-site .bottom-tab-item.active svg,
html.mobile-root body.mobile-site .bottom-tab a.active svg,
html.mobile-root body.mobile-site .mobileFooter-item.active svg {
  fill: var(--mobileFootIcon, var(--primary, #d4af37)) !important;
  color: var(--mobileFootIcon, var(--primary, #d4af37)) !important;
}

/* Opt-in utility classes — only paint elements that explicitly carry
   .text-primary / .bg-primary / .btn-primary. Won't touch unrelated
   markup. */
html.mobile-root body.mobile-site .text-primary,
html.mobile-root body.mobile-site .badge-primary {
  color: var(--primary, #d4af37) !important;
}
html.mobile-root body.mobile-site .bg-primary,
html.mobile-root body.mobile-site .btn-primary:not(.hdr-btn-login):not(.hdr-btn-register) {
  background: var(--primary, #d4af37) !important;
  /* ITER 1008 (2026-05-31): same fix — fallback #1a1a00 → #fff. Aynı sebep,
     diğer btn-primary instances için (slot OYNA, modal submit, vs.) */
  color: var(--btntText, #fff) !important;
}

/* Balance widget text — legacy already uses var(--secondary, #fcac00).
   Override hardens against any future rule that hardcodes a literal.
   Fallback matches legacy #fcac00. */
html.mobile-root body.mobile-site .mobileHeader-balance-v,
html.mobile-root body.mobile-site .balanceAmount {
  color: var(--secondary, #fcac00) !important;
}
