/* Canli destek widget'i — canli sitedeki temsilci sohbetinin esi.
   Sol altta durur, yalnizca "Ödemeyi Başlatmak İstiyorum" ile acilir.
   Yuzen launcher YOK. */

.sd-kok {
  --sd-yesil: #16a34a;
  --sd-yesil-koyu: #15803d;
  --sd-metin: #1f2937;
  --sd-soluk: #6b7280;
  --sd-kenar: #e5e7eb;
  --sd-bg: #f8fafc;
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 2147483000;         /* sitenin diger yuzen ogelerinin ustunde */
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  pointer-events: none;
}

/* ---- launcher (her sayfada, kapaliyken gorunur) ---- */
.sd-launcher {
  position: absolute;
  left: 0; bottom: 0;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 18px 13px 15px;
  border: none;
  border-radius: 40px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px -6px rgba(22, 163, 74, .5), 0 3px 8px -2px rgba(0, 0, 0, .18);
  transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s ease, opacity .2s ease;
  white-space: nowrap;
}
.sd-launcher:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -6px rgba(22, 163, 74, .6), 0 4px 10px -2px rgba(0, 0, 0, .2); }
.sd-launcher svg { width: 24px !important; height: 24px !important; }
.sd-launcher-nokta {
  position: absolute; top: 10px; right: 14px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #bbf7d0; border: 2px solid #16a34a;
  animation: sd-nabiz 2.4s infinite;
}
.sd-kok.sd-acik .sd-launcher { opacity: 0; transform: scale(.6); pointer-events: none; }
@media (max-width: 640px) { .sd-launcher-yazi { display: none; } .sd-launcher { padding: 15px; border-radius: 50%; } }

/* ---- panel ---- */
.sd-panel {
  position: absolute;
  left: 0; bottom: 0;
  width: 358px;
  max-width: calc(100vw - 32px);
  height: 566px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--sd-kenar);
  border-radius: 18px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .30), 0 8px 24px -8px rgba(0, 0, 0, .14);
  opacity: 0;
  transform: translateY(16px) scale(.98);
  transform-origin: bottom left;
  pointer-events: none;
  transition: opacity .28s ease, transform .28s cubic-bezier(.16, 1, .3, 1);
}
.sd-kok.sd-acik .sd-panel { opacity: 1; transform: none; pointer-events: auto; }

