/* wp-content/plugins/bo-ai-assistant-widget/assets/css/assistant-widget.css */

.bo-ai-assistant-widget {
  --bo-ai-accent: #2f6fed;
  --bo-ai-bg: #ffffff;
  --bo-ai-text: #1f2937;
  --bo-ai-muted: #6b7280;
  --bo-ai-border: #e5e7eb;
  --bo-ai-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  --bo-ai-radius: 18px;
  --bo-ai-z: 999999;
  position: fixed;
  z-index: var(--bo-ai-z);
  font-family: Arial, sans-serif;
  color: var(--bo-ai-text);
}

.bo-ai-launcher {
  position: fixed;
  bottom: 24px;
}

.bo-ai-launcher.is-right,
.bo-ai-panel.is-right {
  right: 24px;
}

.bo-ai-launcher.is-left,
.bo-ai-panel.is-left {
  left: 24px;
}

.bo-ai-launcher-btn {
  border: 0;
  background: #a78f73;
  color: #fff;
  border-radius: 5px;
  padding: 14px 18px;
  box-shadow: var(--bo-ai-shadow);
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.bo-ai-launcher-btn:hover {
  opacity: 0.95;
}

.bo-ai-form-actions .bo-ai-onboarding-submit {
font-size: 14px;
width: 100%;
border-radius: 5px;
}

.bo-ai-panel {
  position: fixed;
  bottom: 84px;
  width: min(380px, calc(100vw - 24px));
  max-height: min(700px, calc(100vh - 120px));
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.22s ease;
}

.bo-ai-assistant-widget.is-open .bo-ai-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.bo-ai-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bo-ai-bg);
  border: 1px solid var(--bo-ai-border);
  border-radius: 5px;
  box-shadow: none;
  min-height: 520px;
}

.bo-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--bo-ai-border);
}

.bo-ai-title {
  font-size: 16px;
  font-weight: 700;
}

.bo-ai-subtitle {
  font-size: 13px;
  color: var(--bo-ai-muted);
  margin-top: 3px;
}

.bo-ai-close {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--bo-ai-muted);
  font-size: 26px;
  line-height: 1;
  padding: 0;
  width: 34px;
  height: 34px;
}

.bo-ai-body {
  flex: 1;
  min-height: 0;
  background: #fff;
}

.bo-ai-messages {
  height: 300px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bo-ai-message {
  display: flex;
  flex-direction: column;
}

.bo-ai-message--user {
  justify-content: flex-end;
}

.bo-ai-message--assistant {
  justify-content: flex-start;
}

.bo-ai-message-bubble {
  max-width: 100%;
  padding: 12px 14px;
  border-radius: 5px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.bo-ai-message--user .bo-ai-message-bubble {
  background: var(--bo-ai-accent);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.bo-ai-message--assistant .bo-ai-message-bubble {
  background: #f3f4f6;
  color: var(--bo-ai-text);
  border-bottom-left-radius: 6px;
}

.bo-ai-message-meta {
  margin-top: 6px;
  max-width: 88%;
}

.bo-ai-source-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bo-ai-source-ref {
  display: inline-block;
  align-items: center;
  padding: 4px 8px;
  border-radius: 5px;
  background: #f6fafd;
  color: #000000;
  font-size: 12px;
  line-height: 1.2;
  text-decoration: none;
  border: solid 1px #CECECE;
}

.bo-ai-footer {
  border-top: 1px solid var(--bo-ai-border);
  background: #fff;
  padding: 12px 14px 8px 14px;
}

.bo-ai-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.bo-ai-new-chat,
.bo-ai-send-transcript {
  border: 1px solid var(--bo-ai-border);
  background: #fff;
  color: var(--bo-ai-text);
  border-radius: 5px;
  padding: 7px 11px;
  font-size: 12px;
  cursor: pointer;
}

.bo-ai-status {
font-size: 12px;
font-weight: 500;
    color: #000000;
    padding: 3px;
    border-radius: 5px;
    text-align: center;
}

.bo-ai-status.is-error {
  color: #b91c1c;
}

.bo-ai-input-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: stretch;
}

.bo-ai-input {
  width: 100%;
  resize: none;
  border: 1px solid var(--bo-ai-border);
  border-radius: 5px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.4;
  min-height: 48px;
  max-height: 140px;
  outline: none;
}

.bo-ai-input:focus {
  border-color: var(--bo-ai-accent);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

.bo-ai-send {
  border: 0;
  background: var(--bo-ai-accent);
  color: #fff;
  border-radius: 5px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  min-width: 88px;
}

.bo-ai-send:disabled,
.bo-ai-new-chat:disabled,
.bo-ai-send-transcript:disabled,
.bo-ai-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.bo-ai-signature a {
  font-size: 12px;
  color: #000000;
  text-decoration: underline;
  text-align: center;
  padding: 10px 0 0 0;
  display: block;
}

@media (max-width: 640px) {
  .bo-ai-launcher.is-right,
  .bo-ai-panel.is-right {
    right: 12px;
  }

  .bo-ai-launcher.is-left,
  .bo-ai-panel.is-left {
    left: 12px;
  }

  .bo-ai-launcher {
    bottom: 12px;
  }

  .bo-ai-panel {
    bottom: 68px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 84px);
  }

  .bo-ai-card {
    min-height: 70vh;
  }

  .bo-ai-input-wrap {
    grid-template-columns: 1fr;
  }

  .bo-ai-send {
    width: 100%;
  }
}
