@tailwind base;
@tailwind components;
@tailwind utilities;

* {
  scrollbar-width: thin;
  /* Make the scrollbar narrower */
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
  /* Thumb and track colors */
}



#root {
  overflow: hidden;
}

.bg-grid {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='8' height='8' fill='none' stroke='rgb(0 0 0 / 0.1)'%3e%3cpath d='M0 .5H31.5V32'/%3e%3c/svg%3e");
}

/* fix prism code wrap */
pre[class*="language-"],
code[class*="language-"] {
  /* white-space: normal !important; */
  overflow: auto;
  word-break: break-word !important;
  font-size: 0.75rem !important;
  line-height: 1.25rem !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

html {
  font-size: 16px;
}

#title-bar {
  margin-left: env(titlebar-area-x, 0);
  margin-top: env(titlebar-area-y, 0);
  height: env(titlebar-area-height, 32px);
  width: env(titlebar-area-width, 100%);
  z-index: 9;
}

#title-bar-mac {
  margin-top: env(titlebar-area-y, 0);
  height: env(titlebar-area-height, 32px);
  width: env(titlebar-area-width, 100%);
  z-index: 9;
}

.drag-region {
  -webkit-app-region: drag;
}

#drag-region {
  -webkit-app-region: drag;
}

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 0 0% 3.9%;

    --muted: 0 0% 96.1%;
    --muted-foreground: 0 0% 45.1%;

    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 3.9%;

    --border: 0 0% 89.8%;
    --input: 0 0% 89.8%;

    --card: 0 0% 100%;
    --card-foreground: 0 0% 3.9%;

    --primary: 0 0% 9%;
    --primary-foreground: 0 0% 98%;

    --secondary: 0 0% 96.1%;
    --secondary-foreground: 0 0% 9%;

    --accent: 0 0% 96.1%;
    --accent-foreground: 0 0% 9%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;

    --ring: 0 0% 3.9%;

    --radius: 0.5rem;

    --token-comment-color: #6c757d;
    --token-punctuation-color: #999;
    --token-property-color: #905;
    --token-selector-color: #690;
    --token-operator-color: #9a6e3a;
    --token-attr-color: #07a;
    --token-variable-color: #e90;
    --token-function-color: #dd4a68;

    /* --rhm */
    --rhm-rect: #ebedf0;
    --rhm-text-color: #24292e;
    --rhm-rect-hover-stroke: rgba(0, 0, 0, 0.14);
    --rhm-rect-active: #196127;
    --chart-1: 12 76% 61%;
    --chart-2: 173 58% 39%;
    --chart-3: 197 37% 24%;
    --chart-4: 43 74% 66%;
    --chart-5: 27 87% 67%;
    --sidebar-background: 0 0% 98%;
    --sidebar-foreground: 240 5.3% 26.1%;
    --sidebar-primary: 240 5.9% 10%;
    --sidebar-primary-foreground: 0 0% 98%;
    --sidebar-accent: 240 4.8% 95.9%;
    --sidebar-accent-foreground: 240 5.9% 10%;
    --sidebar-border: 220 13% 91%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }

  .dark {
    --background: 0 0% 3.9%;
    --foreground: 0 0% 98%;

    --muted: 0 0% 14.9%;
    --muted-foreground: 0 0% 63.9%;

    --accent: 0 0% 14.9%;
    --accent-foreground: 0 0% 98%;

    --popover: 0 0% 3.9%;
    --popover-foreground: 0 0% 98%;

    --border: 0 0% 14.9%;
    --input: 0 0% 14.9%;

    --card: 0 0% 3.9%;
    --card-foreground: 0 0% 98%;

    --primary: 0 0% 98%;
    --primary-foreground: 0 0% 9%;

    --secondary: 0 0% 14.9%;
    --secondary-foreground: 0 0% 98%;

    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;

    --ring: 0 0% 83.1%;

    --radius: 0.5rem;

    --token-comment-color: #6c757d;
    --token-punctuation-color: #999;
    --token-property-color: #d19a66;
    --token-selector-color: #c678dd;
    --token-operator-color: #a9a9a9;
    --token-attr-color: #56a8a8;
    --token-variable-color: #e09062;
    --token-function-color: #cb6d90;

    /* --rhm */
    --rhm-rect: #2d333b;
    --rhm-text-color: #c9d1d9;
    --rhm-rect-hover-stroke: rgba(255, 255, 255, 0.14);
    --rhm-rect-active: #196127;
    --chart-1: 220 70% 50%;
    --chart-2: 160 60% 45%;
    --chart-3: 30 80% 55%;
    --chart-4: 280 65% 60%;
    --chart-5: 340 75% 55%;
    --sidebar-background: 240 5.9% 10%;
    --sidebar-foreground: 240 4.8% 95.9%;
    --sidebar-primary: 224.3 76.3% 48%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 240 3.7% 15.9%;
    --sidebar-accent-foreground: 240 4.8% 95.9%;
    --sidebar-border: 240 3.7% 15.9%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }
}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply bg-background text-foreground;
    font-feature-settings: "rlig" 1, "calt" 1;
  }
}

/* body {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
} */

/* select */
.selected {
  background-color: hsl(var(--secondary));
}

/* fts-result > b */
.fts-result b {
  color: var(--token-function-color);
}