@import "tailwindcss";
@import "tw-animate-css";

@custom-variant dark ([data-theme="dark"] &);
@custom-variant light ([data-theme="light"] &);

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-customborder:black
  --font-sans: var(--font-geist-sans);
  --font-mono: var(--font-geist-mono);
  --font-tajawal: var(--font-tajawal);
  --color-sidebar-ring: var(--sidebar-ring);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar: var(--sidebar);
  --color-chart-5: var(--chart-5);
  --color-chart-4: var(--chart-4);
  --color-chart-3: var(--chart-3);
  --color-chart-2: var(--chart-2);
  --color-chart-1: var(--chart-1);
  --color-ring: var(--ring);
  --color-input: var(--input);
  --color-border: var(--border);
  --color-destructive: var(--destructive);
  --color-accent-foreground: var(--accent-foreground);
  --color-accent: var(--accent);
  --color-muted-foreground: var(--muted-foreground);
  --color-muted: var(--muted);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-secondary: var(--secondary);
  --color-primary-foreground: var(--primary-foreground);
  --color-primary: var(--primary);
  --color-popover-foreground: var(--popover-foreground);
  --color-popover: var(--popover);
  --color-card-foreground: var(--card-foreground);
  --color-card: var(--card);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
}

:root {
  --radius: 0.625rem;

  /* Accessibility variables */
  --accessibility-font-scale: 1;
  --accessibility-focus-outline: 3px solid #007acc;
  --accessibility-focus-offset: 2px;
}

[data-theme="light"] {
  --background: #f3f3f3;
  --foreground: #0f172a;
   --color-customborder:black;
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.97 0 0);
  --accent-foreground: oklch(0.205 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: oklch(0.205 0 0);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.97 0 0);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.922 0 0);
  --sidebar-ring: oklch(0.708 0 0);
}

/* Force background color changes for theme switching */
[data-theme="light"] html,
[data-theme="light"] body {
  background-color: #f3f3f3 !important;
  color: #0f172a !important;
}

[data-theme="dark"] html,
[data-theme="dark"] body {
  background-color: #0f172a !important;
  color: #f8fafc !important;
}

[data-theme="dark"] {
  --background: #0f172a;
  --foreground: #f8fafc;
  --color-customborder:white;
  --card: #1e293b;
  --card-foreground: #f8fafc;
  --popover: #1e293b;
  --popover-foreground: #f8fafc;
  --primary: #e2e8f0;
  --primary-foreground: #0f172a;
  --secondary: #334155;
  --secondary-foreground: #f8fafc;
  --muted: #334155;
  --muted-foreground: #cbd5e1;
  --accent: #334155;
  --accent-foreground: #f8fafc;
  --destructive: #ef4444;
  --border: rgba(255, 255, 255, 0.1);
  --input: rgba(255, 255, 255, 0.15);
  --ring: #64748b;
  --chart-1: #8b5cf6;
  --chart-2: #06b6d4;
  --chart-3: #f59e0b;
  --chart-4: #ec4899;
  --chart-5: #f97316;
  --sidebar: #1e293b;
  --sidebar-foreground: #f8fafc;
  --sidebar-primary: #8b5cf6;
  --sidebar-primary-foreground: #f8fafc;
  --sidebar-accent: #334155;
  --sidebar-accent-foreground: #f8fafc;
  --sidebar-border: rgba(255, 255, 255, 0.1);
  --sidebar-ring: #64748b;
}
 html {
    scroll-behavior: smooth
  }
@media screen and (min-width: 640px) {
  html {
    font-size: 18px;
    scroll-behavior: smooth
  }
}

@utility flex-center {
  @apply flex justify-center items-center;
}
@utility box-container {
  @apply container w-full 2xl:max-w-[100%] min-[1600px]:w-[90%] mx-auto;
}

@utility circle {
  @apply rounded-full;
}

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

  html {
    transition: 0.3s ease, color 0.3s ease;
  }

  body {
    transition: 0.3s ease, color 0.3s ease;
    min-height: 100vh;
  }

  /* Ensure all elements use CSS variables for better dark mode support */
  div,
  section,
  article,
  aside,
  header,
  footer,
  nav,
  main {
    transition: background-color 0.3s ease, color 0.3s ease,
      border-color 0.3s ease;
  }
}
@layer utilities {
  .flex-row-center {
    @apply flex w-full justify-center;
  }
  .flex-center {
    @apply flex w-full items-center justify-center;
  }
  .main-padding {
    @apply px-5 lg:px-20 xl:px-[70px];
  }
}
.animate-zoom {
  animation: zoom 25s linear infinite;
}

.animate-zoom-paused {
  animation: zoom 25s linear infinite;
  animation-play-state: paused;
}

@layer utilities {
  .scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .scrollbar-hide::-webkit-scrollbar {
    display: none;
  }
}
button {
  cursor: pointer;
}
.box {
  width: 260px;
  height: 42px;
  line-height: 50px;
  background: rgb(40, 40, 40);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  overflow: hidden;
  position: relative;
}
.box p {
  margin: 0;
  display: inline-block;
  line-height: 14px;
  vertical-align: middle;
}
.box p:after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0px;
  width: 150px;
  height: 14px;
  background: linear-gradient(
    to right,
    rgba(40, 40, 40, 0),
    rgba(40, 40, 40, 1) 50%
  );
}

/* Accessibility Styles */
@layer utilities {
  .sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .accessibility-focus:focus {
    outline: var(--accessibility-focus-outline) !important;
    outline-offset: var(--accessibility-focus-offset) !important;
  }

  .accessibility-text {
    font-size: calc(1em * var(--accessibility-font-scale)) !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --accessibility-focus-outline: 4px solid #000000;
    --accessibility-focus-offset: 3px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@keyframes zoomIn {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.zoom-animation {
  animation: zoomIn 20s ease-in-out infinite;
}
