@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: 0 0% 89.8%;
    --input: 0 0% 89.8%;
    --ring: 0 0% 3.9%;
    --radius: 0.5rem;
    --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%;
  }

  .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%;
    --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%;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
  }
}

@layer utilities {
  .step {
    counter-increment: step;
  }

  .step:before {
    @apply absolute w-9 h-9 bg-muted rounded-full font-mono font-medium text-center text-base inline-flex items-center justify-center -indent-px border-4 border-background;
    @apply ml-[-50px] mt-[-4px];
    content: counter(step);
  }

  .chunk-container {
    @apply shadow-none;
  }

  .chunk-container::after {
    content: "";
    @apply absolute -inset-4 shadow-xl rounded-xl border;
  }
}
[data-rehype-pretty-code-figure] figcaption {
  @apply  px-2 py-1 tracking-wider  dark:text-zinc-200 text-black;
}

[data-rehype-pretty-code-figure] code {
  @apply text-sm !leading-loose md:text-base border-0 p-0;
}
[data-rehype-pretty-code-figure] pre {
  @apply rounded-lg;
}


[data-rehype-pretty-code-figure] code[data-line-numbers] {
  counter-reset: line;
}

[data-rehype-pretty-code-figure] code[data-line-numbers]>[data-line]::before {
  counter-increment: line;
  content: counter(line);
  @apply mr-4 inline-block w-4 text-right text-gray-500;
}

[data-rehype-pretty-code-figure] [data-line] {
  @apply border-l-2 border-l-transparent px-3;
}

[data-rehype-pretty-code-figure] [data-highlighted-line] {
  background: rgba(200, 200, 255, 0.1);
  @apply border-l-blue-400;
}

[data-rehype-pretty-code-figure] [data-highlighted-chars] {
  @apply rounded bg-zinc-600/50;
  box-shadow: 0 0 0 4px rgb(82 82 91 / 0.5);
}

[data-rehype-pretty-code-figure] [data-chars-id] {
  @apply border-b-2 p-1 shadow-none;
}

.subheading-anchor {
  @apply no-underline hover:underline;
}

#path {
  stroke-dasharray: 39px 979px;
  animation: line-anim 2s ease infinite;
}
#path2 {
  stroke-dasharray: 39px 679px;
  animation: line-anim 3s ease infinite;
}
#path3 {
  stroke-dasharray: 39px 679px;
  animation: line-anim 1s ease infinite;
}


@keyframes line-anim {
  0% {
    stroke-dashoffset: 0px;
  }
  100% {
    stroke-dashoffset: -579px;
  }
}
html{
  scroll-behavior: smooth;
}


::-webkit-scrollbar {
  width: 7px;
}

/* Track */
::-webkit-scrollbar-track {
  background: #e3e3e6; 
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: #757474;
  border-radius: 12px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #a19d9d; 
  border-radius: 12px;
}
pre {
  -ms-overflow-style: none; 
  scrollbar-width: thin; 
  width: 100%;
  max-width: 700px;
  background-color: rgb(36, 35, 35) !important;
  overflow-x: auto; 
  overflow-y: auto;
  box-sizing: border-box;
  margin: 0 auto;
  border-radius: 0px !important;
}

pre::-webkit-scrollbar {
  height: 6px; 
  width: 0px; 
}
#tabs::-webkit-scrollbar {
  display: none; /* Hides scrollbar in Chrome, Safari */
}

#tabs {
  -ms-overflow-style: none; /* Hides scrollbar in Internet Explorer 10+ */
  scrollbar-width: none; /* Hides scrollbar in Firefox */
}

pre::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
}
