/* PODOS – Yardım sohbeti. Renkler styles.css'teki token'lardan gelir. */
.chat-panel {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  width: min(380px, calc(100vw - 32px)); height: min(540px, 70vh);
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; background: var(--ink); color: #fff;
}
.chat-head b { display: block; font-size: 16px; }
.chat-head span { font-size: 13px; opacity: .8; }
.chat-close {
  background: none; border: 0; color: #fff; font-size: 24px; line-height: 1;
  cursor: pointer; padding: 0 4px;
}
.chat-log {
  flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px;
  background: var(--bg);
}
.chat-msg {
  max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.45;
  white-space: pre-wrap; word-wrap: break-word;
}
.chat-msg.bot { align-self: flex-start; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 0; background: var(--bg); }
.chat-chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  border-radius: 999px; padding: 6px 11px; font-size: 12.5px; cursor: pointer;
}
.chat-chip:hover { border-color: var(--accent); color: var(--accent); }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-input {
  flex: 1; min-width: 0; height: 40px; border: 1px solid #d5dcea; border-radius: 10px;
  padding: 0 12px; font: inherit; color: var(--ink); background: #fff;
}
.chat-input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.chat-send {
  height: 40px; border: 0; border-radius: 10px; padding: 0 14px; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 600; font: inherit;
}
@media (max-width: 480px) {
  .chat-panel { right: 8px; bottom: 8px; width: calc(100vw - 16px); height: 70vh; }
}

/* Üst çubuktaki sohbet simgesi: açılana kadar yanıp söner (nokta + halka). */
.top-right .chat-blink { position: relative; isolation: isolate; color: var(--accent); }
.top-right .chat-blink::after {
  content: ""; position: absolute; top: 4px; right: 4px; width: 9px; height: 9px;
  border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 2px var(--surface);
}
.top-right .chat-blink::before {
  content: ""; position: absolute; inset: 0; border-radius: 10px;
  background: var(--accent-soft); animation: chat-blink 1.6s ease-in-out infinite; z-index: -1;
}
@keyframes chat-blink {
  0%, 100% { opacity: 0; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .top-right .chat-blink::before { animation: none; opacity: .6; }
}

/* Canlı destek: sunucudan gelen sorular ve yanıtlar. */
.chat-remote { display: flex; flex-direction: column; gap: 10px; }
.chat-note { font-size: 12.5px; color: var(--ink-2); background: transparent; border: 0; padding: 2px 4px; }
.chat-reply { display: flex; gap: 8px; align-items: flex-end; align-self: stretch; }
.chat-reply textarea {
  flex: 1; min-width: 0; resize: none; border: 1px solid #d5dcea; border-radius: 10px;
  padding: 8px 12px; font: inherit; font-size: 14px; color: var(--ink); background: #fff;
}
.chat-reply textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.chat-reply .chat-send { height: 38px; }
.chat-send:disabled { opacity: .6; cursor: default; }
