/* Ana sayfa sohbet robotu (inc/sohbet.php sohbet_pencere, sohbet.js). Sol altta: sağ altta "başa dön" düğmesi var.
   Renkler temadan (--ana, --koyu, --altin); tanımlı değilse yedek değerler. */
.sh{--sh-koyu:var(--koyu,#17120d);--sh-altin:var(--altin,#d4a537);--sh-ana:var(--ana,#946614);position:fixed;left:18px;bottom:18px;z-index:85;font-family:var(--f2,system-ui),system-ui,sans-serif}
.sh [hidden]{display:none!important}
.sh-ac{position:relative;width:68px;height:68px;padding:0;border:0;border-radius:50%;background:var(--sh-koyu);box-shadow:0 14px 34px -10px rgba(0,0,0,.55),0 0 0 3px var(--sh-altin);cursor:pointer;transition:transform .25s}
.sh-ac:hover{transform:translateY(-3px) scale(1.04)}
.sh-ac img{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}
/* Sürekli su dalgası: birbirini izleyen iki halka (sohbet penceresi açıkken durur) */
.sh-ac::before,.sh-ac::after{content:"";position:absolute;inset:-8px;border-radius:50%;border:2px solid var(--sh-altin);opacity:0;pointer-events:none;animation:shDalga 3.2s ease-out 1.2s infinite}
.sh-ac::after{animation-delay:2.8s}
.sh.acik .sh-ac::before,.sh.acik .sh-ac::after{animation:none}
@keyframes shDalga{0%{opacity:.7;transform:scale(.9)}100%{opacity:0;transform:scale(1.32)}}
.sh-cevrim{position:absolute;right:3px;bottom:5px;width:14px;height:14px;border-radius:50%;background:#22c55e;border:2px solid #fff}
.sh.acik .sh-ac{transform:scale(.88)}
.sh-balon{position:absolute;left:0;bottom:84px;width:min(290px,calc(100vw - 36px));padding:.95rem 1.1rem;padding-right:2rem;background:#fff;color:#201a14;border-radius:3px 14px 14px 3px;box-shadow:0 18px 40px -16px rgba(0,0,0,.45);border-left:3px solid var(--sh-altin);font-size:.92rem;line-height:1.45;opacity:0;filter:blur(10px);transform:translateY(8px) scale(.97);transition:opacity .9s ease,filter .9s ease,transform .9s cubic-bezier(.2,.8,.2,1)}
/* Bulanıktan netleşerek belirir, solarak kaybolur (sohbet.js) */
.sh-balon.gorunur{opacity:1;filter:none;transform:none}
.sh-balon.soluyor{opacity:0;filter:blur(3px);transform:translateY(4px);transition-duration:1.1s}
.sh-balon p{margin:0}
.sh-balon-kapat{position:absolute;top:4px;right:6px;width:26px;height:26px;border:0;background:none;color:#8a7d68;font-size:1.25rem;cursor:pointer}
@keyframes shGel{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.sh-pen{position:absolute;left:0;bottom:84px;width:min(380px,calc(100vw - 24px));height:min(560px,calc(100svh - 130px));display:flex;flex-direction:column;background:#fffdf9;color:#201a14;border-radius:3px;overflow:hidden;box-shadow:0 30px 70px -20px rgba(0,0,0,.55);border:1px solid rgba(212,165,55,.35);animation:shGel .3s ease}
.sh-ust{display:flex;align-items:center;gap:.75rem;padding:.8rem .9rem;background:var(--sh-koyu);color:#f3ead9}
.sh-ust img{width:44px;height:44px;border-radius:50%;object-fit:cover;border:2px solid var(--sh-altin);flex:none}
.sh-ust div{flex:1;display:flex;flex-direction:column;line-height:1.25;min-width:0}
.sh-ust b{font-family:var(--f1,inherit);font-size:1.02rem;color:#fff}
.sh-ust small{font-size:.74rem;color:#bfb197;display:flex;align-items:center;gap:.35rem}
.sh-ust small::before{content:"";width:7px;height:7px;border-radius:50%;background:#22c55e}
.sh-kapat{width:36px;height:36px;border:1px solid rgba(212,165,55,.4);border-radius:3px;background:none;color:#f3ead9;font-size:1.4rem;line-height:1;cursor:pointer}
.sh-mesajlar{flex:1;overflow-y:auto;padding:1rem .9rem;display:flex;flex-direction:column;gap:.6rem;background:#f7f2e9;overscroll-behavior:contain}
.sh-m{max-width:86%;padding:.65rem .85rem;border-radius:3px;font-size:.92rem;line-height:1.5;overflow-wrap:anywhere;white-space:normal}
.sh-m--bot{align-self:flex-start;background:#fff;border:1px solid #e9dfcd;border-left:3px solid var(--sh-altin)}
.sh-m--sen{align-self:flex-end;background:var(--sh-koyu);color:#f3ead9}
.sh-m a{color:var(--sh-ana);font-weight:600;text-decoration:underline;text-underline-offset:2px}
.sh-m--sen a{color:var(--sh-altin)}
.sh-m ul{margin:.3rem 0;padding-left:1.1rem}
.sh-m li{margin:.15rem 0}
.sh-yaziyor{display:inline-flex;gap:4px;align-items:center}
.sh-yaziyor i{width:7px;height:7px;border-radius:50%;background:#b8a988;animation:shNokta 1s infinite}
.sh-yaziyor i:nth-child(2){animation-delay:.15s}.sh-yaziyor i:nth-child(3){animation-delay:.3s}
@keyframes shNokta{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
.sh-hazir{display:flex;gap:.4rem;overflow-x:auto;padding:.55rem .75rem;background:#f7f2e9;border-top:1px solid #ece2cf;scrollbar-width:none}
.sh-hazir::-webkit-scrollbar{display:none}
.sh-hazir button{flex:none;padding:.42rem .75rem;border-radius:3px;border:1px solid rgba(148,102,20,.35);background:#fff;color:#5a4214;font:inherit;font-size:.8rem;cursor:pointer;white-space:nowrap}
.sh-hazir button:hover{background:var(--sh-koyu);color:var(--sh-altin);border-color:var(--sh-koyu)}
.sh-form{display:flex;gap:.45rem;padding:.65rem .75rem;border-top:1px solid #ece2cf;background:#fffdf9}
.sh-form input{flex:1;min-width:0;height:44px;padding:0 .85rem;border:1px solid #e3d7c3;border-radius:3px;background:#fff;font:inherit;font-size:.95rem;color:#201a14}
.sh-form input:focus{outline:2px solid var(--sh-altin);outline-offset:0;border-color:transparent}
.sh-form button{width:46px;height:44px;border:0;border-radius:3px;background:var(--sh-ana);color:#fff;display:grid;place-items:center;cursor:pointer}
.sh-form button:disabled{opacity:.5;cursor:wait}
.sh-not{margin:0;padding:.35rem .8rem .55rem;font-size:.68rem;color:#8a7d68;background:#fffdf9;text-align:center}
.sh-not a{color:inherit}
/* Telefonda alt hızlı erişim çubuğunun üstünde */
@media (max-width:1024px){.sh{left:12px;bottom:calc(92px + env(safe-area-inset-bottom))}.sh-ac{width:58px;height:58px}.sh-balon,.sh-pen{bottom:72px}}
@media (max-width:480px){.sh-pen{width:calc(100vw - 24px);height:calc(100svh - 190px)}}
@media (prefers-reduced-motion:reduce){.sh-ac::before,.sh-ac::after{animation:none}.sh-balon,.sh-pen{animation:none}}

/* Telefonda pencere tam ekran; açıkken arka sayfa kaymaz (sohbet.js html.sh-kilit) */
@media (max-width:760px){
  .sh-pen{position:fixed;inset:0;left:0;bottom:auto;width:100%;height:100vh;height:100dvh;border:0;border-radius:0;z-index:100;box-shadow:none}
  .sh.acik .sh-ac,.sh.acik .sh-balon{display:none}
  .sh-ust{padding-top:calc(.8rem + env(safe-area-inset-top))}
  .sh-form{padding-bottom:calc(.65rem + env(safe-area-inset-bottom))}
  .sh-form input{font-size:16px}
}
html.sh-kilit,html.sh-kilit body{overflow:hidden;overscroll-behavior:none}