/* =========================================================
   EN BABA ORGANİZASYON — MOBİL FOOTER / PANEL ERİŞİLEBİLİRLİK KATMANI
   - Safe-area uyumlu Destek / Diğer panelleri
   - Büyük metinlerde doğal reflow
   - Sistem gece modunda deterministik kontrast
========================================================= */

html{
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (max-width: 767px), (pointer: coarse){
  html body #destekPanel,
  html body #digerPanel{
    position: fixed !important;
    inset: 0 !important;
    width: auto !important;
    max-width: none !important;
    inline-size: auto !important;
    max-inline-size: none !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    align-items: flex-end !important;
    justify-content: center !important;
    overflow: hidden !important;
    isolation: isolate;
    contain: layout paint;
  }

  #destekPanel:not(.hidden),
  #digerPanel:not(.hidden){
    display: flex !important;
  }

  #destekPanel .eb-overlay,
  #digerPanel .eb-overlay{
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  html body #destekSheet,
  html body #digerSheet{
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 2;
    width: min(100%, 720px) !important;
    max-width: 720px !important;
    max-height: calc(100dvh - max(6px, env(safe-area-inset-top, 0px))) !important;
    margin: 0 auto !important;
    padding-top: 0 !important;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    scroll-padding-top: 58px;
    overflow-wrap: anywhere;
    word-break: normal;
    container-type: inline-size;
  }

  #destekSheet:focus,
  #digerSheet:focus{
    outline: none;
  }

  #destekSheet > *,
  #digerSheet > *,
  #destekSheet .eb-card > *,
  #digerSheet .eb-card > *{
    min-width: 0;
    max-width: 100%;
  }

  .enb-sheet-toolbar{
    position: sticky;
    top: 0;
    z-index: 15;
    display: grid;
    grid-template-columns: 44px minmax(0,1fr) 44px;
    align-items: center;
    min-height: 52px;
    margin: 0 -2px 4px;
    padding: 4px 0;
    background: linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(255,255,255,.96) 78%, rgba(255,255,255,0) 100%);
  }

  .enb-sheet-toolbar__handle{
    grid-column: 2;
    justify-self: center;
    width: 46px;
    height: 5px;
    border-radius: 999px;
    background: #cbd5e1;
  }

  .enb-sheet-toolbar__close{
    grid-column: 3;
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(15,23,42,.08);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .enb-sheet-toolbar__close:focus-visible{
    outline: 3px solid rgba(79,70,229,.38);
    outline-offset: 2px;
  }

  #supportCards .eb-card,
  #digerSheet .eb-card{
    min-height: 64px;
    height: auto !important;
    white-space: normal !important;
  }

  #supportCards .eb-card :where(p,strong,span),
  #digerSheet .eb-card :where(p,strong,span){
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  #digerSheet .enb-diger-grid{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch;
    gap: 8px !important;
    min-width: 0;
  }

  /*
   * Diğer paneli yoğunluk dengesi:
   * Global .eb-card (18px radius + blur + güçlü gölge) ve eski 76px
   * minimum yükseklik iki sütunlu kısa kategori kartlarını tombul gösteriyordu.
   * Dokunma alanı erişilebilir kalırken yalnız bu panel sıkılaştırılır.
   */
  #digerSheet > .space-y-3 .eb-card{
    min-height: 58px;
    padding: 12px 14px !important;
    border-radius: 14px !important;
    box-shadow: 0 5px 16px rgba(15,23,42,.07) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  #digerSheet .enb-diger-grid .eb-card{
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    padding: 8px 10px !important;
    gap: 8px !important;
    border-radius: 12px !important;
    box-shadow: 0 3px 10px rgba(15,23,42,.06) !important;
    overflow: hidden !important;
    contain: layout paint;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  #digerSheet .enb-diger-grid .eb-emoji{
    flex: 0 0 18px;
    width: 18px;
    font-size: 16px !important;
    line-height: 1;
    text-align: center;
  }

  #digerSheet .enb-diger-grid .eb-card > span:last-child{
    display: -webkit-box !important;
    min-width: 0;
    max-width: 100%;
    overflow: hidden !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12px !important;
    line-height: 1.15 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .enb-diger-socials{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
  }

  .enb-diger-social{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #334155;
    box-shadow: 0 3px 10px rgba(15,23,42,.05);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .enb-diger-social i{
    flex: 0 0 auto;
    font-size: 16px;
  }

  .enb-diger-social span{
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap !important;
  }

  .enb-diger-social.is-instagram i{ color: #c13584; }
  .enb-diger-social.is-tiktok i{ color: #111827; }
  .enb-diger-social.is-youtube i{ color: #dc2626; }
  .enb-diger-social.is-pinterest i{ color: #bd081c; }

  .enb-diger-social:focus-visible{
    outline: 3px solid rgba(79,70,229,.34);
    outline-offset: 2px;
  }


}

@container (max-width: 335px){
  #digerSheet .enb-diger-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #supportCards .eb-card{
    align-items: flex-start !important;
  }
}

/* ---------------------------------------------------------
   SİSTEM GECE MODU — FOOTER PANELLERİ
   Genel Tailwind dönüştürmesine veya gecikmeli JS yüzey taramasına bağlı değildir.
--------------------------------------------------------- */
html[data-theme="dark"] #destekSheet,
html[data-theme="dark"] #digerSheet{
  color: #f8fafc !important;
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%) !important;
  border: 1px solid rgba(148,163,184,.24) !important;
  box-shadow: 0 -24px 64px rgba(0,0,0,.52) !important;
  color-scheme: dark;
}

html[data-theme="dark"] #destekSheet .enb-sheet-toolbar,
html[data-theme="dark"] #digerSheet .enb-sheet-toolbar{
  background: linear-gradient(180deg, rgba(15,23,42,1) 0%, rgba(15,23,42,.97) 78%, rgba(15,23,42,0) 100%) !important;
}

