/* =====================================================================
   chatbot.css â€” Yuvarlak launcher + glassmorphism chat paneli
   KaranlÄ±k tema, neon-glow, mikro-animasyonlar (FadeInUp).
   Mevcut index.html temasÄ±yla uyumlu â€” deÄŸiÅŸken Ã§akÄ±ÅŸmasÄ± olmasÄ±n diye
   tÃ¼m kurallar .obc-* prefix'iyle scope'lanmÄ±ÅŸtÄ±r.
===================================================================== */

:root {
  --obc-bg:        rgba(16, 22, 34, 0.78);
  --obc-bg-solid:  #101622;
  --obc-stroke:    rgba(255, 255, 255, 0.08);
  --obc-text:      #eaf0fb;
  --obc-text-dim:  #99a4ba;
  --obc-accent:    #4f8cff;
  --obc-accent-2:  #7b5cff;
  --obc-ok:        #2ddc8a;
  --obc-err:       #ff5874;
  --obc-radius:    18px;
}

/* ============== LAUNCHER (saÄŸ alt yuvarlak buton) ============== */
.obc-launcher {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid rgba(127, 179, 255, 0.55);
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(127,179,255,.45), transparent 60%),
    linear-gradient(135deg, #1a2238 0%, #0e1422 100%);
  /* Daha gÃ¼Ã§lÃ¼ neon halka â€” Ã§ift katman + iÃ§ Ä±ÅŸÄ±k */
  box-shadow:
    0 0 0 6px rgba(79, 140, 255, 0.10),
    0 0 24px 6px rgba(123, 92, 255, 0.55),
    0 18px 50px rgba(79, 140, 255, 0.55),
    0 4px 12px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  cursor: pointer;
  z-index: 2147483600;
  display: grid;
  place-items: center;
  transition: transform .25s cubic-bezier(.2,.9,.2,1), box-shadow .3s;
  animation: obc-pulse 2.6s ease-in-out infinite;
}
.obc-launcher:hover { transform: translateY(-3px) scale(1.05); }
.obc-launcher:active { transform: scale(0.95); }
.obc-launcher img {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,.55));
}
.obc-launcher .obc-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 24px; height: 24px; padding: 0 7px;
  background: var(--obc-err);
  color: #fff; font-size: 12px; font-weight: 700;
  border-radius: 999px;
  display: none;
  align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px var(--obc-bg-solid), 0 0 14px rgba(255,88,116,.7);
}
.obc-launcher.obc-has-unread .obc-badge { display: inline-flex; }

@keyframes obc-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 6px rgba(79,140,255,.10),
      0 0 24px 6px rgba(123,92,255,.55),
      0 18px 50px rgba(79,140,255,.55),
      0 4px 12px rgba(0,0,0,.55),
      inset 0 1px 0 rgba(255,255,255,.10);
  }
  50% {
    box-shadow:
      0 0 0 10px rgba(79,140,255,.18),
      0 0 38px 12px rgba(123,92,255,.75),
      0 22px 60px rgba(123,92,255,.65),
      0 4px 12px rgba(0,0,0,.55),
      inset 0 1px 0 rgba(255,255,255,.10);
  }
}

/* ============== PANEL ============== */
.obc-panel {
  position: fixed;
  right: 28px;
  bottom: 140px;
  width: 410px;
  max-width: calc(100vw - 32px);
  height: 600px;
  max-height: calc(100vh - 180px);
  background: var(--obc-bg);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid rgba(127,179,255,.18);
  border-radius: var(--obc-radius);
  box-shadow:
    0 30px 80px rgba(0,0,0,.6),
    0 0 0 1px rgba(127,179,255,.08),
    0 0 60px rgba(123,92,255,.18);
  z-index: 2147483601;
  display: none;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  color: var(--obc-text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  transform: translateY(12px) scale(.98);
  opacity: 0;
  transition: transform .28s cubic-bezier(.2,.9,.2,1), opacity .22s ease;
}
.obc-panel.obc-open {
  display: grid;
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ---- Header ---- */
.obc-head {
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--obc-stroke);
  background: linear-gradient(180deg, rgba(79,140,255,.08), transparent);
}
.obc-head .obc-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(127,179,255,.4);
  object-fit: cover;
}
.obc-head .obc-title { font-size: 14px; font-weight: 600; line-height: 1.1; }
.obc-head .obc-sub  { font-size: 11px; color: var(--obc-text-dim); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.obc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--obc-ok); box-shadow: 0 0 8px var(--obc-ok); }
.obc-head .obc-x {
  margin-left: auto;
  background: transparent; border: 0; color: var(--obc-text-dim);
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
  font-size: 18px;
  transition: background .15s;
}
.obc-head .obc-x:hover { background: rgba(255,255,255,.06); color: var(--obc-text); }

/* ---- Messages ---- */
.obc-body {
  overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}
.obc-body::-webkit-scrollbar { width: 6px; }
.obc-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 999px; }

