/* dorukgencer.com — sohbet botu görünümü (30.10; 4.2 SOHBET BOTU). Sitenin açık/koyu renk değişkenlerini kullanır (ortak.css, ana.css);
   admin ön izlemesinde panel temasının aynı adlı değişkenleri geçerlidir. Masaüstünde 380 px pencere; telefonda tam ekran. */
.sb { position: fixed; right: 16px; bottom: 16px; z-index: 1200; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; font-family: var(--govde, system-ui, sans-serif); }
.sb-dugme { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--sari, #FFD43B); color: #111; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .22); transition: transform .2s ease; }
.sb-dugme:hover { transform: translateY(-2px); }
.sb-dugme:focus-visible { outline: 3px solid var(--siyah, #111); outline-offset: 3px; }
.sb-dugme svg { width: 26px; height: 26px; }
.sb--acik .sb-dugme { display: none; }

.sb-dugme { position: relative; }
.sb-rozet { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #E5484D; color: #fff;
  font: 700 12px/20px var(--govde, system-ui, sans-serif); text-align: center; box-shadow: 0 0 0 2px var(--zemin, #fff); animation: sb-rozet .4s ease both; }
.sb-rozet[hidden] { display: none; }
@keyframes sb-rozet { from { transform: scale(0); } 60% { transform: scale(1.2); } to { transform: scale(1); } }
/* Gelen mesaj balonu (30.10): bildirim görünümü; sağ altta düğmenin üstünde, kuyruğu düğmeye bakar */
.sb-ipucu { position: relative; display: flex; align-items: flex-start; gap: 2px; width: min(290px, calc(100vw - 32px)); padding: 12px 6px 12px 14px; border-radius: 16px 16px 4px 16px;
  background: var(--kagit, #fff); color: var(--siyah, #111); border: 1px solid var(--cizgi, #e5e5e5); box-shadow: 0 10px 30px rgba(0, 0, 0, .22); animation: sb-gel .35s ease both; }
.sb-ipucu[hidden] { display: none; }
.sb-ipucu--sabit, .sb-ipucu--sabit + .sb-dugme .sb-rozet { animation: none; }
.sb-ipucu__metin { flex: 1; display: grid; gap: 3px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0; text-align: left; }
.sb-ipucu__ust { font-size: 12px; color: var(--gri, #666); }
.sb-ipucu__ust b { color: var(--siyah, #111); font-weight: 600; }
.sb-ipucu__ust b::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #E5484D; vertical-align: 1px; }
.sb-ipucu__yazi { font-size: 14.5px; line-height: 1.4; font-weight: 500; }
.sb-ipucu__kapat { flex: none; border: 0; background: none; color: var(--gri, #666); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 13px; }
.sb-ipucu__kapat:hover { background: rgba(127, 127, 127, .15); }
@media (prefers-reduced-motion: reduce) { .sb-rozet { animation: none; } }
@keyframes sb-gel { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.sb-pencere { width: 380px; max-width: calc(100vw - 32px); height: min(600px, calc(100vh - 32px)); display: flex; flex-direction: column; background: var(--kagit, #fff); color: var(--yazi, #333);
  border: 1px solid var(--cizgi, #e5e5e5); border-radius: 14px; overflow: hidden; box-shadow: 0 16px 48px rgba(0, 0, 0, .28); }
.sb-pencere[hidden] { display: none; }
.sb-pencere--ic { width: 100%; max-width: 380px; height: 560px; box-shadow: none; }
.sb-ust { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--cizgi, #e5e5e5); color: var(--siyah, #111); }
.sb-ust b { font-size: 15px; font-weight: 600; }
.sb-ust__sag { display: flex; gap: 4px; }
.sb-ust__dugme { border: 1px solid var(--cizgi, #e5e5e5); background: transparent; color: var(--siyah, #111); border-radius: 10px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.sb-ust__dugme:hover { background: rgba(127, 127, 127, .12); }
.sb-ust__kapat { width: 34px; padding: 6px 0; }

.sb-akis { flex: 1 1 auto; overflow-y: auto; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.sb-satir { display: flex; }
.sb-satir--sen { justify-content: flex-end; }
.sb-balon-metin { margin: 0; max-width: 85%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.sb-satir--bot .sb-balon-metin { background: var(--yuzey2, rgba(127, 127, 127, .12)); color: var(--siyah, #111); border-top-left-radius: 4px; }
.sb-satir--sen .sb-balon-metin { background: var(--siyah, #111); color: var(--kagit, #fff); border-top-right-radius: 4px; }
.sb-yaziyor { gap: 4px; padding: 12px; width: max-content; border-radius: 14px; background: var(--yuzey2, rgba(127, 127, 127, .12)); }
.sb-yaziyor i { width: 6px; height: 6px; border-radius: 50%; background: var(--gri, #666); animation: sb-nokta 1s infinite ease-in-out; }
.sb-yaziyor i:nth-child(2) { animation-delay: .15s; }
.sb-yaziyor i:nth-child(3) { animation-delay: .3s; }
@keyframes sb-nokta { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

.sb-cevap { flex: 0 0 auto; padding: 8px 14px 14px; max-height: 60%; overflow-y: auto; }
.sb-cevap:empty { padding: 0; }
.sb-secenekler { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.sb-secenekler--son { flex-direction: column; align-items: stretch; }
.sb-secenek { border: 1px solid var(--siyah, #111); background: transparent; color: var(--siyah, #111); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; text-align: center; text-decoration: none; line-height: 1.3; }
.sb-secenek:hover { background: var(--siyah, #111); color: var(--kagit, #fff); }
.sb-secenek:focus-visible, .sb-gonder:focus-visible, .sb-ust__dugme:focus-visible { outline: 2px solid var(--sari, #FFD43B); outline-offset: 2px; }
.sb-secenek--son { border-radius: 10px; padding: 11px 14px; font-weight: 500; }

.sb-yazi textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--cizgi, #ddd); background: var(--zemin, #fff); color: var(--siyah, #111);
  border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 15px; }
.sb-yazi textarea { resize: none; }
.sb-yazi__alt { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.sb-sayac { color: var(--gri, #666); font-size: 12px; }
.sb-gonder { border: 0; background: var(--siyah, #111); color: var(--kagit, #fff); border-radius: 10px; padding: 9px 16px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.sb-gonder:disabled { opacity: .6; cursor: wait; }
.sb-not { margin: 0; font-size: 12px; line-height: 1.45; color: var(--gri, #666); }

@media (max-width: 600px) {
  .sb { right: 12px; bottom: 12px; }
  .sb--acik { inset: 0; right: 0; bottom: 0; }
  .sb--acik .sb-pencere { width: 100%; max-width: none; height: 100%; border-radius: 0; border: 0; }
  html.sb-acik, html.sb-acik body { overflow: hidden; }
  .sb-pencere--ic { height: 520px; }
}
@media (prefers-reduced-motion: reduce) {
  .sb-ipucu, .sb-dugme, .sb-yaziyor i { animation: none !important; transition: none !important; }
}
