/* ==========================================================================
   DUAL KICK ASİSTAN — chatbot
   ========================================================================== */
.dkbot{
  --b-blue:#014384; --b-blue2:#1A5E9C; --b-navy:#0E2C4A; --b-green:#3D882B;
  --b-soft:#F4F7FB; --b-line:#E3E9F0; --b-text:#263445; --b-muted:#667085;
  position:fixed; right:26px; bottom:calc(100px + env(safe-area-inset-bottom,0px)); z-index:120;
  font-family:"Montserrat",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}
.dkbot .sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Yukarı çık butonu chatbot'un üstüne alınır */
/* Yukarı çık butonu en altta, chatbot onun üstünde */

/* --- Açma butonu --- */
.dkbot__fab{
  position:relative; display:grid; place-items:center; width:62px; height:62px; padding:0; border:0; border-radius:50%;
  background:linear-gradient(135deg,var(--b-blue) 0%,var(--b-blue2) 55%,var(--b-green) 130%); color:#fff; cursor:pointer;
  box-shadow:0 10px 28px rgba(1,67,132,.35),0 2px 6px rgba(14,44,74,.2);
  transition:transform .3s cubic-bezier(.2,.7,.3,1),box-shadow .3s;
}
.dkbot__fab:hover{ transform:translateY(-3px) scale(1.04); box-shadow:0 16px 36px rgba(1,67,132,.42); }
.dkbot__fab:focus-visible{ outline:3px solid #FFCC00; outline-offset:3px; }
.dkbot__fab svg{ position:absolute; width:28px; height:28px; transition:transform .35s cubic-bezier(.2,.7,.3,1),opacity .25s; }
.dkbot__fab-close{ opacity:0; transform:rotate(-90deg) scale(.6); }
.dkbot.is-open .dkbot__fab-open{ opacity:0; transform:rotate(90deg) scale(.6); }
.dkbot.is-open .dkbot__fab-close{ opacity:1; transform:none; }
.dkbot__fab::after{
  content:""; position:absolute; inset:-6px; border-radius:50%; border:2px solid rgba(1,67,132,.35);
  animation:dkbotPulse 2.8s ease-out infinite; pointer-events:none;
}
.dkbot.is-open .dkbot__fab::after{ display:none; }
@keyframes dkbotPulse{ 0%{ transform:scale(.9); opacity:.9; } 70%,100%{ transform:scale(1.25); opacity:0; } }
.dkbot__badge{
  position:absolute; top:-2px; right:-2px; display:grid; place-items:center; min-width:22px; height:22px; padding:0 6px;
  border:2px solid #fff; border-radius:20px; background:#D62828; color:#fff; font-size:11.5px; font-weight:800; line-height:1;
}

/* --- Karşılama balonu --- */
.dkbot__teaser{
  position:absolute; right:0; bottom:78px; width:max-content; max-width:260px; padding:14px 34px 14px 16px;
  border:1px solid var(--b-line); border-radius:14px 14px 4px 14px; background:#fff; color:var(--b-text);
  box-shadow:0 14px 36px rgba(14,44,74,.16); cursor:pointer; animation:dkbotIn .45s cubic-bezier(.2,.7,.3,1) both;
}
.dkbot__teaser p{ margin:0; font-size:13.5px; font-weight:600; line-height:1.5; }
.dkbot__teaser-x{
  position:absolute; top:6px; right:6px; width:24px; height:24px; padding:0; border:0; border-radius:50%;
  background:transparent; color:var(--b-muted); font-size:18px; line-height:1; cursor:pointer;
}
.dkbot__teaser-x:hover{ background:var(--b-soft); color:var(--b-navy); }

/* --- Panel --- */
.dkbot__panel{
  position:absolute; right:0; bottom:78px; display:flex; flex-direction:column;
  width:390px; height:min(600px,calc(100vh - 210px)); overflow:hidden;
  border:1px solid rgba(14,44,74,.08); border-radius:18px; background:#fff;
  box-shadow:0 24px 70px rgba(14,44,74,.26),0 4px 14px rgba(14,44,74,.08);
  transform-origin:bottom right; animation:dkbotOpen .35s cubic-bezier(.2,.7,.3,1) both;
}
.dkbot__panel[hidden]{ display:none; }
@keyframes dkbotOpen{ from{ opacity:0; transform:translateY(14px) scale(.96); } to{ opacity:1; transform:none; } }
@keyframes dkbotIn{ from{ opacity:0; transform:translateY(8px); } to{ opacity:1; transform:none; } }

.dkbot__head{
  position:relative; display:flex; align-items:center; gap:12px; padding:16px 12px 16px 18px;
  background:linear-gradient(110deg,#0A1F36 0%,#0E2C4A 50%,#123A63 100%); color:#fff;
}
.dkbot__head::after{
  content:""; position:absolute; left:0; right:0; bottom:0; height:2px;
  background:linear-gradient(90deg,var(--b-green) 0%,#FFCC00 35%,rgba(255,204,0,0) 80%);
}
.dkbot__avatar{ flex:none; display:grid; place-items:center; width:44px; height:44px; border-radius:50%; background:#fff; box-shadow:0 0 0 3px rgba(255,255,255,.14); }
.dkbot__avatar img{ width:36px; height:36px; object-fit:contain; }
.dkbot__who{ flex:1; min-width:0; display:flex; flex-direction:column; }
.dkbot__who strong{ font-size:15.5px; font-weight:800; letter-spacing:-.01em; line-height:1.25; }
.dkbot__who small{ display:flex; align-items:center; gap:6px; color:rgba(255,255,255,.7); font-size:12px; font-weight:500; }
.dkbot__dot{ width:8px; height:8px; border-radius:50%; background:#5FD068; box-shadow:0 0 0 3px rgba(95,208,104,.22); }
.dkbot__icon{
  flex:none; display:grid; place-items:center; width:36px; height:36px; padding:0; border:0; border-radius:10px;
  background:transparent; color:rgba(255,255,255,.8); cursor:pointer; transition:background .2s,color .2s;
}
.dkbot__icon:hover{ background:rgba(255,255,255,.12); color:#fff; }
.dkbot__icon:focus-visible{ outline:2px solid #FFCC00; outline-offset:1px; }
.dkbot__icon svg{ width:18px; height:18px; }

/* Mesajlar */
.dkbot__log{
  flex:1; overflow-y:auto; overscroll-behavior:contain; padding:18px 16px 8px;
  background:linear-gradient(180deg,#F7FAFD 0%,#fff 100%);
  scrollbar-width:thin; scrollbar-color:#C9D6E3 transparent;
}
.dkbot__row{ display:flex; margin-bottom:12px; }
.dkbot__row.is-new{ animation:dkbotIn .35s cubic-bezier(.2,.7,.3,1) both; }
.dkbot__row--user{ justify-content:flex-end; }
.dkbot__bubble{
  max-width:86%; padding:11px 14px; border-radius:16px 16px 16px 4px; background:#fff; color:var(--b-text);
  border:1px solid var(--b-line); box-shadow:0 2px 8px rgba(14,44,74,.05);
  font-size:14px; line-height:1.6; overflow-wrap:anywhere;
}
.dkbot__row--user .dkbot__bubble{
  border:0; border-radius:16px 16px 4px 16px; background:linear-gradient(135deg,var(--b-blue),var(--b-blue2)); color:#fff;
  box-shadow:0 4px 12px rgba(1,67,132,.22);
}
.dkbot__bubble b{ color:var(--b-navy); font-weight:700; }
.dkbot__bubble ul{ margin:8px 0 2px; padding-left:18px; }
.dkbot__bubble li{ margin-bottom:4px; }
.dkbot__bubble li::marker{ color:var(--b-green); }
.dkbot__bubble small{ display:block; color:var(--b-muted); font-size:12px; line-height:1.5; }
.dkbot__bubble a{ color:var(--b-blue); font-weight:600; text-decoration:underline; text-underline-offset:2px; }
.dkbot__links{ display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.dkbot__bubble .dkbot__link{
  display:inline-flex; align-items:center; padding:6px 12px; border-radius:30px; background:var(--b-soft);
  border:1px solid #D5E2EF; color:var(--b-blue); font-size:12.5px; font-weight:700; text-decoration:none; transition:.2s;
}
.dkbot__bubble .dkbot__link:hover{ background:var(--b-blue); border-color:var(--b-blue); color:#fff; }

.dkbot__typing{ display:inline-flex; align-items:center; gap:5px; padding:14px 16px; }
.dkbot__typing i{ width:7px; height:7px; border-radius:50%; background:#9DB2C7; animation:dkbotDot 1.2s infinite ease-in-out; }
.dkbot__typing i:nth-child(3){ animation-delay:.15s; } .dkbot__typing i:nth-child(4){ animation-delay:.3s; }
@keyframes dkbotDot{ 0%,60%,100%{ transform:translateY(0); opacity:.5; } 30%{ transform:translateY(-5px); opacity:1; } }

/* Hızlı yanıtlar */
.dkbot__chips{ display:flex; flex-wrap:wrap; gap:6px; padding:4px 16px 12px; }
.dkbot__chips:empty{ display:none; }
.dkbot__chip{
  padding:7px 13px; border:1.5px solid #CFE0F0; border-radius:30px; background:#fff; color:var(--b-blue);
  font:inherit; font-size:12.5px; font-weight:700; line-height:1.3; cursor:pointer; transition:.2s;
  animation:dkbotIn .35s cubic-bezier(.2,.7,.3,1) both;
}
.dkbot__chip:hover{ border-color:var(--b-blue); background:var(--b-blue); color:#fff; }
.dkbot__chip:focus-visible{ outline:2px solid #FFCC00; outline-offset:2px; }

/* Giriş */
.dkbot__form{ display:flex; align-items:center; gap:8px; margin:0 12px; padding:6px 6px 6px 14px; border:1.5px solid var(--b-line); border-radius:30px; background:#fff; transition:border-color .2s,box-shadow .2s; }
.dkbot__form:focus-within{ border-color:var(--b-blue); box-shadow:0 0 0 4px rgba(1,67,132,.1); }
.dkbot__input{ flex:1; min-width:0; padding:8px 0; border:0; outline:0; background:transparent; color:var(--b-text); font:inherit; font-size:14.5px; }
.dkbot__input::placeholder{ color:#98A6B5; }
.dkbot__send{
  flex:none; display:grid; place-items:center; width:40px; height:40px; padding:0; border:0; border-radius:50%;
  background:var(--b-green); color:#fff; cursor:pointer; transition:background .2s,transform .2s;
}
.dkbot__send:hover{ background:var(--b-blue); transform:scale(1.06); }
.dkbot__send:focus-visible{ outline:2px solid #FFCC00; outline-offset:2px; }
.dkbot__send svg{ width:18px; height:18px; margin-left:-2px; }
.dkbot__note{ margin:0; padding:8px 14px 12px; color:#8A97A6; font-size:11px; text-align:center; line-height:1.4; }

/* --- Mobil: tam ekran --- */
@media (max-width:560px){
  .dkbot{ right:16px; bottom:calc(82px + env(safe-area-inset-bottom,0px)); }
  .dkbot__fab{ width:56px; height:56px; }
  .dkbot__teaser{ bottom:70px; max-width:calc(100vw - 32px); }
  .dkbot__panel{
    position:fixed; inset:0; width:auto; height:auto; border:0; border-radius:0;
    padding-bottom:env(safe-area-inset-bottom,0px);
  }
  .dkbot.is-open .dkbot__fab{ display:none; }
  .dkbot__input{ font-size:16px; } /* iOS yakınlaştırmasını engeller */
  html.dkbot-lock, html.dkbot-lock body{ overflow:hidden !important; }
}

@media (prefers-reduced-motion:reduce){
  .dkbot *, .dkbot *::after{ animation:none !important; transition:none !important; }
}
@media print{ .dkbot{ display:none !important; } }

/* Giriş alanında temanın genel odak halkası çıkmasın (form kutusu zaten vurgulanıyor) */
.dkbot__input:focus, .dkbot__input:focus-visible{ outline:0; box-shadow:none; }
.dkbot__log{ position:relative; }
/* Mobil menü açıkken chatbot butonu menünün üstüne binmesin */
body:has(.nav.is-open) .dkbot{ display:none; }
