/* wa-lint: skip */
/* prospect-chat.css — chat-UI inde i butlerPlaceholder modal.
   Tager over for det tidligere placeholder-card.
   Loaded i base.njk som core stylesheet. */

.prospect-chat {
  display: flex;
  flex-direction: column;
  width: min(640px, 92vw);
  max-height: min(680px, 84vh);
  background: var(--bg, rgb(255, 255, 255));
  border-radius: 18px;
  box-shadow: 0 30px 60px -20px rgba(50, 79, 89, 0.32);
  overflow: hidden;
}

[data-theme="dark"] .prospect-chat {
  background: rgba(20, 30, 40, 0.98);
}

.prospect-chat__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 12px;
  border-bottom: 1px solid rgba(50, 79, 89, 0.10);
}

.prospect-chat__title {
  margin: 0;
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  color: var(--primary);
}

[data-theme="dark"] .prospect-chat__title { color: var(--ink); }

.prospect-chat__lead {
  margin: 4px 0 0;
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.45;
}

.prospect-chat__close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.prospect-chat__close:hover {
  background: rgba(50, 79, 89, 0.08);
  color: var(--primary);
}

.prospect-chat__log {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.prospect-chat__msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.prospect-chat__msg--agent {
  align-self: flex-start;
  background: rgba(127, 190, 198, 0.12);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}

.prospect-chat__msg--error {
  align-self: stretch;
  background: rgba(184, 90, 58, 0.12);
  color: var(--accent);
  border: 1px dashed rgba(184, 90, 58, 0.35);
  text-align: center;
  font-size: 0.85rem;
}

[data-theme="dark"] .prospect-chat__msg--agent {
  background: rgba(127, 190, 198, 0.18);
}

.prospect-chat__msg p { margin: 0 0 0.5em; }
.prospect-chat__msg p:last-child { margin-bottom: 0; }

.prospect-chat__msg a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.55);
  text-underline-offset: 2px;
}
.prospect-chat__msg--agent a {
  color: var(--accent);
  text-decoration-color: rgba(184, 90, 58, 0.55);
}
.prospect-chat__msg a:hover { text-decoration-thickness: 2px; }

.prospect-chat__thinking {
  align-self: flex-start;
  display: inline-flex;
  gap: 4px;
  padding: 12px 16px;
  background: rgba(127, 190, 198, 0.12);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.prospect-chat__thinking span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.4;
  animation: prospectChatDot 1.2s infinite ease-in-out;
}
.prospect-chat__thinking span:nth-child(2) { animation-delay: 0.15s; }
.prospect-chat__thinking span:nth-child(3) { animation-delay: 0.30s; }
@keyframes prospectChatDot {
  0%, 80%, 100% { opacity: 0.4; transform: scale(1); }
  40% { opacity: 1; transform: scale(1.3); }
}

.prospect-chat__form {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(50, 79, 89, 0.10);
  background: var(--bg, rgb(255, 255, 255));
}

[data-theme="dark"] .prospect-chat__form {
  background: rgba(20, 30, 40, 0.98);
}

.prospect-chat__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid rgba(50, 79, 89, 0.18);
  border-radius: 12px;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--ink);
  background: var(--bg, rgb(255, 255, 255));
  resize: none;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.prospect-chat__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 90, 58, 0.18);
}

.prospect-chat__send {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--primary);
  color: rgb(255, 255, 255);
  border: none;
  border-radius: 12px;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.prospect-chat__send:hover { background: var(--brand-40, var(--accent)); }
.prospect-chat__send:active { transform: scale(0.97); }
.prospect-chat__send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 480px) {
  .prospect-chat {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .prospect-chat__head { padding: 14px 16px 10px; }
  .prospect-chat__log { padding: 14px 16px; }
  .prospect-chat__form { padding: 12px 14px 14px; }
}
