/* Temel katman - reset, body, scrollbar, yardimcilar, tooltip, animasyonlar, erisilebilirlik */

/* ============================================================
   2. RESET + BODY
   ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  height: 100vh; width: 100vw;
  font-family: var(--font); color: var(--text);
  background: radial-gradient(ellipse at top left, #e9e9ef 0%, #d4d4dc 60%, #cfcfd6 100%);
  background-attachment: fixed;
  overflow: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.col-flex { display: flex; flex-direction: column; gap: 10px; }
.spacer { flex: 1; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }

/* ============================================================
   21. SCROLLBAR
   ============================================================ */
/* Genislik 10px: pencerenin sag kenar boyutlandirma tutamaci disariki 4px'i kapatiyor,
   kalan 6px fareyle tutulabilsin. Thumb 3px seffaf kenarla iceri cekilir. */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb); border-radius: 5px;
  border: 3px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); background-clip: padding-box; }
/* Firefox'ta pseudo-element yok. Chrome'a verilmez: scrollbar-color tanimlanan elemanda
   ::-webkit-scrollbar kurallari yok sayilir, yukaridaki genislik/kenar ayari bosa duser. */
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
}

/* ============================================================
   29. ANIMATIONS / MICRO-INTERACTIONS
   ============================================================ */

@keyframes pai-fade-in   { from { opacity: 0; }  to { opacity: 1; } }
@keyframes pai-fade-up   { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pai-fade-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pai-pop-in    { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }

.fade-in    { animation: pai-fade-in   0.25s ease-out both; }



/* Smooth row hover for tables (override default) */
.dtable tbody tr {
  transition: background 0.12s ease;
}

/* Button micro-interaction (active press) */
.btn:active:not(:disabled) {
  transform: scale(0.97);
  transition: transform 0.06s ease;
}

/* Focus visible (accessibility) */
.btn:focus-visible,
.mac-input:focus-visible,
.mac-textarea:focus-visible,
.icon-btn:focus-visible,
.suite-tab:focus-visible,
.segment-tab:focus-visible,
.pai-sekme-oge:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--mac-blue);
  outline-offset: 2px;
}

/* Kabi kirpiyorsa ice bas. Kaydirilan ya da overflow:hidden tasiyan kapta disa tasan halka
   kesiliyor; kap `pai-odak-ic` tasir ve icindekilerin halkasi iceri doner.
   `.btn` disarida: kendi golgesi var, inset onu silerdi. */
/* olu-css: sakla — kirpan kapta odak halkasinin kesilmesine karsi yazilmis kap sinifi;
   mekanizma hazir, henuz hicbir ekran kullanmiyor (bkz. ui-design-system tuzak 7.3). */
.pai-odak-ic :is([tabindex]:not([tabindex="-1"]), [role="button"]):focus-visible,
.pai-tablo-kart :is([tabindex]:not([tabindex="-1"]), [role="button"]):focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--mac-blue);
}

/* ============================================================
   30. ACCESSIBILITY HELPERS
   ============================================================ */

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
