/* Kemp Insurance Agency Chatbot Widget */
:root {
  --cw-green: #1e3b28;
  --cw-green-dark: #13271a;
  --cw-gold: #d6a94f;
  --cw-gold-light: #f0bf5f;
  --cw-cream: #fffdf8;
  --cw-paper: #f4f6f0;
  --cw-ink: #22332a;
  --cw-muted: #5f6e64;
  --cw-line: #cbd8c8;
}

#cw-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: var(--cw-green);
  color: #ffffff;
  border: 2px solid var(--cw-gold);
  border-radius: 999px;
  padding: 12px 20px;
  font: 700 14px/1.2 Arial, sans-serif;
  box-shadow: 0 10px 28px rgba(30, 59, 40, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s, background 0.2s;
}
#cw-launcher:hover {
  transform: translateY(-2px);
  background: var(--cw-green-dark);
}
#cw-launcher svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

#cw-window {
  position: fixed;
  bottom: 84px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 110px);
  background: var(--cw-cream);
  border: 1px solid var(--cw-line);
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(34, 51, 42, 0.25);
  z-index: 10000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
#cw-window.cw-open {
  display: flex;
}

.cw-header {
  background: var(--cw-green);
  color: #ffffff;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--cw-gold);
}
.cw-title {
  font: 700 15px Arial, sans-serif;
}
.cw-subtitle {
  font: 11px Arial, sans-serif;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.cw-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
}
.cw-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.cw-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--cw-paper);
}

.cw-msg {
  max-width: 86%;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
}
.cw-bot {
  background: #ffffff;
  color: var(--cw-ink);
  align-self: flex-start;
  border: 1px solid var(--cw-line);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.cw-user {
  background: var(--cw-green);
  color: #ffffff;
  align-self: flex-end;
}

.cw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.cw-chip {
  background: #ffffff;
  border: 1px solid var(--cw-line);
  border-radius: 999px;
  padding: 6px 12px;
  font: 700 12px Arial, sans-serif;
  color: var(--cw-green);
  cursor: pointer;
  transition: all 0.15s;
}
.cw-chip:hover {
  background: var(--cw-green);
  color: #ffffff;
  border-color: var(--cw-green);
}

/* Chat Lead Form */
.cw-form {
  background: #ffffff;
  border: 1px solid var(--cw-line);
  padding: 14px;
  border-radius: 8px;
  margin-top: 6px;
  font-size: 13px;
}
.cw-form-title {
  font: 700 13px Arial, sans-serif;
  color: var(--cw-green);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cw-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.cw-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 8px;
}
.cw-input:focus {
  outline: 2px solid var(--cw-gold);
}
.cw-submit {
  width: 100%;
  padding: 10px;
  background: var(--cw-green);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font: 700 13px Arial, sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}
.cw-submit:hover {
  background: var(--cw-green-dark);
}
.cw-consent {
  font-size: 11px;
  color: var(--cw-muted);
  line-height: 1.35;
  margin: 6px 0 10px;
}

.cw-footer {
  padding: 10px 14px;
  background: #ffffff;
  border-top: 1px solid var(--cw-line);
  display: flex;
  gap: 8px;
}
.cw-chat-input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--cw-line);
  border-radius: 20px;
  font-size: 13px;
}
.cw-send-btn {
  background: var(--cw-green);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 600px) {
  #cw-window {
    right: 12px;
    bottom: 74px;
    width: calc(100vw - 24px);
    height: calc(100vh - 90px);
  }
}
