/* ── CHATBOT WIDGET ── */
#gcs-chatbot {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 850;
}

.chat-toggle {
  background: var(--color-teal-deep);
  color: white;
  border: none;
  cursor: pointer;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(6, 78, 59, 0.35);
  transition:
    transform var(--transition-fast),
    background var(--transition-fast);
}
.chat-toggle:hover {
  transform: translateY(-2px);
  background: var(--color-teal-mid);
}

.chat-window {
  display: none;
  flex-direction: column;
  position: absolute;
  bottom: 56px;
  left: 0;
  width: 320px;
  height: 420px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.chat-header {
  background: var(--color-teal-deep);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.chat-title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: white;
}
.chat-status {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-lime);
  letter-spacing: 0.06em;
  display: block;
  margin-top: 2px;
}
.chat-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background var(--transition-fast);
}
.chat-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.chat-msg {
  max-width: 85%;
}
.chat-msg p {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1.55;
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
}
.chat-msg.bot p {
  background: var(--color-offwhite);
  color: var(--color-text);
  border-bottom-left-radius: var(--radius-xs);
}
.chat-msg.user {
  align-self: flex-end;
}
.chat-msg.user p {
  background: var(--color-teal-mid);
  color: white;
  border-bottom-right-radius: var(--radius-xs);
}
.chat-msg.typing p {
  color: var(--color-muted);
  letter-spacing: 0.2em;
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}
#chat-input {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: white;
  transition: border-color var(--transition-fast);
}
#chat-input:focus {
  outline: none;
  border-color: var(--color-teal-mid);
}
#chat-send {
  background: var(--color-teal-mid);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition-fast);
}
#chat-send:hover {
  background: var(--color-teal-deep);
}
#chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 479px) {
  #gcs-chatbot {
    bottom: 16px;
    left: 16px;
  }
  .chat-window {
    width: calc(100vw - 32px);
  }
}
