/* Destek asistanı penceresi (public/destek.js). Panelde ve tanıtım sayfasında aynı; kendi renkleri var (sayfa
   değişkenlerine bağlı değil). Telefonda alttaki sekme çubuğunun / yapışkan çağrının üstünde durur. */
.destek {
  --d-mavi: #1552F0; --d-mavi-koyu: #0F40C4; --d-murekkep: #1C1917; --d-tas: #57534E; --d-cizgi: #E9E5E0; --d-zemin: #FFFFFF; --d-kum: #F4F2EF;
  position: fixed; z-index: 70; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  font: 15px/1.45 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--d-murekkep);
}
@media (min-width: 1024px) { .destek { bottom: 24px; right: 24px; } }
.destek-dugme {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px 0 8px; border: 0; border-radius: 999px;
  background: var(--d-murekkep); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
  box-shadow: 0 14px 30px -12px rgba(15, 20, 40, .55);
}
.destek-dugme:hover { background: #292524; }
.destek-dugme:focus-visible, .destek button:focus-visible, .destek a:focus-visible, .destek-girdi:focus-visible { outline: 3px solid #8DB0FF; outline-offset: 2px; }
.destek-dugme-isaret {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--d-mavi); font-weight: 700;
}
.destek--acik .destek-dugme { display: none; }
.destek-kutu {
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 140px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; background: var(--d-zemin);
  box-shadow: 0 30px 60px -20px rgba(15, 20, 40, .5), 0 0 0 1px rgba(28, 25, 23, .08);
}
.destek-kutu[hidden] { display: none; }
@media (max-width: 1023px) {
  .destek--acik { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .destek--acik .destek-kutu { width: 100%; height: min(640px, calc(100dvh - 16px)); }
}
.destek-ust { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 12px 18px; border-bottom: 1px solid var(--d-cizgi); }
.destek-ust b { display: block; font-size: 16px; }
.destek-ust span { display: block; font-size: 12.5px; color: var(--d-tas); }
.destek-kapat { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--d-kum); font-size: 22px; line-height: 1; cursor: pointer; color: var(--d-murekkep); }
.destek-liste { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.destek-mesaj { max-width: 86%; padding: 10px 13px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.destek-mesaj--asistan { align-self: flex-start; background: var(--d-kum); border-bottom-left-radius: 6px; }
.destek-mesaj--kullanici { align-self: flex-end; background: var(--d-mavi); color: #fff; border-bottom-right-radius: 6px; }
.destek-mesaj a { color: var(--d-mavi-koyu); text-decoration: underline; }
.destek-mesaj--kullanici a { color: #fff; }
.destek-not { display: block; margin-top: 6px; font-size: 12.5px; color: #166534; }
.destek-wa { display: inline-block; margin-top: 8px; font-weight: 600; }
.destek-yaziyor { display: flex; gap: 4px; padding: 14px; }
.destek-yaziyor i { width: 7px; height: 7px; border-radius: 50%; background: var(--d-tas); opacity: .4; animation: destek-nokta 1s infinite; }
.destek-yaziyor i:nth-child(2) { animation-delay: .15s; }
.destek-yaziyor i:nth-child(3) { animation-delay: .3s; }
@keyframes destek-nokta { 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .destek-yaziyor i { animation: none; opacity: .7; } }
.destek-oneriler { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.destek-oneriler:empty { display: none; }
.destek-oneriler button {
  min-height: 36px; padding: 6px 12px; border: 1px solid var(--d-cizgi); border-radius: 999px; background: #fff;
  font: inherit; font-size: 13.5px; color: var(--d-murekkep); cursor: pointer;
}
.destek-oneriler button:hover { border-color: var(--d-mavi); color: var(--d-mavi-koyu); }
.destek-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--d-cizgi); }
.destek-girdi {
  flex: 1; min-height: 44px; max-height: 120px; padding: 11px 14px; border: 1px solid var(--d-cizgi); border-radius: 22px; resize: none;
  font: inherit; font-size: 16px; color: var(--d-murekkep); background: #fff;
}
.destek-gonder { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--d-mavi); color: #fff; font-size: 20px; font-weight: 700; cursor: pointer; }
.destek-gonder:disabled { opacity: .5; cursor: default; }
.destek-insan { display: block; padding: 0 16px 12px; font-size: 13px; color: var(--d-tas); text-align: center; }
@media print { .destek { display: none; } }
.destek-girdi--bekle { border-color: #F59E0B; }

/* Panel: ana uygulamada yüzen düğme yok (üst çubuktaki "?" ve kenar menüsündeki "Yardım" açar); giriş ve kurulum
   ekranlarında yalnız küçük bir "?" yuvarlağı, sağ üstte. */
.uygulama-acik .destek--panel:not(.destek--acik) .destek-dugme { display: none; }
body:not(.uygulama-acik) .destek--panel:not(.destek--acik) { top: calc(12px + env(safe-area-inset-top, 0px)); bottom: auto; right: 12px; }
.destek--panel .destek-dugme { padding: 0; min-height: 0; background: transparent; box-shadow: none; }
.destek--panel .destek-dugme > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.destek--panel .destek-dugme-isaret { width: 40px; height: 40px; box-shadow: 0 8px 20px -10px rgba(15, 20, 40, .6); }
/* Kurulum ve giriş ekranlarının üst satırı "?" yuvarlağının altına girmesin */
body:not(.uygulama-acik):has(.destek--panel) .sihirbaz-ust { padding-right: 60px; }