html[data-theme="dark"] .enb-sheet-toolbar__handle{
  background: #475569 !important;
}

html[data-theme="dark"] .enb-sheet-toolbar__close{
  color: #f8fafc !important;
  background: #1e293b !important;
  border-color: rgba(148,163,184,.28) !important;
}

html[data-theme="dark"] #destekSheet :where(#routeTitle,#digerPanelTitle,h3),
html[data-theme="dark"] #digerSheet :where(#routeTitle,#digerPanelTitle,h3){
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
}

html[data-theme="dark"] #destekSheet :where(#routeSubtitle,#routeStatus),
html[data-theme="dark"] #digerSheet :where(#digerPanelDesc,.text-slate-600,.text-slate-500){
  color: #b8c3d4 !important;
  -webkit-text-fill-color: #b8c3d4 !important;
}

html[data-theme="dark"] #mobileDestekClock,
html[data-theme="dark"] #lastChannelBadge{
  color: #dbeafe !important;
  -webkit-text-fill-color: currentColor !important;
  background: #172033 !important;
  border-color: rgba(148,163,184,.28) !important;
}

html[data-theme="dark"] #onlineStatusChip{
  color: #bbf7d0 !important;
  -webkit-text-fill-color: currentColor !important;
  background: rgba(22,101,52,.45) !important;
}

html[data-theme="dark"] #bestChannelChip{
  color: #c7d2fe !important;
  -webkit-text-fill-color: currentColor !important;
  background: rgba(67,56,202,.32) !important;
}

/* Pastel aksiyon kartları bilinçli olarak açık yüzey kalır. */
html[data-theme="dark"] #destekSheet :where(#supportBabyVideoBtn,#cardForm,#cardCall,#cardWhatsapp)[data-enb-dark-preserve]{
  color-scheme: light !important;
  forced-color-adjust: none;
}

/* iPhone Safari'de genel tema katmanından miras kalan text-fill rengi,
   açık bırakılan kartların kendi renklerini ezmesin. */
html[data-theme="dark"] #destekSheet [data-enb-dark-preserve],
html[data-theme="dark"] #destekSheet [data-enb-dark-preserve] *{
  -webkit-text-fill-color: currentColor !important;
}

html[data-theme="dark"] #destekSheet :where(#cardForm,#cardCall,#cardWhatsapp)[data-enb-dark-preserve] :where(p,strong){
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

html[data-theme="dark"] #destekSheet :where(#cardForm,#cardCall,#cardWhatsapp)[data-enb-dark-preserve] > :where(div,span) :where(p.text-slate-600,span.text-slate-600),
html[data-theme="dark"] #destekSheet :where(#cardForm,#cardCall,#cardWhatsapp)[data-enb-dark-preserve] :where(.text-slate-600,.text-slate-500){
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
}

