/* ==========================================================================
   DersTeders — Paylaşımlı Site CTA Bileşeni (site-cta.css)
   --------------------------------------------------------------------------
   site-cta.js'nin eklediği iki öğeyi stillendirir:
     1) body > .site-cta-promo   → ince üst şerit (social.css sınıflarını kullanır)
     2) #siteCtaBox              → altta sabit tek CTA kutusu

   KURALLAR: tek altın vurgu (#F5C542) · gradyan/glow YOK · 44px dokunma ·
   focus ring · WCAG AA kontrast · reduced-motion desteği · 5 viewport taşma 0.
   Mevcut social.css'e dokunulmaz; yalnız bu dosya dahil edilir.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1) ÜST ŞERİT — social.css'in .dt-promo-bar iskeletini kullanır.
   Tek fark: gradyan yerine düz petrol zemini + ince altın ayraç (tek vurgu).
   -------------------------------------------------------------------------- */
body > .site-cta-promo {
  max-width: 100%;
  box-sizing: border-box;
  background: #0F6B7C;
  border-bottom: 1px solid #F5C542;
}

body > .site-cta-promo .dt-promo-item {
  color: #FFFFFF;
  font-size: 0.8rem;
  min-height: 44px;
}

body > .site-cta-promo .dt-promo-item:focus-visible {
  outline: 2px solid #F5C542;
  outline-offset: -2px;
}

body > .site-cta-promo .dt-promo-sep {
  background: #F5C542;
}

/* Hareket azaltma isteğinde şerit kaymaz (erişilebilirlik). */
@media (prefers-reduced-motion: reduce) {
  body > .site-cta-promo .dt-promo-track {
    animation: none !important;
    transform: none !important;
  }
}

/* --------------------------------------------------------------------------
   2) ALT CTA KUTUSU — sabit, tek, kompakt. İçerik akışını bozmaz.
   -------------------------------------------------------------------------- */
.site-cta-box {
  position: fixed;
  left: 50%;
  bottom: 12px;
  z-index: 940;                 /* promo şerit 950, CTA onun altında */
  transform: translateX(-50%);
  box-sizing: border-box;
  width: calc(100% - 24px);
  max-width: 760px;
  max-width: min(760px, 100%);
  padding: 10px 44px 10px 16px;
  border: 1px solid #F5C542;
  border-radius: 10px;
  background: #0B2B33;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.4;
}

.site-cta-box[hidden] { display: none; }

/* ⛔ 19.11: sabit CTA içeriğin ÜSTÜNÜ KAPATIYORDU. Gövdeye yalnız ALT boşluk
   eklenir (html/body overflow'a DOKUNULMAZ — sticky katmanlar korunur). */
body.site-cta-aktif { padding-bottom: 128px; }
@media (max-width: 760px) { body.site-cta-aktif { padding-bottom: 156px; } }
.site-cta-box {
  background: #0B2B33;   /* opak — arka plan içeriği görünmesin */
  opacity: 1;
  backdrop-filter: none;
}

/* --------------------------------------------------------------------------
    2b) ⛔ 22.11 YÜZEN KATMAN SIRASI — aynı anda TEK ana katman.
    site-cta.js üç mevcut sinyali okur ve <html>'e şunları yazar:
      yk-cerez-acik → çerez bandı açık  (en üst öncelik)
      yk-pwa-aktif  → PWA kartı açık
      yk-cta-aktif  → CTA, ilk ekran geçilmiş ve çakışma yok
    ⛔ html/body overflow'a DOKUNMA — yalnız görünürlük kapatılır (AGENTS kural 13).
    -------------------------------------------------------------------------- */
/* Çerez bandı açıkken PWA kartı geri çekilir (kart yine DOM'da kalır; onay
   verilince ana-ekran-ipucu.js zaten yeniden dener → sınıf düşer, kart görünür). */
html.yk-cerez-acik .dt-ae { display: none !important; }

/* CTA varsayılan GİZLİ; koordinatör açtığında görünür. [hidden] her zaman kazanır
   → kullanıcı "×" ile kapatırsa yk-cta-aktif olsa bile kutu dönmez. */
#siteCtaBox { display: none; }
html.yk-cta-aktif #siteCtaBox:not([hidden]) { display: block; }
/* Çerez bandı veya PWA kartı varken CTA kesinlikle görünmez (çift güvenlik). */
html.yk-cerez-acik #siteCtaBox,
html.yk-pwa-aktif #siteCtaBox { display: none !important; }

/* Dokunma alanı standardı: çerez bandı düğmeleri ≥44px.
   ⛔ Bandın METNİ, bağlantıları ve HTTP yapısı DEĞİŞMİYOR — yalnız min-height. */
html .cookie-banner.show .cookie-btn { min-height: 44px; }

.site-cta-fact {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #FFFFFF;
}

.site-cta-linkler {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.site-cta-link {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 44px;             /* dokunma alanı standardı */
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  color: #FFFFFF;               /* AA: beyaz üzerinde koyu petrol */
  text-decoration: none;
  white-space: normal;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
}

.site-cta-link:hover {
  border-color: #F5C542;
  color: #F5C542;
}

.site-cta-link:focus-visible {
  outline: 2px solid #F5C542;
  outline-offset: 2px;
  color: #F5C542;
}

/* TEK altın vurgu: yalnız ana kayıt bağlantısı. */
.site-cta-link-kayit {
  border-color: #F5C542;
  color: #F5C542;
}

/* Kapatma düğmesi — × karakteri (emoji değil), 44px dokunma alanı. */
.site-cta-kapat {
  position: absolute;
  top: 4px;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #D6E9ED;
  font-family: inherit;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.site-cta-kapat:hover { color: #F5C542; }

.site-cta-kapat:focus-visible {
  outline: 2px solid #F5C542;
  outline-offset: -2px;
  color: #F5C542;
}

/* --------------------------------------------------------------------------
   3) HAREKET AZALTMA — geçiş yok, kutu sabit kalır.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .site-cta-box,
  .site-cta-link,
  .site-cta-kapat { transition: none !important; }
}

/* --------------------------------------------------------------------------
   4) 5 VIEWPORT (360 / 390 / 768 / 1024 / 1440) — taşma önleme.
   Sabit genişlik yok; width her zaman viewport'a göre hesaplanır; satırlar
   sarılır. Mobil < 560px'te bağlantılar tam genişliğe yayılır.
   -------------------------------------------------------------------------- */
@media (max-width: 560px) {
  .site-cta-box {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-width: none;
    transform: none;
    padding: 10px 40px 10px 12px;
  }
  .site-cta-linkler {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .site-cta-link { justify-content: center; text-align: center; }
}

@media (max-width: 768px) {
  body > .site-cta-promo .dt-promo-item { font-size: 0.74rem; }
}

/* Yüksek kontrastta ayraç ve kenarlık daha belirgin. */
@media (prefers-contrast: more) {
  .site-cta-box { border-color: #F5C542; background: #04161B; }
  .site-cta-link { border-color: #FFFFFF; }
}