.obc-msg {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  word-wrap: break-word;
  white-space: pre-wrap;
  animation: obc-fadeInUp .32s cubic-bezier(.2,.9,.2,1) both;
}
.obc-msg.obc-bot {
  align-self: flex-start;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--obc-stroke);
  border-bottom-left-radius: 4px;
}
.obc-msg.obc-visitor {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--obc-accent) 0%, var(--obc-accent-2) 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 6px 18px rgba(79,140,255,.28);
}
.obc-msg.obc-agent {
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(45,220,138,.18), rgba(45,220,138,.08));
  border: 1px solid rgba(45,220,138,.35);
  border-bottom-left-radius: 4px;
}
.obc-msg.obc-system {
  align-self: center;
  background: transparent;
  color: var(--obc-text-dim);
  font-size: 11.5px;
  font-style: italic;
}

@keyframes obc-fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Suggestion chips ---- */
.obc-suggestions {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 4px 16px 8px;
}
.obc-suggestions .obc-chip {
  padding: 6px 11px; font-size: 12px;
  background: rgba(79,140,255,.1);
  border: 1px solid rgba(79,140,255,.35);
  color: var(--obc-text);
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.obc-suggestions .obc-chip:hover {
  background: rgba(79,140,255,.22);
  transform: translateY(-1px);
}

/* ---- Typing indicator ---- */
.obc-typing {
  display: none; align-self: flex-start;
  padding: 10px 14px; border-radius: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--obc-stroke);
}
.obc-typing.obc-on { display: inline-flex; }
.obc-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--obc-text-dim); margin: 0 2px;
  animation: obc-blink 1.2s infinite ease-in-out;
}
.obc-typing span:nth-child(2) { animation-delay: .15s; }
.obc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes obc-blink {
  0%, 80%, 100% { opacity: .3; transform: translateY(0); }
  40%           { opacity: 1; transform: translateY(-2px); }
}

/* ---- Input ---- */
.obc-foot {
  padding: 10px 12px;
  border-top: 1px solid var(--obc-stroke);
  background: rgba(0,0,0,.18);
  display: flex; gap: 8px; align-items: flex-end;
}
.obc-input {
  flex: 1;
  resize: none;
  max-height: 100px;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--obc-stroke);
  background: rgba(255,255,255,.04);
  color: var(--obc-text);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.obc-input:focus {
  border-color: var(--obc-accent);
  box-shadow: 0 0 0 3px rgba(79,140,255,.15);
}
.obc-send {
  height: 40px; padding: 0 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--obc-accent) 0%, var(--obc-accent-2) 100%);
  color: #fff; font-weight: 600; font-size: 13px;
  border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform .12s, box-shadow .15s;
}
.obc-send:hover  { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(79,140,255,.4); }
.obc-send:active { transform: scale(.96); }
.obc-send:disabled { opacity: .5; cursor: not-allowed; }

/* ---- Mobile responsive (landscape laptop kullanÄ±cÄ±sÄ± bile dar olabilir) ---- */
@media (max-width: 480px) {
  .obc-panel { right: 8px; left: 8px; width: auto; bottom: 110px; height: calc(100vh - 140px); }
  .obc-launcher { right: 16px; bottom: 16px; width: 78px; height: 78px; }
  .obc-launcher img { width: 56px; height: 56px; }
}

/* ============== RATING CARD (görüþme sonu deðerlendirmesi) ============== */
.obc-rating-card {
  margin: 14px 6px 6px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(79,140,255,.18), rgba(123,92,255,.22));
  border: 1px solid rgba(127,179,255,.35);
  box-shadow: 0 8px 30px rgba(79,140,255,.25), inset 0 1px 0 rgba(255,255,255,.08);
  color: var(--obc-text);
  animation: obc-fade-up .45s ease both;
}
.obc-rating-title {
  font-size: 13px; font-weight: 600;
  letter-spacing: .4px; text-transform: uppercase;
  color: var(--obc-text-dim); margin-bottom: 10px;
}
.obc-rating-stars {
  font-size: 32px; line-height: 1;
  color: #ffd24a;
  text-shadow: 0 2px 14px rgba(255,210,74,.55);
  letter-spacing: 4px;
}
.obc-rating-stars .obc-empty {
  color: rgba(255,255,255,.18);
  text-shadow: none;
}
.obc-rating-score {
  font-size: 14px; color: var(--obc-text-dim);
  margin-top: 6px;
}
.obc-rating-meta {
  display: grid; grid-template-columns: 1fr; gap: 4px;
  margin-top: 12px; font-size: 13px; color: var(--obc-text);
}
.obc-rating-meta b { color: #fff; }
.obc-rating-foot {
  margin-top: 10px;
  font-size: 12px; color: var(--obc-ok);
  border-top: 1px dashed rgba(255,255,255,.12);
  padding-top: 8px;
}
.obc-input:disabled {
  opacity: .5; cursor: not-allowed;
}
