:root {
  --bg: #eef1f5;          /* daha belirgin açık gri */
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #4a6fa5;
  --border: #d1d5db;

  --bubble-user: #e8f1ff;
  --bubble-bot: #f7f8fa;

  --input-bg: #f4f6f9;
  --input-text: #111827;
  --input-border: #cfd6e0;
  --placeholder: #9099a6;

  --link: #0d6efd;
  --link-hover: #0a58ca;
}

[data-theme="dark"] {
  --bg: #0f172a;          /* koyu lacivert arkaplan */
  --card: #0b1223;        /* koyu kart */
  --text: #ffffff;        /* BAŞLIKLAR/TEXT net beyaz */
  --muted: #9aa3b2;
  --accent: #6c8fc7;
  --border: #1f2937;

  --bubble-user: #172036; /* kullanıcı balonu */
  --bubble-bot: #0f172a;  /* bot balonu */

  --input-bg: #121a2f;    /* input içinde net koyu */
  --input-text: #e5e7eb;  /* input metni */
  --input-border: #2a3553;/* input çizgisi */
  --placeholder: #9aa3b2;

  --link: #8ab4ff;
  --link-hover: #a4c3ff;
}

html, body {
  color: var(--text);
}

.ekds-chat-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: .75rem 0;
}

.ekds-title { 
  font-size: 1.125rem; 
  color: var(--text);
}

.ekds-chat-main { 
  max-width: 900px; 
  margin-inline: auto; 
  padding: 1rem 1rem 6rem;
}

.ekds-chat-history {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  height: min(70vh, 600px);
  overflow-y: auto;
  padding: 1rem;
}

.msg {
  display: flex; gap: .75rem; margin-bottom: .75rem;
}

.msg .bubble {
  padding: .75rem 1rem;
  border-radius: 12px;
  max-width: 85%;
  border: 1px solid var(--border);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow: visible;
  word-wrap: break-word;
  word-break: break-word;
}
.chat-bubble {
  white-space: pre-wrap;
  word-break: break-word;
  overflow: visible;
}

.msg.user { justify-content: flex-end; }
.msg.user .bubble { background: var(--bubble-user); }
.msg.bot .bubble { background: var(--bubble-bot); }

.ekds-chat-inputbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: .75rem;
  display: flex; gap: .5rem;
}

.ekds-chat-inputbar input[type="text"],
.ekds-chat-inputbar textarea {
  background: var(--input-bg);
  color: var(--input-text);
  border: 1px solid var(--input-border);
  border-radius: 10px;
}

.ekds-chat-inputbar input::placeholder,
.ekds-chat-inputbar textarea::placeholder {
  color: var(--placeholder);
}

a, .ekds-chat-history a {
  color: var(--link);
  text-decoration: none;
}
a:hover, .ekds-chat-history a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Mobil dokunuşlar */
@media (max-width: 480px) {
  .ekds-chat-history { height: calc(100vh - 170px); }
  .msg .bubble { max-width: 92%; }
}

