/**
 * global.css — Reset ve temel stiller (Apple HIG)
 *
 * Box model reset, body varsayilanlari, focus ve selection stilleri.
 * Apple Design Language: temiz, hafif, bol beyaz alan.
 */

/* ===== Reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== HTML — scrollbar kararliligi ===== */
html {
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

/* ===== Body ===== */
body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  letter-spacing: var(--letter-spacing-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-width: 0;
}

/* ===== Erisilebirlik — Focus Visible ===== */
:focus-visible {
  outline: 3px solid var(--color-brand-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Mouse ile tiklamada outline gizle, klavye ile goster */
:focus:not(:focus-visible) {
  outline: none;
}

/* ===== Selection ===== */
::selection {
  background-color: var(--color-brand-light);
  color: var(--color-text-primary);
}

/* ===== Genel Yardimci Stiller ===== */
img {
  max-width: 100%;
  display: block;
}

/* File ref bekleyen gorseller: cozumlenene kadar gizle (kirik ikon onleme) */
img[data-file-ref] {
  visibility: hidden;
}

img[data-file-ref].file-ref--loaded {
  visibility: visible;
}

a {
  color: var(--color-brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-brand-hover);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  font-size: inherit;
  /* Layout kaymasi onleme */
  -webkit-tap-highlight-color: transparent;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

textarea {
  resize: vertical;
}

/* App container — layout kararliligi */
#app {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Screen reader only — gorunmez ama erisilebilir */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===== Scrollbar Apple Style ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-text-tertiary);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-secondary);
  background-clip: content-box;
}
