@import "tailwindcss";
@import "tw-animate-css";
/* @import "shadcn/tailwind.css"; */

@custom-variant dark (&:is(.dark *));

@theme inline {
  --font-sans: var(--font-sans);
  --font-mono: var(--font-mono);
  /* Added Arabic font configuration */
  --font-arabic: var(--font-arabic);
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  /* Breakpoints */
  --breakpoint-sm: 40rem;
  --breakpoint-md: 48rem;
  --breakpoint-lg: 64rem;
  --breakpoint-xl: 80rem;
  --breakpoint-2xl: 94.5rem;
  --breakpoint-3xl: 110rem;
  /* Updated radius values to match Figma specs */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1rem;
  --radius-4xl: 1rem;
  /* Updated shadow-sm to match Figma specs */
  --shadow-sm: 0px 1px 4px 0px #00000026;

  /* Custom Animations */
  --animation-bounce-slow: bounce-slow 3s infinite;
  --animation-spin-slow: spin-slow 12s linear infinite;
  --animation-pulse-scale: pulse-scale 2s ease-in-out infinite;
}

@keyframes bounce-slow {

  0%,
  100% {
    transform: translateY(-5%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }

  50% {
    transform: none;
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-scale {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: 0.7;
  }
}

@utility container {
  margin-inline: auto;
  width: 100%;
  /* max-width: 1040px; */
  padding-inline: 1.25rem;


  @variant md {
    max-width: 46.5rem;
    padding-inline: 2rem;
  }

  @variant lg {
    max-width: 62.5rem;
  }

  @variant xl {
    max-width: 77.5rem;
  }

  @variant 2xl {
    max-width: 90.5rem;
  }

  @variant 3xl {
    max-width: 106rem;
  }
}

:root {
  /* Updated color values to match Figma design tokens */
  --background: #ffffff;
  --foreground: #333333;
  --card: #ffffff;
  --card-foreground: #333333;
  --popover: #ffffff;
  --popover-foreground: #333333;
  --primary: #1a88ff;
  --primary-foreground: #ffffff;
  --secondary: #f5f5f5;
  --secondary-foreground: #333333;
  --muted: #BABABA;
  --muted-foreground: #798388;
  --accent: #1a88ff;
  --accent-foreground: #ffffff;
  --destructive: #FF4646;
  --destructive-foreground: #ffffff;
  --border: #D9D9D9;
  --input: #e5e7eb;
  --ring: #1a88ff;
  --chart-1: oklch(0.809 0.105 251.813);
  --chart-2: oklch(0.623 0.214 259.815);
  --chart-3: oklch(0.546 0.245 262.881);
  --chart-4: oklch(0.488 0.243 264.376);
  --chart-5: oklch(0.424 0.199 265.638);
  /* Updated radius to match Figma button border-radius: 12px */
  --radius: 0.75rem;
  --sidebar: oklch(0.985 0.002 247.839);
  --sidebar-foreground: oklch(0.13 0.028 261.692);
  --sidebar-primary: oklch(0.546 0.245 262.881);
  --sidebar-primary-foreground: oklch(0.97 0.014 254.604);
  --sidebar-accent: oklch(0.488 0.243 264.376);
  --sidebar-accent-foreground: oklch(0.97 0.014 254.604);
  --sidebar-border: oklch(0.928 0.006 264.531);
  --sidebar-ring: oklch(0.707 0.022 261.325);
  /* Status Colors */
  --status-active: #1C973C;
  --status-pending: #8C640D;
}

.dark {
  --background: oklch(0.13 0.028 261.692);
  --foreground: oklch(0.985 0.002 247.839);
  --card: oklch(0.21 0.034 264.665);
  --card-foreground: oklch(0.985 0.002 247.839);
  --popover: oklch(0.21 0.034 264.665);
  --popover-foreground: oklch(0.985 0.002 247.839);
  --primary: #1a88ff;
  --primary-foreground: oklch(0.97 0.014 254.604);
  --secondary: oklch(0.274 0.006 286.033);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.278 0.033 256.848);
  --muted-foreground: oklch(0.707 0.022 261.325);
  --accent: #1a88ff;
  --accent-foreground: oklch(0.97 0.014 254.604);
  --destructive: oklch(0.704 0.191 22.216);
  --destructive-foreground: #ffffff;
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: #1a88ff;
  --chart-1: oklch(0.809 0.105 251.813);
  --chart-2: oklch(0.623 0.214 259.815);
  --chart-3: oklch(0.546 0.245 262.881);
  --chart-4: oklch(0.488 0.243 264.376);
  --chart-5: oklch(0.424 0.199 265.638);
  --sidebar: oklch(0.21 0.034 264.665);
  --sidebar-foreground: oklch(0.985 0.002 247.839);
  --sidebar-primary: oklch(0.623 0.214 259.815);
  --sidebar-primary-foreground: oklch(0.97 0.014 254.604);
  --sidebar-accent: oklch(0.42 0.18 266);
  --sidebar-accent-foreground: oklch(0.97 0.014 254.604);
  --sidebar-border: oklch(1 0 0 / 10%);
  --sidebar-ring: oklch(0.551 0.027 264.364);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }

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

  ::-webkit-scrollbar-track {
    background: var(--accent);
  }

  ::-webkit-scrollbar-thumb {
    background-color: var(--secondary);
    border-radius: 9999px;
    transition: background-color 0.2s ease;
  }

  ::-webkit-scrollbar-thumb:hover {
    background-color: color-mix(in srgb, var(--secondary), transparent 30%);
  }

}

@layer utilities {
  .hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;

    &::-webkit-scrollbar {
      display: none;
    }
  }

  .btn-linear {
    @apply bg-linear-90 from-[#1A88FF] to-[#1C7ADF] hover:bg-linear-90 hover:from-[#1A88FF] hover:to-[#1C7ADF] transition-colors;
  }

  .no-spinner::-webkit-outer-spin-button,
  .no-spinner::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  /* Firefox */
  .no-spinner[type='number'] {
    -moz-appearance: textfield;
    appearance: textfield;
  }

  .animate-pulse-scale {
    animation: pulse-scale 2s ease-in-out infinite;
  }
}

@layer components {

  /* Button styles matching Figma: height 48px, border-radius 12px, padding 10px 24px */
  .btn-figma {
    height: 3rem;
    /* 48px */
    border-radius: 0.75rem;
    /* 12px */
    padding: 0.625rem 1.5rem;
    /* 10px 24px */
    gap: 0.5rem;
    /* 8px */
  }

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

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

  /* Card styles matching Figma: border-radius 16px, no border */
  .card-figma {
    border-radius: 1rem;
    /* 16px */
    border: none;
  }

  /* Input styles matching Figma: height 48px, border-radius 8px, padding 10px 16px */
  .input-figma {
    height: 3rem;
    /* 48px */
    border-radius: 0.5rem;
    /* 8px */
    padding: 0.625rem 1rem;
    /* 10px 16px */
    border-width: 1px;
  }

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

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

  .glass-effect {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
  }
}