/* =============================================================================
   NPC Chat Widget — Old Barnaby web chat
   ============================================================================= */

/* Container */
#npc-chat {
  max-width: 760px;
  margin: 0 auto 48px;
  padding: 0 var(--container-pad);
}

/* --- Login Prompt --- */
.npc-chat__login {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 24px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
}.npc-chat__login-icon {
  color: var(--text-dim);
  opacity: 0.5;
}
.npc-chat__login-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

/* --- Chat Widget Header --- */
.npc-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  border-bottom: none;
}
.npc-chat__npc-info {
  display: flex;
  align-items: center;
  gap: 12px;
}.npc-chat__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(200, 162, 78, 0.15);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}
.npc-chat__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.npc-chat__title {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* --- Messages Area --- */
.npc-chat__messages {
  background: var(--surface-alt);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);  padding: 16px;
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.npc-chat__messages::-webkit-scrollbar {
  width: 6px;
}
.npc-chat__messages::-webkit-scrollbar-track {
  background: transparent;
}
.npc-chat__messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* --- Individual Messages --- */
.npc-chat__message {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.6;
  word-wrap: break-word;
}.npc-chat__message--npc {
  align-self: flex-start;
  background: var(--surface-card);
  border: 1px solid var(--border);
  color: var(--text);
}
.npc-chat__message--player {
  align-self: flex-end;
  background: rgba(200, 162, 78, 0.12);
  border: 1px solid rgba(200, 162, 78, 0.25);
  color: var(--text);
}

/* --- Input Area --- */
.npc-chat__input-area {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 0 0 12px 12px;
  border-top: none;
}
.npc-chat__input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast);
}
.npc-chat__input:focus {
  border-color: var(--gold-dark);
}
.npc-chat__input:disabled {
  opacity: 0.5;
}
.npc-chat__input::placeholder {
  color: var(--text-dim);
}
.npc-chat__send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--gold-dark);
  border: none;
  border-radius: 8px;
  color: var(--surface);
  cursor: pointer;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}
.npc-chat__send:hover {  background: var(--gold);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .npc-chat__messages {
    max-height: 300px;
  }
  .npc-chat__message {
    max-width: 90%;
  }
}