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

body {
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@layer base {
  :root {
    --background: 0 0% 98.5%;
    --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% 95%;
    --muted-foreground: 0 0% 45.1%;
    --accent: 0 0% 93%;
    --accent-foreground: 0 0% 9%;

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

    --chart-1: 217.22deg 91.22% 59.8%;
    --chart-2: 158.11deg 64.37% 51.57%;
    --chart-3: 258.31deg 89.53% 66.27%;
    --chart-4: 37.69deg 92.13% 50.2%;
    --chart-5: 220deg 8.94% 46.08%;
    --chart-6: 188.74deg 94.5% 42.75%;
    --chart-7: 330.37deg 81.19% 60.39%;

    --radius: 0.5rem;
    --spacing: 0.25rem;

    --info-background: 217 90% 97%;
    --info-foreground: 221 83% 53%;
    --info-separator: 217 90% 92%;

    --success: 141 60% 30%;
    --success-background: 160 43% 96%;
    --success-foreground: 161 95% 24%;
    --success-separator: 151 47% 85%;

    --warning: 32 100% 35%;
    --warning-background: 43 75% 96%;
    --warning-foreground: 32 98% 34%;
    --warning-separator: 43 79% 85%;

    --destructive: 0 84.2% 60.2%;
    --destructive-background: 3 90% 97%;
    --destructive-foreground: 0 71% 49%;
    --destructive-separator: 2 95% 90%;

    --sidebar-background: 0 0% 99.5%;
    --sidebar-foreground: 0 0% 26.1%;
    --sidebar-primary: 0 0% 10%;
    --sidebar-primary-foreground: 0 0% 98%;
    --sidebar-accent: 0 0% 95.9%;
    --sidebar-accent-foreground: 0 0% 10%;
    --sidebar-border: 0 0% 91%;
    --sidebar-ring: 0 0% 59.8%;

    --code-background: 0 0% 97%;

    --table-header: 0 0% 97.5%;
    --table-cell: 0 0% 99.5%;
    --table-cell-hover: 0 0% 97.5%;
    --table-cell-active: 0 0% 96%;
  }

  .dark {
    --background: 0 0% 2%;
    --foreground: 0 0% 98%;
    --card: 0 0% 4%;
    --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% 16%;
    --accent-foreground: 0 0% 98%;

    --border: 0 0% 10%;
    --input: 0 0% 14.9%;
    --ring: 0 0% 83.1%;

    --info-background: 218 39% 10%;
    --info-foreground: 220 96% 70%;
    --info-separator: 217 46% 15%;

    --success: 141 71% 48%;
    --success-background: 152 30% 8%;
    --success-foreground: 158 63% 52%;
    --success-separator: 153 43% 12%;

    --warning: 45 100% 50%;
    --warning-background: 44 42% 9%;
    --warning-foreground: 43 96% 56%;
    --warning-separator: 43 57% 14%;

    --destructive: 0 62.8% 50.6%;
    --destructive-background: 4 35% 10%;
    --destructive-foreground: 0 92% 71%;
    --destructive-separator: 2 44% 15%;

    --sidebar-background: 0 0% 10%;
    --sidebar-foreground: 0 0% 95.9%;
    --sidebar-primary: 0 0% 48%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 0 0% 15.9%;
    --sidebar-accent-foreground: 0 0% 95.9%;
    --sidebar-border: 0 0% 15.9%;
    --sidebar-ring: 0 0% 59.8%;

    --code-background: 0 0% 6%;

    --table-header: 0 0% 8%;
    --table-cell: 0 0% 3%;
    --table-cell-hover: 0 0% 6%;
    --table-cell-active: 0 0% 7%;
  }

  .slide-in-from-right {
    animation: slide-in-from-right 0.2s ease-out;
  }

  .slide-out-to-right {
    animation: slide-out-to-right 0.2s ease-out;
  }

  @keyframes slide-in-from-right {
    from {
      transform: translateX(100%);
    }
    to {
      transform: translateX(0);
    }
  }

  @keyframes slide-out-to-right {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(100%);
    }
  }
}

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

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground;
  }
}

@layer base {
  /* Hide native time dropdown UI */
  input[type='time']::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
  }

  input[type='time']::-webkit-clear-button,
  input[type='time']::-webkit-inner-spin-button {
    display: none;
    -webkit-appearance: none;
  }

  /* Firefox support */
  input[type='time'] {
    -moz-appearance: textfield;
  }
}

.scrollbar-sm {
  @apply scrollbar-thin scrollbar-thumb-neutral-300 dark:scrollbar-thumb-neutral-700 scrollbar-track-background;
}

@keyframes skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

::selection {
  @apply bg-primary text-primary-foreground;
}

.animate-shimmer-text {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-color: hsl(var(--muted-foreground) / 0.5);
  background-image: -webkit-gradient(
    linear,
    100% 0,
    0 0,
    from(hsl(var(--muted-foreground) / 0.5)),
    color-stop(0.5, hsl(var(--foreground) / 1)),
    to(hsl(var(--muted-foreground) / 0.5))
  );
  animation: shimmer-text 1.5s infinite;
  background-repeat: no-repeat;
  background-size: 50% 200%;
  transition: all 0.25s;
}

@keyframes shimmer-text {
  0% {
    background-position: -100% top;
  }
  50% {
    background-position: 200% top;
  }
  100% {
    transition: all 0.25s;
    background-color: hsl(var(--foreground) / 1);
    background-position: 200% top;
  }
}
