/* AI ideas */
.ai-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.ai-card::before {
  content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--purple), var(--brand));
}
.ai-id { font-family: var(--mono); font-size: 11px; color: var(--purple); }
.ai-title { font-size: 14px; font-weight: 600; margin: 6px 0 8px; }
.ai-section { font-size: 11.5px; color: var(--text-2); margin-top: 8px; }
.ai-section .label { text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; color: var(--text-3); }
.ai-section .body { color: var(--text-1); margin-top: 2px; }

/* AI chat modal ("AI'a Yaz") */
.ai-chat-thread {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 420px; overflow-y: auto; padding: 4px 2px 8px;
}
.ai-msg {
  max-width: 82%; padding: 10px 12px; border-radius: var(--radius);
  font-size: 13px; line-height: 1.45; white-space: pre-wrap;
  position: relative;
}
.ai-msg.staff {
  align-self: flex-end; background: var(--brand-soft); border: 1px solid var(--brand-border); color: var(--text-0);
}
.ai-msg.ai {
  align-self: flex-start; background: var(--bg-2); border: 1px solid var(--line); color: var(--text-1);
}
.ai-msg.ai-ticket-summary { max-width: 100%; width: 100%; }
.ai-chat-input-row {
  display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
  align-items: center;
}
.ai-chat-input-row input {
  flex: 1; background: var(--bg-4); border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--text-0); padding: 12px 18px; font-size: 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ai-chat-input-row input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--agent, var(--brand)) 60%, var(--line-2));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--agent, var(--brand)) 20%, transparent);
}
.ai-chat-input-row .agent-send {
  background: linear-gradient(180deg, var(--agent-2, var(--brand-2)), var(--agent, var(--brand)));
  border: 1px solid color-mix(in srgb, var(--agent, var(--brand)) 60%, transparent);
  color: #fff; font-weight: 600; padding: 10px 20px; border-radius: 999px;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--agent, var(--brand)) 25%, transparent);
}
.ai-chat-input-row .agent-send:hover:not(:disabled) { filter: brightness(1.08); }
.ai-chat-input-row .agent-send:disabled { opacity: .55; cursor: default; }

/* ---- End-of-conversation feedback card ----
   Shown once when the user finishes with the agent. Two big choices: red ✗
   (unhelpful) or green ✓ (helpful). One question, no per-message noise. */
.agent-feedback-card {
  align-self: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  margin: 12px auto 4px; padding: 18px 22px;
  background: color-mix(in srgb, var(--agent, var(--brand)) 5%, var(--bg-2));
  border: 1px solid color-mix(in srgb, var(--agent, var(--brand)) 25%, var(--line-2));
  border-radius: 18px;
  max-width: 82%;
  animation: fb-in .25s ease-out both;
}
@keyframes fb-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.agent-feedback-q {
  font-size: 14px; font-weight: 600; color: var(--text-0); text-align: center;
}
.agent-feedback-actions { display: flex; gap: 14px; }
.fb-choice {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px;
  background: var(--bg-1); color: var(--text-0);
  font-family: var(--font); font-size: 13.5px; font-weight: 600;
  border: 1.5px solid var(--line-2); cursor: pointer;
  transition: transform .12s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.fb-choice .fb-icon {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: 13px; font-weight: 800;
}
.fb-choice.fb-yes .fb-icon { background: var(--ok-soft);     color: var(--ok); }
.fb-choice.fb-no  .fb-icon { background: var(--danger-soft); color: var(--danger); }
.fb-choice.fb-yes:hover { border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 12%, var(--bg-1));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--ok) 25%, transparent); }
.fb-choice.fb-no:hover  { border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, var(--bg-1));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--danger) 25%, transparent); }
.fb-choice:active:not(:disabled) { transform: scale(.96); }
.fb-choice:disabled { cursor: default; opacity: .75; }
.fb-choice.chosen.fb-yes { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.fb-choice.chosen.fb-no  { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }

/* ---- Per-reply rating: one quiet line ----
   Sits in the same actions row as the speak button, so rating a reply costs
   a line rather than a block. Deliberately understated: voting is optional,
   an unrated reply is a normal outcome, and nothing here interrupts typing. */
.inline-rate {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 2px;
}
.inline-rate-q {
  font-size: 11.5px; color: var(--text-3); letter-spacing: .01em;
}
.inline-rate-btn {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 800; line-height: 1;
  background: transparent; color: var(--text-3);
  border: 1px solid var(--line-2); cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.inline-rate-btn.ir-up:hover:not(:disabled) {
  color: var(--ok); border-color: var(--ok); background: var(--ok-soft);
}
.inline-rate-btn.ir-down:hover:not(:disabled) {
  color: var(--danger); border-color: var(--danger); background: var(--danger-soft);
}
.inline-rate-btn:focus-visible { outline: 2px solid var(--agent, var(--brand)); outline-offset: 2px; }
/* Once rated, keep only the chosen mark — the other button would just be
   dead weight, and the line has to stay short. */
.inline-rate.rated .inline-rate-btn { cursor: default; opacity: 0; width: 0; border-width: 0; margin: 0; }
.inline-rate.rated-up   .ir-up   { opacity: 1; width: 20px; border-width: 1px;
  color: var(--ok); border-color: var(--ok); background: var(--ok-soft); }
.inline-rate.rated-down .ir-down { opacity: 1; width: 20px; border-width: 1px;
  color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }

/* On the tinted disc the muted tokens disappear — lift them to glass. */
.modal.agent-round .inline-rate-q { color: rgba(255,255,255,.6); }
.modal.agent-round .inline-rate-btn {
  color: rgba(255,255,255,.75); border-color: rgba(255,255,255,.28);
}
