/* accessibility.css */

/* Font boyutu: Mevcut -> +2px (varsayılanı 18px'e çekiyoruz) */
html[data-a11y="true"] {
  font-size: 112.5% !important;
  /* 16px'in %112.5'i 18px yapar (+2px) */
}

/* Satır aralığı: Normal -> 1.8 (Sadece metin içeren öğeler için) */
html[data-a11y="true"] body,
html[data-a11y="true"] p,
html[data-a11y="true"] span:not([class*="badge"]),
html[data-a11y="true"] li,
html[data-a11y="true"] h1,
html[data-a11y="true"] h2,
html[data-a11y="true"] h3,
html[data-a11y="true"] h4,
html[data-a11y="true"] h5,
html[data-a11y="true"] h6,
html[data-a11y="true"] th,
html[data-a11y="true"] td {
  line-height: 1.8 !important;
}

/* Dark Mode - Gri metinler beyaza (#f0f0f0) yüksek kontrast */
html[data-a11y="true"].dark p:not(button p):not(.bg-\[\#378ADD\] p):not(.a11y-ignore),
html[data-a11y="true"].dark span:not([class*="badge"]):not(button span):not(.bg-\[\#378ADD\] span):not(.a11y-ignore),
html[data-a11y="true"].dark a:not(button):not(button a):not(.bg-\[\#378ADD\]):not(.a11y-ignore),
html[data-a11y="true"].dark li:not(button li):not(.bg-\[\#378ADD\] li):not(.a11y-ignore),
html[data-a11y="true"].dark h1,
html[data-a11y="true"].dark h2,
html[data-a11y="true"].dark h3,
html[data-a11y="true"].dark h4,
html[data-a11y="true"].dark h5,
html[data-a11y="true"].dark h6 {
  color: #f0f0f0 !important;
}

/* Light Mode - Gri/soluk metinler siyaha (#000000) yüksek kontrast */
html[data-a11y="true"]:not(.dark) p:not(button p):not(.bg-\[\#378ADD\] p):not(.a11y-ignore),
html[data-a11y="true"]:not(.dark) span:not([class*="badge"]):not(button span):not(.bg-\[\#378ADD\] span):not(.a11y-ignore),
html[data-a11y="true"]:not(.dark) a:not(button):not(button a):not(.bg-\[\#378ADD\]):not(.a11y-ignore),
html[data-a11y="true"]:not(.dark) li:not(button li):not(.bg-\[\#378ADD\] li):not(.a11y-ignore),
html[data-a11y="true"]:not(.dark) h1,
html[data-a11y="true"]:not(.dark) h2,
html[data-a11y="true"]:not(.dark) h3,
html[data-a11y="true"]:not(.dark) h4,
html[data-a11y="true"]:not(.dark) h5,
html[data-a11y="true"]:not(.dark) h6 {
  color: #000000 !important;
}

html[data-a11y="true"].dark input,
html[data-a11y="true"].dark select,
html[data-a11y="true"].dark textarea {
  color: #ffffff !important;
  border-color: #a0a0a0 !important;
}

html[data-a11y="true"].dark input::placeholder,
html[data-a11y="true"].dark textarea::placeholder {
  color: #c0c0c0 !important;
}

html[data-a11y="true"]:not(.dark) input,
html[data-a11y="true"]:not(.dark) select,
html[data-a11y="true"]:not(.dark) textarea {
  color: #000000 !important;
  border-color: #555555 !important;
}

/* Light Mode - Mavi renkli öğelerin (buton, link vb.) kontrastını artırmak için rengi koyulaştır */
html[data-a11y="true"]:not(.dark) .bg-\[\#378ADD\],
html[data-a11y="true"]:not(.dark) .bg-\[\#005fcc\],
html[data-a11y="true"]:not(.dark) .a11y-primary-button {
  background-color: #003a8c !important;
  background-image: none !important;
  color: #ffffff !important;
}

html[data-a11y="true"]:not(.dark) .text-\[\#378ADD\] {
  color: #003a8c !important;
}

html[data-a11y="true"]:not(.dark) .border-\[\#378ADD\] {
  border-color: #003a8c !important;
}

/* Dark Mode - Mavi renkli öğelerin kontrastını artırmak için rengi açıklaştır */
html[data-a11y="true"].dark .bg-\[\#378ADD\],
html[data-a11y="true"].dark .bg-\[\#005fcc\],
html[data-a11y="true"].dark .a11y-primary-button {
  background-color: #7cb8ff !important;
  background-image: none !important;
  color: #000000 !important;
}

html[data-a11y="true"].dark .text-\[\#378ADD\] {
  color: #7cb8ff !important;
}

html[data-a11y="true"].dark .border-\[\#378ADD\] {
  border-color: #7cb8ff !important;
}

/* Focus halkası: Açık modda lacivert, koyu modda sarı yüksek kontrast */
/* Shadcn ve diğer kütüphanelerin outline-none stillerini ezmek için daha spesifik seçiciler */
html[data-a11y="true"]:not(.dark) *:focus,
html[data-a11y="true"]:not(.dark) *:focus-visible,
html[data-a11y="true"]:not(.dark) button:focus,
html[data-a11y="true"]:not(.dark) input:focus,
html[data-a11y="true"]:not(.dark) a:focus {
  outline: 3px solid #003a8c !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 5px rgba(0, 58, 140, 0.3) !important;
}

html[data-a11y="true"].dark *:focus,
html[data-a11y="true"].dark *:focus-visible,
html[data-a11y="true"].dark button:focus,
html[data-a11y="true"].dark input:focus,
html[data-a11y="true"].dark a:focus {
  outline: 3px solid #ffcc00 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 5px rgba(255, 204, 0, 0.3) !important;
}

/* PDF linkleri: Uyarısız -> "(PDF dosyası açılır)" yazar */
html[data-a11y="true"] a[href$=".pdf"]::after,
html[data-a11y="true"] a[href$=".PDF"]::after {
  content: " (PDF dosyası açılır)" !important;
  font-size: 0.9em !important;
  font-weight: 600 !important;
  color: #ffcc00 !important;
  margin-left: 6px !important;
}

/* Logo Renkleri Kontrast İyileştirmeleri */
html[data-a11y="true"] .text-\[\#008CCB\] {
  color: #005a82 !important;
  /* TROY logosu için daha koyu mavi */
}

/* Dokunma Hedefleri: En az 48x48px */
html[data-a11y="true"] button,
html[data-a11y="true"] .button,
html[data-a11y="true"] [role="button"],
html[data-a11y="true"] input[type="button"],
html[data-a11y="true"] input[type="submit"],
html[data-a11y="true"] select {
  min-width: 48px !important;
  min-height: 48px !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Küçük ikon butonlar için boyut kısıtlamalarını esnet */
html[data-a11y="true"] button[class*="h-"],
html[data-a11y="true"] button[class*="w-"],
html[data-a11y="true"] a[class*="h-"],
html[data-a11y="true"] a[class*="w-"] {
  height: auto !important;
  width: auto !important;
}

/* Erişilebilirlik metinlerini göster/gizle */
.a11y-text {
  display: none;
}

html[data-a11y="true"] .a11y-text {
  display: inline-block !important;
  margin-left: 6px !important;
  font-weight: 600 !important;
  font-size: 0.9em !important;
}

/* sr-only sınıfını a11y modunda iptal et (eğer a11y-text ile birlikte kullanılmışsa) */
html[data-a11y="true"] .sr-only.a11y-text {
  position: static !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 0 0 6px !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: nowrap !important;
}

/* Erişilebilirlik Menüsü (Yan Panel) */
html[data-a11y="true"] .a11y-sidebar {
  display: flex !important;
}

/* Erişilebilirlik modunda üst başlıktaki mobil menü butonunu gizle (zaten yanda açık olduğu için) */
html[data-a11y="true"] header button[aria-label="Menü"],
html[data-a11y="true"] header button[aria-label="Menu"] {
  display: none !important;
}