/* Sidekick chat widget — self-contained, sk- prefixed, floats above admin content.
   Neutral colors chosen to read on both light and dark admin themes. */

.sk-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
}

.sk-launcher {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: #2f6f4f;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.sk-launcher:hover {
  background: #275e42;
}

.sk-panel {
  position: absolute;
  right: 0;
  bottom: 64px;
  width: 360px;
  height: 480px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: #1e2229;
  color: #e8e8e8;
  border: 1px solid #3a3f47;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.sk-hidden {
  display: none;
}

.sk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #2f6f4f;
  color: #fff;
  flex-shrink: 0;
}

.sk-title {
  font-weight: 600;
}

.sk-header-actions {
  display: flex;
  gap: 6px;
}

.sk-icon-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
}

.sk-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sk-msg {
  max-width: 85%;
  padding: 8px 10px;
  border-radius: 8px;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.sk-msg-user {
  align-self: flex-end;
  background: #2f6f4f;
  color: #fff;
}

.sk-msg-assistant {
  align-self: flex-start;
  background: #2a2e35;
  color: #e8e8e8;
}

.sk-msg-error {
  align-self: flex-start;
  background: #5c2626;
  color: #ffd6d6;
}

.sk-tool-line {
  align-self: flex-start;
  color: #9aa0a8;
  font-size: 12px;
  font-style: italic;
}

.sk-input-row {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid #3a3f47;
  flex-shrink: 0;
}

.sk-input {
  flex: 1;
  resize: none;
  border-radius: 6px;
  border: 1px solid #3a3f47;
  background: #14171c;
  color: #e8e8e8;
  padding: 8px;
  font: inherit;
  max-height: 90px;
}

.sk-send-btn {
  border: none;
  border-radius: 6px;
  background: #2f6f4f;
  color: #fff;
  padding: 0 14px;
  cursor: pointer;
  font: inherit;
}

.sk-send-btn:disabled,
.sk-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sk-action-card {
  align-self: flex-start;
  max-width: 90%;
  background: #2a2e35;
  border: 1px solid #3a3f47;
  border-radius: 8px;
  padding: 10px;
}

.sk-action-buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.sk-action-confirm,
.sk-action-cancel {
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font: inherit;
}

.sk-action-confirm {
  background: #2f6f4f;
  color: #fff;
}

.sk-action-cancel {
  background: #3a3f47;
  color: #e8e8e8;
}
