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

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 222.2 47.4% 11.2%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --success: 142 76% 36%;
    --success-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 222.2 84% 4.9%;
    --radius: 0.5rem;
    --add-leg: 41 96% 40%;
    --add-leg-foreground: 0 0% 100%;
    --simulator-box: 216 33% 25%;
    --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: 220 26% 7%;
    --foreground: 210 40% 98%;
    --card: 220 20% 10%;
    --card-foreground: 210 40% 98%;
    --popover: 220 20% 10%;
    --popover-foreground: 210 40% 98%;
    --primary: 195 100% 50%;
    --primary-foreground: 220 26% 7%;
    --secondary: 220 15% 15%;
    --secondary-foreground: 210 40% 98%;
    --muted: 220 15% 15%;
    --muted-foreground: 215 20.2% 65.1%;
    --accent: 195 100% 50%;
    --accent-foreground: 220 26% 7%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --success: 142 76% 36%;
    --success-foreground: 210 40% 98%;
    --border: 220 15% 20%;
    --input: 220 15% 20%;
    --ring: 195 100% 50%;
    --add-leg: 41 96% 40%;
    --add-leg-foreground: 0 0% 100%;
    --simulator-box: 216 33% 25%;
    --sidebar-background: 220 35% 12%;
    --sidebar-foreground: 210 40% 98%;
    --sidebar-primary: 195 100% 50%;
    --sidebar-primary-foreground: 220 26% 7%;
    --sidebar-accent: 220 30% 18%;
    --sidebar-accent-foreground: 210 40% 98%;
    --sidebar-border: 220 30% 18%;
    --sidebar-ring: 195 100% 50%;
  }
}

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

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

  html {
    scroll-behavior: smooth;
  }

  /* Custom scrollbar styles */
  .legs-table-container::-webkit-scrollbar {
    height: 8px;
  }

  .legs-table-container::-webkit-scrollbar-track {
    background: rgba(43, 60, 86, 0.5);
    border-radius: 4px;
  }

  .legs-table-container::-webkit-scrollbar-thumb {
    background: rgba(156, 176, 206, 0.5);
    border-radius: 4px;
  }

  .legs-table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 176, 206, 0.7);
  }

  /* Transparent number input arrows with white color */
  .number-input-transparent-arrows::-webkit-inner-spin-button,
  .number-input-transparent-arrows::-webkit-outer-spin-button {
    opacity: 1;
    background: transparent !important;
    cursor: pointer;
    width: 20px;
    height: 20px;
    margin: 0;
    padding: 0;
  }

  .number-input-transparent-arrows::-webkit-inner-spin-button:hover,
  .number-input-transparent-arrows::-webkit-outer-spin-button:hover {
    background: transparent !important;
  }

  .number-input-transparent-arrows {
    -moz-appearance: textfield;
  }

  /* Remove default styling from number input spin buttons */
  input[type="number"]::-webkit-inner-spin-button,
  input[type="number"]::-webkit-outer-spin-button {
    background: transparent !important;
  }
}

@layer utilities {
  .hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  }

  .scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .scrollbar-hide::-webkit-scrollbar {
    display: none;
  }
}

/* Responsive font scaling */
@media (max-width: 640px) {
  html {
    font-size: 14px;
  }
}

@media (min-width: 1024px) {
  html {
    font-size: 16px;
  }
}

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

::-webkit-scrollbar-track {
  background: hsl(220 15% 15%);
}

::-webkit-scrollbar-thumb {
  background: hsl(220 15% 25%);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(220 15% 35%);
}
