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

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 0 0% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 0 0% 3.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 3.9%;
    --primary: 0 0% 9%;
    --primary-foreground: 0 0% 98%;
    --secondary: 0 0% 96.1%;
    --secondary-foreground: 0 0% 9%;
    --muted: 0 0% 96.1%;
    --muted-foreground: 0 0% 45.1%;
    --accent: 0 0% 96.1%;
    --accent-foreground: 0 0% 9%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 240 5.9% 90%;
    --input: 240 5.9% 90%;
    --ring: 240 5% 64.9%;
    --radius: 0.5rem;
  }

  .dark {
    --background: 0 0% 3.9%;
    --foreground: 0 0% 98%;
    --card: 0 0% 3.9%;
    --card-foreground: 0 0% 98%;
    --popover: 0 0% 3.9%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 0 0% 9%;
    --secondary: 0 0% 14.9%;
    --secondary-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%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 14.9%;
    --input: 0 0% 14.9%;
    --ring: 0 0% 83.1%;
  }
}

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

  body {
    @apply bg-background text-foreground;
  }
}

@layer utilities {
  /* Hide scrollbar for Chrome, Safari and Opera */
  .no-scrollbar::-webkit-scrollbar {
    display: none;
  }

  /* Hide scrollbar for IE, Edge and Firefox */
  .no-scrollbar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
  }

  .editor-wrapper .monaco-editor {
    border-radius: 10px;
  }
  .editor-wrapper .overflow-guard {
    border-radius: 10px;
    border: 1px solid #d9d9d9;
  }
  /* Custom styles for the Monaco editor suggestion widget */
  .editor-wrapper .monaco-editor .suggest-widget {
    border-radius: 4px;
    overflow: hidden;
    /* border: 1px solid var(--border-color); */
    /* box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); */
    min-width: 280px !important;
  }

  /* Style individual suggestion items */
  .editor-wrapper .monaco-editor .suggest-widget .monaco-list-row {
    white-space: nowrap !important;
    overflow: visible !important;
  }

  /* Make the suggestion list container wider */
  .editor-wrapper .monaco-editor .suggest-widget > .message,
  .editor-wrapper .monaco-editor .suggest-widget > .tree {
    width: auto !important;
    min-width: 100% !important;
  }

  /* Ensure the details pane is wide enough */
  .editor-wrapper .monaco-editor .suggest-widget .details-view {
    padding: 8px;
    width: auto !important;
    min-width: 100% !important;
  }

  /* Style the highlighted/selected suggestion */
  .editor-wrapper
    .monaco-editor
    .suggest-widget
    .monaco-list
    .monaco-list-row.focused {
    background-color: #d5f0ff !important; /* Selected background */
    color: black !important; /* Selected text color */
  }

  /* Style the matching text highlight */
  .editor-wrapper
    .monaco-editor
    .suggest-widget
    .monaco-list
    .monaco-list-row.focused
    .highlight {
    color: black !important; /* Highlighted text in selected item */
    font-weight: bold;
  }

  /* Style the matching text in non-selected items */
  .editor-wrapper
    .monaco-editor
    .suggest-widget
    .monaco-list
    .monaco-list-row
    .highlight {
    color: #0078d4 !important; /* Highlighted text color */
    font-weight: bold;
  }
  /* Hover styles */
  .editor-wrapper .monaco-editor .monaco-hover {
    background-color: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  }
}
