.oranea-chatbot-inline,
.oranea-chatbot-panel {
  font-family: var(
    --oxchat-font-family,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif
  );
  color: var(--oxchat-text-color, #122131);
}

.oranea-chatbot-inline {
  display: block;
  width: 100%;
  max-width: 420px;
}

.oranea-chatbot-shell {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--oxchat-border-color, #d7dfe7);
  border-radius: var(--oxchat-radius-shell, 14px);
  background: var(--oxchat-shell-background, #ffffff);
  box-shadow: var(--oxchat-shell-shadow, 0 8px 30px rgba(5, 26, 56, 0.12));
  backdrop-filter: var(--oxchat-shell-backdrop-filter, none);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: var(--oxchat-inline-height, auto);
  height: var(--oxchat-inline-height, auto);
}

.oranea-chatbot-header {
  padding: 12px 14px;
  background: var(
    --oxchat-header-background,
    linear-gradient(
      120deg,
      var(--oxchat-primary-dark, #083d77),
      var(--oxchat-primary-color, #0f5f9a)
    )
  );
  color: var(--oxchat-header-color, #ffffff);
  font-weight: 600;
}

.oranea-chatbot-profile-wrap {
  padding: 10px 12px;
  border-bottom: 1px solid var(--oxchat-border-color, #ebeff4);
}

.oranea-chatbot-select {
  width: 100%;
  border: 1px solid var(--oxchat-border-color, #cad5e3);
  border-radius: var(--oxchat-radius-input, 8px);
  padding: 8px 10px;
  background: var(
    --oxchat-input-background,
    var(--oxchat-shell-background, #ffffff)
  );
  color: var(--oxchat-input-text-color, var(--oxchat-text-color, #122131));
}

.oranea-chatbot-messages {
  flex: 1 1 auto;
  min-height: 280px;
  max-height: 340px;
  overflow-y: auto;
  background: var(--oxchat-messages-background, #f8fafc);
  padding: 12px;
}

.oranea-chatbot-row {
  display: flex;
  margin-bottom: 10px;
}

.oranea-chatbot-row-user {
  justify-content: var(--oxchat-user-align, flex-end);
}

.oranea-chatbot-row-assistant {
  justify-content: var(--oxchat-assistant-align, flex-start);
}

.oranea-chatbot-bubble {
  max-width: 86%;
  padding: 9px 10px;
  border-radius: var(--oxchat-radius-bubble, 10px);
  line-height: 1.35;
  white-space: pre-wrap;
}

.oranea-chatbot-bubble a.oranea-chatbot-link {
  text-decoration: underline;
  word-break: break-word;
}

.oranea-chatbot-row-user .oranea-chatbot-bubble {
  background: var(
    --oxchat-user-bubble-background,
    var(--oxchat-primary-color, #0f5f9a)
  );
  color: var(--oxchat-user-bubble-color, #ffffff);
  border: var(--oxchat-user-bubble-border, 1px solid transparent);
}

.oranea-chatbot-row-user .oranea-chatbot-bubble a.oranea-chatbot-link {
  color: inherit;
}

.oranea-chatbot-row-assistant .oranea-chatbot-bubble {
  background: var(--oxchat-assistant-bubble-background, #e8f1fa);
  color: var(
    --oxchat-assistant-bubble-color,
    var(--oxchat-text-color, #122131)
  );
  border: var(--oxchat-assistant-bubble-border, 1px solid transparent);
}

.oranea-chatbot-row-assistant .oranea-chatbot-bubble a.oranea-chatbot-link {
  color: var(--oxchat-primary-dark, #083d77);
}

.oranea-chatbot-mode-choices {
  display: flex;
  gap: 8px;
  margin-top: 0;
  flex-wrap: wrap;
}

.oranea-chatbot-mode-choice {
  border: 1px solid var(--oxchat-primary-color, #0f5f9a);
  border-radius: var(--oxchat-radius-pill, 999px);
  padding: 7px 12px;
  background: var(--oxchat-shell-background, #ffffff);
  color: var(--oxchat-primary-color, #0f5f9a);
  cursor: pointer;
  font-size: 13px;
  line-height: 1.1;
}

.oranea-chatbot-mode-choice.is-selected {
  background: var(--oxchat-primary-color, #0f5f9a);
  color: #ffffff;
}

.oranea-chatbot-mode-choice:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.oranea-chatbot-status {
  min-height: 22px;
  padding: 4px 12px;
  font-size: 13px;
  color: var(--oxchat-muted-color, #3d556d);
}

.oranea-chatbot-status.is-error {
  color: #9f1f1f;
}

.oranea-chatbot-input-wrap {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--oxchat-border-color, #ebeff4);
  align-items: flex-end;
}

.oranea-chatbot-input {
  flex: 1;
  resize: vertical;
  min-height: 44px;
  border: 1px solid var(--oxchat-border-color, #cad5e3);
  border-radius: var(--oxchat-radius-input, 8px);
  padding: 8px 10px;
  line-height: 1.3;
  color: var(--oxchat-input-text-color, var(--oxchat-text-color, #122131));
  background: var(
    --oxchat-input-background,
    var(--oxchat-shell-background, #ffffff)
  );
}

.oranea-chatbot-input::placeholder {
  color: var(--oxchat-placeholder-color, var(--oxchat-muted-color, #64748b));
  opacity: 1;
}

.oranea-chatbot-send {
  border: none;
  border-radius: var(--oxchat-radius-input, 8px);
  padding: 10px 14px;
  background: var(--oxchat-primary-color, #0f5f9a);
  color: #ffffff;
  cursor: pointer;
}

.oranea-chatbot-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.oranea-chatbot-floating-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.oranea-chatbot-launcher-label {
  max-width: min(240px, 80vw);
  padding: 8px 12px;
  border: 1px solid var(--oxchat-border-color, #d7dfe7);
  border-radius: var(--oxchat-radius-pill, 999px);
  background: var(--oxchat-shell-background, #ffffff);
  color: var(--oxchat-text-color, #122131);
  box-shadow: var(--oxchat-shell-shadow, 0 8px 24px rgba(8, 61, 119, 0.12));
  font-size: 13px;
  line-height: 1.2;
}

.oranea-chatbot-launcher {
  margin-top: 10px;
  border: none;
  border-radius: var(--oxchat-radius-pill, 999px);
  width: 56px;
  height: 56px;
  padding: 0;
  background: var(
    --oxchat-launcher-background,
    var(--oxchat-primary-dark, #083d77)
  );
  color: #ffffff;
  cursor: pointer;
  box-shadow: var(--oxchat-shell-shadow, 0 8px 24px rgba(8, 61, 119, 0.3));
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.oranea-chatbot-launcher-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.oranea-chatbot-launcher-icon svg {
  width: 36px;
  height: 36px;
  display: block;
  fill: currentColor;
}

.oranea-chatbot-panel {
  width: min(92vw, 420px);
}

@media (max-width: 640px) {
  .oranea-chatbot-floating-root {
    right: 10px;
    bottom: 10px;
  }

  .oranea-chatbot-shell {
    max-width: 100%;
  }

  .oranea-chatbot-messages {
    max-height: 44vh;
  }

  .oranea-chatbot-input-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .oranea-chatbot-send {
    width: 100%;
  }
}
