:host {
  display: block;
  height: 100%;
}

.eip-chat-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #F4F5F7;
  border-radius: 8px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

// ── Header ───────────────────────────────────────────────────────────────

.chat-header {
  background: #0052CC;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.bot-avatar {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.bot-info {
  display: flex;
  flex-direction: column;
}

.bot-name {
  font-weight: 600;
  font-size: 15px;
}

.connection-status {
  font-size: 11px;
  opacity: 0.7;

  &.connected    { color: #79F2C0; opacity: 1; }
  &.reconnecting { color: #FFE380; opacity: 1; }
}

// ── Messages ─────────────────────────────────────────────────────────────

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;

  &::-webkit-scrollbar { width: 4px; }
  &::-webkit-scrollbar-track { background: transparent; }
  &::-webkit-scrollbar-thumb { background: #C1C7D0; border-radius: 2px; }
}

.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6B778C;
  text-align: center;
  padding: 32px;

  .empty-icon { font-size: 48px; margin-bottom: 12px; }
  p { margin: 0; font-size: 14px; }
}

.user-bubble-wrapper {
  display: flex;
  justify-content: flex-end;
}

.user-bubble {
  background: #0052CC;
  color: #fff;
  padding: 10px 14px;
  border-radius: 18px 18px 4px 18px;
  max-width: 70%;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

// ── Typing indicator ─────────────────────────────────────────────────────

.typing-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.bot-avatar-sm {
  width: 28px;
  height: 28px;
  background: #0052CC;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.typing-indicator {
  background: #fff;
  border-radius: 4px 18px 18px 18px;
  padding: 12px 16px;
  display: flex;
  gap: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);

  span {
    width: 8px;
    height: 8px;
    background: #0052CC;
    border-radius: 50%;
    animation: bounce 1.4s infinite;

    &:nth-child(2) { animation-delay: 0.2s; }
    &:nth-child(3) { animation-delay: 0.4s; }
  }
}

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-8px); }
}

// ── Input area ───────────────────────────────────────────────────────────

.chat-input-area {
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid #DFE1E6;
  flex-shrink: 0;
}

.completed-banner {
  background: #E3FCEF;
  color: #006644;
  padding: 12px 16px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.restart-btn {
  background: #006644;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 13px;

  &:hover { background: #005235; }
}

.location-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.location-btn {
  width: 100%;
  padding: 12px;
  background: #0052CC;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;

  &:hover { background: #0747A6; }
  &:active { transform: scale(0.98); }
}

.location-note {
  margin: 0;
  font-size: 12px;
  color: #6B778C;
  text-align: center;
}
