/* ============================================
   Şekercioğlu Mobilya - Sipariş Takip Sistemi
   Temel Stiller (Base Styles / CSS Reset)
   ============================================
   Modern CSS sıfırlama, temel HTML element 
   stilleri, kaydırma çubuğu ve seçim stilleri.
   ============================================ */

/* ─── Modern CSS Sıfırlama (Reset) ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Doğal akışı olan elementlerde minimum yükseklik kaldır */
html {
  font-size: 16px;
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  height: 100%;
}

[data-theme="dark"] {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  height: 100%;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background: var(--gradient-body);
  background-attachment: fixed;
  overflow-x: hidden;
  letter-spacing: var(--letter-spacing-normal);
}

/* React kök elementi */
#root {
  min-height: 100vh;
  height: 100%;
  isolation: isolate;
}

/* ─── Medya Elementleri ─── */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  fill: currentColor;
}

/* Lucide icons are outline-style (fill:none, stroke:currentColor) - the
   generic svg{fill:currentColor} reset above would otherwise turn every
   icon into a solid blob instead of a clean line icon. */
.lucide {
  fill: none;
  stroke: currentColor;
}

/* ─── Form Elementleri ─── */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ─── Listeler ─── */
ul,
ol {
  list-style: none;
}

/* ─── Bağlantılar ─── */
a {
  color: var(--color-text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
  cursor: pointer;
}

a:hover {
  color: var(--color-text-link-hover);
}

a:active {
  color: var(--color-accent);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ─── Görünürlük Yardımcısı ─── */
.hidden {
  display: none !important;
}

/* ─── Tablolar ─── */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

/* ─── Metin Seçimi (Selection) ─── */
::selection {
  background-color: rgba(245, 158, 11, 0.3);
  color: var(--color-text-primary);
}

::-moz-selection {
  background-color: rgba(245, 158, 11, 0.3);
  color: var(--color-text-primary);
}

/* ─── Odak Görünür (Focus Visible) ─── */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ─── Kaydırma Çubuğu (Scrollbar) ─── */

/* Webkit tabanlı tarayıcılar (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

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

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-bg-tertiary) transparent;
}

/* ─── Başlık Hiyerarşisi (Heading Hierarchy) ─── */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
  letter-spacing: var(--letter-spacing-tight);
}

h1 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--color-text-primary) 0%, var(--color-text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
}

h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
}

h4 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

h5 {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
}

h6 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

/* ─── Paragraf ve Metin ─── */
p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

p:last-child {
  margin-bottom: 0;
}

strong,
b {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

em,
i {
  font-style: italic;
}

small {
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
}

code {
  font-family: var(--font-family-mono);
  font-size: 0.9em;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
}

pre {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-sm);
  padding: var(--space-4);
  background: var(--color-bg-sunken);
  border-radius: var(--radius-md);
  border: var(--glass-border-light);
  overflow-x: auto;
  line-height: var(--line-height-relaxed);
}

pre code {
  padding: 0;
  background: none;
  border-radius: 0;
}

/* ─── Sıralı ve Sırasız Listeler (Styled) ─── */
.list-styled {
  padding-left: var(--space-6);
}

.list-styled li {
  position: relative;
  margin-bottom: var(--space-2);
  color: var(--color-text-secondary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
}

ul.list-styled li::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-4));
  top: 0.6em;
  width: 5px;
  height: 5px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

ol.list-styled {
  counter-reset: list-counter;
  list-style: none;
}

ol.list-styled li {
  counter-increment: list-counter;
}

ol.list-styled li::before {
  content: counter(list-counter) '.';
  position: absolute;
  left: calc(-1 * var(--space-6));
  font-weight: var(--font-weight-semibold);
  color: var(--color-accent);
  font-size: var(--font-size-sm);
}

/* ─── Ayırıcı (Horizontal Rule) ─── */
hr {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-6) 0;
}

/* ─── Genel Yardımcılar (Utilities) ─── */
.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;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-accent { color: var(--color-accent); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }
.text-info { color: var(--color-info); }
.text-muted { color: var(--color-text-secondary); }
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-md { font-size: var(--font-size-md); }
.text-lg { font-size: var(--font-size-lg); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

/* ─── İpucu Metin (Placeholder) ─── */
::placeholder {
  color: var(--color-text-tertiary);
  opacity: 0.7;
}

/* ─── Performans: Donanım Hızlandırma İpuçları ─── */
.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
}
