Skip to content

The Open Standard for Generative UI

6.4 KB
Raw Blame
@import "tailwindcss";
@import "@openuidev/react-ui/styles/index.css";

:root {
  --background: #0a0a0a;
  --foreground: #ededed;
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

body {
  color: var(--foreground);
  background: var(--background);
  font-family: Arial, Helvetica, sans-serif;
}

/* Handsontable dark mode */
.handsontable {
  font-size: 13px;
}

.handsontable th {
  background-color: #252525 !important;
  color: #ededed !important;
  border-color: #404040 !important;
}

.handsontable td {
  background-color: #1a1a1a !important;
  color: #ededed !important;
  border-color: #333 !important;
}

.handsontable td.area {
  background-color: rgba(59, 130, 246, 0.2) !important;
}

.handsontable .wtBorder {
  background-color: #3b82f6 !important;
}

.htContextMenu {
  background-color: #1a1a1a !important;
  border-color: #404040 !important;
}

.htContextMenu td {
  background-color: #1a1a1a !important;
  color: #ededed !important;
}

.htContextMenu td:hover {
  background-color: #333 !important;
}

.htContextMenu td.htDisabled {
  color: #666 !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #404040;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Layout: spreadsheet + optional chat side-by-side */
.app-layout {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.spreadsheet-panel {
  flex: 1 1 0%;
  min-width: 0;
  height: 100%;
  background-color: #0f0f0f;
  overflow: hidden;
}

/* Chat panel — flex child, no max-width constraint */
.chat-panel {
  flex: 0 0 auto;
  width: 480px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #0a0a0a;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.chat-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.chat-panel__title {
  font-size: 15px;
  font-weight: 600;
  color: #ededed;
}

.chat-panel__subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: #888;
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-empty {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #bbb;
  font-size: 14px;
  line-height: 1.5;
}

.chat-starters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-starter {
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #141414;
  color: #ededed;
  font-size: 13px;
  cursor: pointer;
}

.chat-starter:hover:not(:disabled) {
  background: #1d1d1d;
  border-color: rgba(59, 130, 246, 0.35);
}

.chat-starter:disabled {
  opacity: 0.5;
  cursor: default;
}

.chat-bubble {
  max-width: 100%;
  font-size: 14px;
  line-height: 1.5;
}

.chat-bubble--user {
  align-self: flex-end;
  max-width: 90%;
  padding: 10px 12px;
  border-radius: 12px 12px 4px 12px;
  background: #1e3a5f;
  color: #f5f5f5;
  white-space: pre-wrap;
}

.chat-bubble--assistant {
  color: #ededed;
}

.chat-bubble--error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.chat-thinking {
  color: #888;
  font-size: 13px;
}

.chat-thinking,
.chat-text {
  margin: 0;
  white-space: pre-wrap;
}

.chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.chat-composer textarea {
  flex: 1;
  resize: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: #141414;
  color: #ededed;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.chat-composer textarea:focus {
  border-color: rgba(59, 130, 246, 0.5);
}

.chat-composer button {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chat-composer button:disabled {
  background: #2a2a2a;
  color: #666;
  cursor: default;
}

/* Let tables/charts inside chat scroll horizontally instead of clipping */
.chat-panel table,
.chat-panel [class*="recharts-wrapper"] {
  max-width: 100%;
  overflow-x: auto;
}

.chat-panel [data-openui-component] {
  max-width: 100%;
  overflow-x: auto;
}

.chat-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 10, 0.8);
  color: #999;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.chat-close-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chat-panel__actions {
  display: flex;
  gap: 8px;
}

/* Floating action button to open chat */
.chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #ededed;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(59, 130, 246, 0.15);
  transition: transform 0.15s, box-shadow 0.15s;
}

.chat-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.chat-fab__label {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .chat-panel {
    width: 100vw;
  }
  .chat-fab__label {
    display: none;
  }
  .chat-fab {
    padding: 14px;
    border-radius: 50%;
  }
}

/* Persistent spreadsheet */
.persistent-spreadsheet {
  background-color: #0f0f0f;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.persistent-spreadsheet > div:first-child {
  flex-shrink: 0;
}

.persistent-spreadsheet > div:nth-child(2) {
  flex: 1;
  min-height: 0;
  position: relative;
}

.persistent-spreadsheet > div:last-child {
  flex-shrink: 0;
}

.persistent-spreadsheet .handsontable {
  position: relative;
  z-index: 1;
}