/* ---- baslik (temsilci) ---- */
.sd-baslik {
  padding: 15px 16px;
  background: #fff;
  border-bottom: 1px solid var(--sd-kenar);
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.sd-avatar {
  position: relative;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.sd-avatar svg { width: 22px; height: 22px; }
.sd-online {
  position: absolute;
  right: -1px; bottom: -1px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #fff;
}
.sd-baslik-metin { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.sd-magaza { font-size: 15px; font-weight: 700; color: var(--sd-metin); letter-spacing: .1px; }
.sd-durum { font-size: 12px; color: var(--sd-soluk); display: flex; align-items: center; gap: 6px; }
.sd-nokta {
  width: 7px; height: 7px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .6);
  animation: sd-nabiz 2.4s infinite;
}
@keyframes sd-nabiz {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); }
  70%  { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.sd-kucult {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  border: none; border-radius: 9px;
  background: #f3f4f6; color: var(--sd-soluk);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.sd-kucult:hover { background: #e5e7eb; }
/* !important: sitenin global/flex CSS'i SVG'yi 0 genislige sikistirmasin */
.sd-kucult svg { width: 18px !important; height: 18px !important; flex: 0 0 auto; }
.sd-avatar svg { width: 22px !important; height: 22px !important; }
.sd-gonder svg { width: 17px !important; height: 17px !important; }

/* ---- on-form ---- */
.sd-onform {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 18px 20px;
  background: var(--sd-bg);
}
.sd-hos {
  font-size: 13px;
  line-height: 1.6;
  color: #374151;
  background: #fff;
  border: 1px solid var(--sd-kenar);
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 14px;
}
.sd-taslak { margin-bottom: 16px; }
.sd-taslak-balon {
  background: #eef2ff;
  border: 1px solid #dbe1ff;
  border-radius: 12px 12px 12px 4px;
  padding: 11px 14px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #3730a3;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.sd-taslak-not { font-size: 11px; color: #9ca3af; margin-top: 5px; padding-left: 4px; }

.sd-onform-form { display: flex; flex-direction: column; }
.sd-etiket { font-size: 12.5px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.sd-zorunlu { color: #dc2626; margin-left: 2px; }

.sd-kok input[type="text"],
.sd-kok input[type="tel"],
.sd-kok textarea {
  width: 100%;
  border: 1.5px solid var(--sd-kenar);
  border-radius: 10px;
  background: #fff;
  padding: 11px 13px;
  font: inherit;
  font-size: 13.5px;
  color: var(--sd-metin);
  resize: none;
  transition: border-color .16s ease, box-shadow .16s ease;
  box-sizing: border-box;
}
.sd-onform-form input { margin-bottom: 14px; }
.sd-kok input:focus, .sd-kok textarea:focus {
  outline: none;
  border-color: var(--sd-yesil);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
}

.sd-baslat {
  margin-top: 2px;
  width: 100%;
  border: none;
  border-radius: 11px;
  background: var(--sd-yesil);
  color: #fff;
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  padding: 13px 18px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(22, 163, 74, .28);
  transition: background .18s ease, transform .12s ease, box-shadow .18s ease;
}
.sd-baslat:hover { background: var(--sd-yesil-koyu); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(22, 163, 74, .34); }
.sd-baslat:active { transform: translateY(0); }
.sd-baslat:disabled { opacity: .7; cursor: default; transform: none; }

/* ---- mesaj akisi ---- */
.sd-akis {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  background: var(--sd-bg);
  scrollbar-width: thin;
}
.sd-akis::-webkit-scrollbar { width: 5px; }
.sd-akis::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .16); border-radius: 3px; }

.sd-mesaj {
  max-width: 82%;
  padding: 10px 13px;
  font-size: 13.5px;
  line-height: 1.55;
  border-radius: 14px;
  word-wrap: break-word;
  white-space: pre-wrap;
  animation: sd-gir .28s cubic-bezier(.16, 1, .3, 1);
}
@keyframes sd-gir { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.sd-musteri {
  align-self: flex-end;
  background: var(--sd-yesil);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.sd-yonetici {
  align-self: flex-start;
  background: #fff;
  color: var(--sd-metin);
  border: 1px solid var(--sd-kenar);
  border-bottom-left-radius: 4px;
}
.sd-kim { font-size: 10.5px; letter-spacing: .3px; text-transform: uppercase; color: var(--sd-yesil-koyu); font-weight: 700; margin-bottom: 3px; }
.sd-saat { font-size: 10px; opacity: .55; margin-top: 4px; text-align: end; }

.sd-sistem { align-self: center; font-size: 11.5px; color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 7px 12px; }

.sd-yaziyor { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid var(--sd-kenar); border-radius: 14px; border-bottom-left-radius: 4px; }
.sd-yaziyor span { width: 6px; height: 6px; border-radius: 50%; background: var(--sd-soluk); animation: sd-zipla 1.3s infinite; }
.sd-yaziyor span:nth-child(2) { animation-delay: .18s; }
.sd-yaziyor span:nth-child(3) { animation-delay: .36s; }
@keyframes sd-zipla { 0%,60%,100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-4px); } }

/* ---- giris ---- */
.sd-alt { flex: 0 0 auto; border-top: 1px solid var(--sd-kenar); background: #fff; }
.sd-form { display: flex; align-items: flex-end; gap: 8px; padding: 12px; }
.sd-kok textarea { max-height: 96px; line-height: 1.5; border-radius: 12px; }

.sd-gonder {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border: none;
  border-radius: 11px;
  background: var(--sd-yesil);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .18s ease, background .18s ease;
}
.sd-gonder:hover:not(:disabled) { background: var(--sd-yesil-koyu); }
.sd-gonder:disabled { opacity: .4; cursor: not-allowed; }
.sd-gonder svg { width: 17px; height: 17px; }

.sd-dipnot { padding: 0 12px 11px; font-size: 10.5px; color: var(--sd-soluk); text-align: center; letter-spacing: .2px; }

/* ---- mobil: tam ekran ---- */
@media (max-width: 640px) {
  .sd-kok { left: 0; bottom: 0; }
  .sd-panel {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: none;
    border-radius: 0;
    transform-origin: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sd-panel, .sd-mesaj, .sd-baslat { transition-duration: .01ms; animation: none; }
  .sd-nokta, .sd-yaziyor span { animation: none; }
}
