/* ══════════════════════════════════════════════════════════════════
   Çocuk Sağlığı Rehberi — sağ altta duran bilgilendirme asistanı
   Tüm veri tarayıcıda kalır; dışarıya istek gönderilmez.
   ══════════════════════════════════════════════════════════════════ */
.hkr-fab { position:fixed; right:24px; bottom:24px; z-index:1190; width:60px; height:60px;
  border:0; border-radius:50%; background:var(--hk-primary); color:#fff; cursor:pointer;
  display:flex; align-items:center; justify-content:center; padding:0;
  box-shadow:0 10px 28px rgba(20,22,60,.28); transition:transform .25s, box-shadow .25s; }
.hkr-fab:hover { transform:translateY(-3px) scale(1.04); box-shadow:0 14px 34px rgba(20,22,60,.34); }
.hkr-fab svg { width:28px; height:28px; }
.hkr-fab::after { content:""; position:absolute; inset:-6px; border-radius:50%;
  border:2px solid var(--hk-primary); opacity:.5; animation:hkr-nabiz 2.6s ease-out infinite; }
@keyframes hkr-nabiz { 0%{transform:scale(.86);opacity:.55} 70%{transform:scale(1.25);opacity:0}
  100%{transform:scale(1.25);opacity:0} }
.hkr-fab[hidden] { display:none; }
.hkr-rozet { position:absolute; top:-3px; right:-3px; min-width:18px; height:18px; border-radius:9px;
  background:var(--hk-secondary); color:#fff; font-size:11px; font-weight:700; line-height:18px;
  text-align:center; padding:0 5px; box-shadow:0 0 0 2px #fff; }

/* Temanın "yukarı çık" düğmesi asistanın üstüne alınır (çakışmasın) */
button.back-to-top { bottom:96px !important; right:24px !important; }

/* ── Panel ── */
.hkr-panel { position:fixed; right:24px; bottom:24px; z-index:1191;
  width:min(392px,calc(100vw - 32px)); height:min(620px,calc(100vh - 48px));
  background:#fff; border:1px solid #e6e7f6; border-radius:20px; overflow:hidden;
  display:flex; flex-direction:column; box-shadow:0 26px 70px rgba(20,22,60,.3);
  transform-origin:100% 100%; animation:hkr-ac .3s cubic-bezier(.2,.9,.3,1.1) both; }
@keyframes hkr-ac { from{opacity:0;transform:translateY(18px) scale(.94)} to{opacity:1;transform:none} }
.hkr-panel[hidden] { display:none; }

.hkr-ust { display:flex; align-items:center; gap:12px; padding:15px 16px;
  background:var(--hk-dark); color:#fff; flex:none; }
.hkr-avatar { width:40px; height:40px; border-radius:50%; flex:none; display:flex;
  align-items:center; justify-content:center; background:var(--hk-primary); color:#fff; position:relative; }
.hkr-avatar svg { width:22px; height:22px; }
.hkr-avatar::after { content:""; position:absolute; right:0; bottom:1px; width:10px; height:10px;
  border-radius:50%; background:var(--hk-green); box-shadow:0 0 0 2px var(--hk-dark); }
.hkr-ust-metin { flex:1; min-width:0; }
.hkr-ad { font-weight:700; font-size:15px; line-height:1.25; color:#fff; }
.hkr-alt { font-size:11.5px; opacity:.75; line-height:1.3; }
.hkr-kapat { width:32px; height:32px; border:0; border-radius:50%; background:rgba(255,255,255,.14);
  color:#fff; cursor:pointer; font-size:19px; line-height:1; flex:none; transition:background .2s; }
.hkr-kapat:hover { background:rgba(255,255,255,.26); }

.hkr-akis { flex:1; overflow-y:auto; padding:16px 14px 8px; background:var(--hk-soft);
  display:flex; flex-direction:column; gap:10px; scroll-behavior:smooth; }
.hkr-akis::-webkit-scrollbar { width:8px; }
.hkr-akis::-webkit-scrollbar-thumb { background:#cdcfe8; border-radius:4px; }

.hkr-balon { max-width:88%; padding:11px 14px; border-radius:16px; font-size:14px; line-height:1.62;
  animation:hkr-gir .28s ease both; }
@keyframes hkr-gir { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
.hkr-bot { align-self:flex-start; background:#fff; border:1px solid #e6e7f6;
  border-bottom-left-radius:5px; color:#4a4d6b; }
.hkr-ben { align-self:flex-end; background:var(--hk-primary); color:#fff; border-bottom-right-radius:5px; }
.hkr-balon b, .hkr-balon strong { font-weight:700; }
.hkr-bot b { color:var(--hk-dark); }
.hkr-balon h4 { font-size:13.5px; margin:12px 0 5px; color:var(--hk-primary);
  text-transform:uppercase; letter-spacing:.05em; font-weight:700; }
.hkr-balon h4:first-child { margin-top:0; }
.hkr-balon ul, .hkr-balon ol { margin:0 0 4px; padding-left:19px; }
.hkr-balon li { margin-bottom:5px; }
.hkr-balon p { margin:0 0 8px; }
.hkr-balon p:last-child, .hkr-balon ul:last-child, .hkr-balon ol:last-child { margin-bottom:0; }
.hkr-balon a { color:var(--hk-primary); font-weight:600; border-bottom:1px solid rgba(86,90,207,.35); }
.hkr-not { display:block; margin-top:10px; padding-top:9px; border-top:1px dashed #e0e1f0;
  font-size:11.5px; line-height:1.55; color:#6a6d8a; }

/* yazıyor göstergesi */
.hkr-yaziyor { align-self:flex-start; display:flex; gap:4px; padding:13px 15px; background:#fff;
  border:1px solid #e6e7f6; border-radius:16px; border-bottom-left-radius:5px; }
.hkr-yaziyor span { width:7px; height:7px; border-radius:50%; background:#a6a9c9;
  animation:hkr-zipla 1.15s infinite ease-in-out; }
.hkr-yaziyor span:nth-child(2) { animation-delay:.16s; }
.hkr-yaziyor span:nth-child(3) { animation-delay:.32s; }
@keyframes hkr-zipla { 0%,60%,100%{transform:translateY(0);opacity:.45} 30%{transform:translateY(-5px);opacity:1} }

/* hızlı seçenekler */
.hkr-hizli { display:flex; flex-wrap:wrap; gap:7px; padding:0 14px 10px; background:var(--hk-soft); flex:none; }
.hkr-hizli button { border:1px solid var(--hk-primary); background:#fff; color:var(--hk-primary);
  border-radius:999px; padding:7px 13px; font-size:12.5px; font-weight:600; cursor:pointer;
  transition:background .18s, color .18s; }
.hkr-hizli button:hover { background:var(--hk-primary); color:#fff; }
/* İlk soru sorulduktan sonra konu şeridi tek satıra iner; yanıta yer açılır */
.hkr-hizli.hkr-daralt { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none;
  -webkit-overflow-scrolling:touch; scroll-snap-type:x proximity;
  -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 26px),transparent);
  mask-image:linear-gradient(90deg,#000 calc(100% - 26px),transparent); }
.hkr-hizli.hkr-daralt::-webkit-scrollbar { display:none; }
.hkr-hizli.hkr-daralt button { flex:0 0 auto; scroll-snap-align:start; }

.hkr-form { display:flex; gap:8px; padding:11px 12px; border-top:1px solid #e6e7f6;
  background:#fff; flex:none; }
.hkr-form input { flex:1; min-width:0; border:1px solid #e6e7f6; border-radius:999px;
  padding:11px 16px; font:inherit; font-size:14px; color:var(--hk-dark); background:var(--hk-soft); }
.hkr-form input:focus { outline:2px solid var(--hk-primary); outline-offset:1px; background:#fff; }
.hkr-form button { width:42px; height:42px; flex:none; border:0; border-radius:50%;
  background:var(--hk-primary); color:#fff; cursor:pointer; display:flex; align-items:center;
  justify-content:center; transition:transform .18s; }
.hkr-form button:hover { transform:scale(1.07); }
.hkr-form button svg { width:19px; height:19px; }

/* Arapça (RTL): asistan sola geçer, çerez paneli sağda kaldığı için çakışmaz */
.hk-rtl .hkr-fab, .hk-rtl .hkr-panel { right:auto; left:24px; }
.hk-rtl .hkr-panel { transform-origin:0 100%; }
.hk-rtl button.back-to-top { right:auto !important; left:24px !important; }
.hk-rtl .hkr-balon ul, .hk-rtl .hkr-balon ol { padding-left:0; padding-right:19px; }
.hk-rtl .hkr-form button svg { transform:scaleX(-1); }

@media (max-width:767px) {
  .hkr-fab { right:16px; bottom:74px; width:54px; height:54px; }
  .hkr-panel { right:8px; left:8px; bottom:70px; width:auto; height:min(72vh,560px); border-radius:16px; }
  button.back-to-top { bottom:136px !important; right:20px !important; }
  .hk-rtl .hkr-fab { left:16px; right:auto; }
  .hk-rtl button.back-to-top { left:20px !important; right:auto !important; }
}
@media (prefers-reduced-motion:reduce) {
  .hkr-fab::after { animation:none; }
  .hkr-panel, .hkr-balon { animation:none; }
  .hkr-yaziyor span { animation:none; }
  .hkr-akis { scroll-behavior:auto; }
}
