/* ═══════════════════════════════════════════════════════════════════════════
 * styles/a11y.css — YetkinLider Erişilebilirlik Temeli (WCAG 2.1 AA)
 *
 * Ana sayfalardan link edilir: index.html, game.html, profile.html, superadmin.html
 * İçerik:
 *   1) :focus-visible — klavye kullanıcıları için görünür odak göstergesi
 *   2) .skip-link    — "Ana içeriğe atla" linki (sr-only → fokus alınca görünür)
 *   3) .btn-primary  — birincil CTA opak arka plan, 48px+ dokunmatik hedef
 *   4) :where()      — özgüllük çakışmasını önler, mevcut sayfalara güvenle bindirilebilir
 * ═══════════════════════════════════════════════════════════════════════════ */

/* 1. Focus Visible — sadece klavye odaklarında görünür */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid #3b7bc8;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Buton/link özel hover-glow desteği */
:where(button, a.btn-primary, a.btn-secondary):focus-visible {
  box-shadow: 0 0 0 4px rgba(59, 123, 200, 0.25);
}

/* 2. Skip Link — gizli, fokus alınca görünür */
.skip-link {
  position: absolute;
  top: -48px;
  left: 0;
  padding: 10px 20px;
  background: #0b1220;
  color: #fff;
  z-index: 10000;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border-radius: 0 0 8px 0;
  transition: top 150ms ease-out;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
  outline: 2px solid #3b7bc8;
  outline-offset: -2px;
}

/* 3. Primary CTA — opak, 48px+, yumuşak köşeler */
:where(.btn-primary, a.btn-primary, button.btn-primary) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #3b7bc8;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 28px;
  min-height: 48px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
  box-shadow: 0 2px 8px rgba(59, 123, 200, 0.3);
}
:where(.btn-primary, a.btn-primary, button.btn-primary):hover {
  background: #2c5d96;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 123, 200, 0.4);
}
:where(.btn-primary, a.btn-primary, button.btn-primary):active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(59, 123, 200, 0.3);
}
:where(.btn-primary, a.btn-primary, button.btn-primary):disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 4. Reduced motion — animasyonları kapat */
@media (prefers-reduced-motion: reduce) {
  :where(.btn-primary, a.btn-primary, button.btn-primary),
  .skip-link {
    transition: none;
  }
  :where(.btn-primary, a.btn-primary, button.btn-primary):hover {
    transform: none;
  }
}
