.rise-openai-chatbot-root,
.rise-openai-chatbot-root * {
  box-sizing: border-box;
}

.rise-openai-chatbot-root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--rise-chatbot-text, #111827);
}

.rise-chatbot-floating-root {
  position: fixed;
  z-index: 999999;
  bottom: 20px;
}

.rise-chatbot-right {
  right: 20px;
}

.rise-chatbot-left {
  left: 20px;
}

.rise-chatbot-launcher {
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  background: var(--rise-chatbot-primary, #155eef);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

.rise-chatbot-panel {
  display: flex;
  flex-direction: column;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  background: var(--rise-chatbot-bg, #fff);
  color: var(--rise-chatbot-text, #111827);
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
}

.rise-chatbot-floating-root .rise-chatbot-panel {
  position: absolute;
  bottom: 62px;
}

.rise-chatbot-right .rise-chatbot-panel {
  right: 0;
}

.rise-chatbot-left .rise-chatbot-panel {
  left: 0;
}

.rise-chatbot-panel-hidden {
  display: none;
}

.rise-chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--rise-chatbot-primary, #155eef);
  color: #fff;
}

.rise-chatbot-title {
  font-weight: 800;
  font-size: 15px;
}

.rise-chatbot-status {
  margin-top: 3px;
  font-size: 12px;
  opacity: 0.88;
}

.rise-chatbot-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}

.rise-chatbot-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.03), rgba(17, 24, 39, 0));
}

.rise-chatbot-message-row {
  display: flex;
  margin: 0 0 12px;
}

.rise-chatbot-user {
  justify-content: flex-end;
}

.rise-chatbot-assistant {
  justify-content: flex-start;
}

.rise-chatbot-message {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.rise-chatbot-user .rise-chatbot-message {
  background: var(--rise-chatbot-primary, #155eef);
  color: #fff;
  border-bottom-right-radius: 5px;
}

.rise-chatbot-assistant .rise-chatbot-message {
  background: rgba(17, 24, 39, 0.08);
  color: var(--rise-chatbot-text, #111827);
  border-bottom-left-radius: 5px;
}

.rise-chatbot-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  background: var(--rise-chatbot-bg, #fff);
}

.rise-chatbot-action {
  border: 1px solid rgba(17, 24, 39, 0.16);
  background: #fff;
  color: var(--rise-chatbot-text, #111827);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
}

.rise-chatbot-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(17, 24, 39, 0.1);
  background: var(--rise-chatbot-bg, #fff);
}

.rise-chatbot-input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(17, 24, 39, 0.2);
  border-radius: 999px;
  padding: 11px 13px;
  font: inherit;
}

.rise-chatbot-submit {
  border: 0;
  border-radius: 999px;
  padding: 11px 15px;
  background: var(--rise-chatbot-primary, #155eef);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.rise-chatbot-submit:disabled,
.rise-chatbot-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.rise-chatbot-branding {
  padding: 7px 12px 10px;
  text-align: center;
  font-size: 11px;
  color: rgba(17, 24, 39, 0.55);
}

@media (max-width: 480px) {
  .rise-chatbot-floating-root {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .rise-chatbot-floating-root .rise-chatbot-panel {
    left: 0;
    right: 0;
    width: 100% !important;
    height: calc(100vh - 92px) !important;
  }

  .rise-chatbot-launcher {
    float: right;
  }
}