html[data-theme="dark"] #supportBabyVideoBtn :where(strong,small,.enb-baby-video-cta__pill){
  -webkit-text-fill-color: currentColor !important;
}

html[data-theme="dark"] #cardEnbAi{
  color: #f8fafc !important;
  background: linear-gradient(135deg, #172033, #111827) !important;
  border-color: rgba(165,180,252,.28) !important;
}

html[data-theme="dark"] #cardEnbAi :where(strong,.text-slate-900){
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
}

html[data-theme="dark"] #cardEnbAi :where(.text-slate-600){
  color: #b8c3d4 !important;
  -webkit-text-fill-color: #b8c3d4 !important;
}

html[data-theme="dark"] #digerSheet .eb-card{
  color: #f8fafc !important;
  background: #172033 !important;
  border: 1px solid rgba(148,163,184,.22) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.22) !important;
}

html[data-theme="dark"] #digerSheet .eb-card:first-child{
  background: linear-gradient(135deg, rgba(49,46,129,.48), #172033) !important;
  border-color: rgba(129,140,248,.34) !important;
}

html[data-theme="dark"] #digerSheet .eb-card :where(p,span:not(.eb-emoji)){
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
}

html[data-theme="dark"] #digerSheet .eb-card :where(.text-slate-600,.text-slate-500){
  color: #b8c3d4 !important;
  -webkit-text-fill-color: #b8c3d4 !important;
}

html[data-theme="dark"] #digerSheet .text-slate-500.uppercase{
  color: #aebbd0 !important;
  -webkit-text-fill-color: #aebbd0 !important;
}

html[data-theme="dark"] #digerSheet .enb-diger-social{
  color: #e2e8f0 !important;
  background: #172033 !important;
  border-color: rgba(148,163,184,.24) !important;
  box-shadow: 0 5px 16px rgba(0,0,0,.18) !important;
  -webkit-text-fill-color: currentColor !important;
}

html[data-theme="dark"] #digerSheet .enb-diger-social.is-tiktok i{
  color: #f8fafc !important;
}

html[data-theme="dark"] #destekSheet > [data-close-destek]:last-child,
html[data-theme="dark"] #digerSheet > [data-close-diger]:last-child{
  color: #cbd5e1 !important;
  -webkit-text-fill-color: #cbd5e1 !important;
}

/* ---------------------------------------------------------
   KOYU MOD BİLGİSİ — GERÇEK VISUAL VIEWPORT MERKEZİ
--------------------------------------------------------- */
@media (max-width: 1024px) and (pointer: coarse){
  #enbMobileDarkHint.enb-mobile-dark-hint{
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: min(calc(100vw - 24px), 520px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    overflow-y: auto !important;
    margin: 0 !important;
    z-index: 2147483000 !important;
    transform: translate(-50%, -50%) scale(.96) !important;
    transform-origin: center !important;
  }

  #enbMobileDarkHint.enb-mobile-dark-hint.is-visible{
    transform: translate(-50%, -50%) scale(1) !important;
  }

  #enbMobileDarkHint.enb-mobile-dark-hint.is-leaving{
    transform: translate(-50%, -50%) scale(.96) !important;
  }
}

@media (max-width: 430px) and (pointer: coarse){
  #enbMobileDarkHint.enb-mobile-dark-hint{
    grid-template-columns: 1fr !important;
  }

  .enb-mobile-dark-hint__actions{
    width: 100%;
    justify-content: stretch !important;
  }

  .enb-mobile-dark-hint__actions button{
    flex: 1 1 0;
    min-height: 44px !important;
  }
}

@media (prefers-reduced-motion: reduce){
  #destekSheet,
  #digerSheet,
  .eb-overlay,
  .eb-anim,
  #enbMobileDarkHint.enb-mobile-dark-hint{
    transition: none !important;
    animation: none !important;
  }
}

@media (forced-colors: active){
  #destekSheet,
  #digerSheet,
  #destekSheet .eb-card,
  #digerSheet .eb-card,
  #digerSheet .enb-diger-social,
  .enb-sheet-toolbar__close{
    forced-color-adjust: auto !important;
    border: 1px solid CanvasText !important;
  }

  .enb-sheet-toolbar__close:focus-visible{
    outline: 3px solid Highlight !important;
  }
}
