/* Kilo-Mike Athletics chat widget styles.
   Adjust the CSS variables below to match your site's brand colors. */
:root {
  --kmc-primary: #dc2626;
  --kmc-accent: #dc2626;
  --kmc-bg: #ffffff;
  --kmc-text: #1a1a1a;
  --kmc-radius: 14px;
}

#kmc-chat-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--kmc-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  font-size: 26px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
#kmc-chat-bubble:hover {
  transform: scale(1.06);
}

#kmc-chat-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 480px;
  max-height: calc(100vh - 140px);
  background: var(--kmc-bg);
  border-radius: var(--kmc-radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
#kmc-chat-panel.kmc-open {
  display: flex;
}

#kmc-chat-header {
  background: var(--kmc-primary);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
#kmc-chat-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
#kmc-chat-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

#kmc-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f7f7f8;
}
.kmc-msg {
  max-width: 82%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
}
.kmc-msg-bot {
  white-space: normal;
}
.kmc-msg-bot p {
  margin: 0 0 8px;
}
.kmc-msg-bot p:last-child {
  margin-bottom: 0;
}
.kmc-msg-user {
  align-self: flex-end;
  background: var(--kmc-accent);
  color: #fff;
  border-bottom-right-radius: 3px;
}
.kmc-msg-bot {
  align-self: flex-start;
  background: #fff;
  color: var(--kmc-text);
  border: 1px solid #e5e5e5;
  border-bottom-left-radius: 3px;
}
.kmc-msg-typing {
  align-self: flex-start;
  color: #888;
  font-size: 13px;
  font-style: italic;
}

#kmc-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
  background: #f7f7f8;
  flex-shrink: 0;
}
.kmc-quick-btn {
  border: 1px solid var(--kmc-accent);
  color: var(--kmc-accent);
  background: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}
.kmc-quick-btn:hover {
  background: var(--kmc-accent);
  color: #fff;
}

#kmc-chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #eee;
  background: #fff;
  flex-shrink: 0;
}
#kmc-chat-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 14px;
  outline: none;
}
#kmc-chat-input:focus {
  border-color: var(--kmc-accent);
}
#kmc-chat-send {
  background: var(--kmc-accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
}
#kmc-chat-send:disabled {
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 480px) {
  #kmc-chat-panel {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 90px;
  }
  #kmc-chat-bubble {
    right: 16px;
    bottom: 16px;
  }
}
