/* ============================================
   DEFAULT THEME (Clarity)
   Supports both light and dark modes
   ============================================ */

:root,
.theme-default {
  --background: oklch(0.9777 0.0041 301.4256);
  --foreground: oklch(0.3651 0.0325 287.0807);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.3651 0.0325 287.0807);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.3651 0.0325 287.0807);
  --primary: oklch(0.6104 0.0767 299.7335);
  --primary-foreground: oklch(0.9777 0.0041 301.4256);
  --secondary: oklch(0.8957 0.0265 300.2416);
  --secondary-foreground: oklch(0.3651 0.0325 287.0807);
  --muted: oklch(0.8906 0.0139 299.7754);
  --muted-foreground: oklch(0.5288 0.0375 290.7895);
  --accent: oklch(0.7889 0.0802 359.9375);
  --accent-foreground: oklch(0.3394 0.0441 1.7583);
  --destructive: oklch(0.6332 0.1578 22.6734);
  --destructive-foreground: oklch(0.9777 0.0041 301.4256);
  --border: oklch(0.8447 0.0226 300.1421);
  --input: oklch(0.9329 0.0124 301.2783);
  --ring: oklch(0.6104 0.0767 299.7335);
  --chart-1: oklch(0.6104 0.0767 299.7335);
  --chart-2: oklch(0.7889 0.0802 359.9375);
  --chart-3: oklch(0.7321 0.0749 169.867);
  --chart-4: oklch(0.854 0.0882 76.8292);
  --chart-5: oklch(0.7857 0.0645 258.0839);
  --sidebar: oklch(0.9554 0.0082 301.3541);
  --sidebar-foreground: oklch(0.3651 0.0325 287.0807);
  --sidebar-primary: oklch(0.6104 0.0767 299.7335);
  --sidebar-primary-foreground: oklch(0.9777 0.0041 301.4256);
  --sidebar-accent: oklch(0.7889 0.0802 359.9375);
  --sidebar-accent-foreground: oklch(0.3394 0.0441 1.7583);
  --sidebar-border: oklch(0.8719 0.0198 302.169);
  --sidebar-ring: oklch(0.6104 0.0767 299.7335);
  --success: oklch(0.7321 0.0749 169.867);
  --success-foreground: oklch(0.2166 0.0215 292.8474);
  --warning: oklch(0.854 0.0882 76.8292);
  --warning-foreground: oklch(0.3651 0.0325 287.0807);
  --info: oklch(0.6104 0.0767 299.7335);
  --info-foreground: oklch(0.9777 0.0041 301.4256);
  --font-sans: Geist, sans-serif;
  --font-serif: "Lora", Georgia, serif;
  --font-mono: "Fira Code", "Courier New", monospace;
  --font-display: var(--font-sans);
  --radius: 0.5rem;
  --shadow-x: 1px;
  --shadow-y: 2px;
  --shadow-blur: 5px;
  --shadow-spread: 1px;
  --shadow-opacity: 0.06;
  --shadow-color: hsl(0 0% 0%);
  --shadow-2xs: 1px 2px 5px 1px hsl(0 0% 0% / 0.03);
  --shadow-xs: 1px 2px 5px 1px hsl(0 0% 0% / 0.03);
  --shadow-sm:
    1px 2px 5px 1px hsl(0 0% 0% / 0.06), 1px 1px 2px 0px hsl(0 0% 0% / 0.06);
  --shadow:
    1px 2px 5px 1px hsl(0 0% 0% / 0.06), 1px 1px 2px 0px hsl(0 0% 0% / 0.06);
  --shadow-md:
    1px 2px 5px 1px hsl(0 0% 0% / 0.06), 1px 2px 4px 0px hsl(0 0% 0% / 0.06);
  --shadow-lg:
    1px 2px 5px 1px hsl(0 0% 0% / 0.06), 1px 4px 6px 0px hsl(0 0% 0% / 0.06);
  --shadow-xl:
    1px 2px 5px 1px hsl(0 0% 0% / 0.06), 1px 8px 10px 0px hsl(0 0% 0% / 0.06);
  --shadow-2xl: 1px 2px 5px 1px hsl(0 0% 0% / 0.15);
  --tracking-normal: 0em;
  --spacing: 0.25rem;

  /* Theme-specific accent glow (for buttons, focus states) */
  --accent-glow: oklch(0.6104 0.0767 299.7335 / 0.3);
  --accent-dim: oklch(0.6104 0.0767 299.7335 / 0.1);
}

.dark,
.theme-default.dark {
  --background: oklch(0.2166 0.0215 292.8474);
  --foreground: oklch(0.9053 0.0245 293.557);
  --card: oklch(0.2544 0.0301 292.7315);
  --card-foreground: oklch(0.9053 0.0245 293.557);
  --popover: oklch(0.2544 0.0301 292.7315);
  --popover-foreground: oklch(0.9053 0.0245 293.557);
  --primary: oklch(0.7058 0.0777 302.0489);
  --primary-foreground: oklch(0.2166 0.0215 292.8474);
  --secondary: oklch(0.4604 0.0472 295.5578);
  --secondary-foreground: oklch(0.9053 0.0245 293.557);
  --muted: oklch(0.256 0.032 294.838);
  --muted-foreground: oklch(0.6974 0.0282 300.0614);
  --accent: oklch(0.3181 0.0321 308.6149);
  --accent-foreground: oklch(0.8391 0.0692 2.6681);
  --destructive: oklch(0.6875 0.142 21.4566);
  --destructive-foreground: oklch(0.2166 0.0215 292.8474);
  --border: oklch(0.3063 0.0359 293.3367);
  --input: oklch(0.2847 0.0346 291.2726);
  --ring: oklch(0.7058 0.0777 302.0489);
  --chart-1: oklch(0.7058 0.0777 302.0489);
  --chart-2: oklch(0.8391 0.0692 2.6681);
  --chart-3: oklch(0.7321 0.0749 169.867);
  --chart-4: oklch(0.854 0.0882 76.8292);
  --chart-5: oklch(0.7857 0.0645 258.0839);
  --sidebar: oklch(0.1985 0.02 293.6639);
  --sidebar-foreground: oklch(0.9053 0.0245 293.557);
  --sidebar-primary: oklch(0.7058 0.0777 302.0489);
  --sidebar-primary-foreground: oklch(0.2166 0.0215 292.8474);
  --sidebar-accent: oklch(0.3181 0.0321 308.6149);
  --sidebar-accent-foreground: oklch(0.8391 0.0692 2.6681);
  --sidebar-border: oklch(0.2847 0.0346 291.2726);
  --sidebar-ring: oklch(0.7058 0.0777 302.0489);
  --success: oklch(0.7321 0.0749 169.867);
  --success-foreground: oklch(0.9053 0.0245 293.557);
  --warning: oklch(0.854 0.0882 76.8292);
  --warning-foreground: oklch(0.2166 0.0215 292.8474);
  --info: oklch(0.7058 0.0777 302.0489);
  --info-foreground: oklch(0.2166 0.0215 292.8474);
  --font-sans: Geist, sans-serif;
  --font-serif: "Lora", Georgia, serif;
  --font-mono: "Fira Code", "Courier New", monospace;
  --font-display: var(--font-sans);
  --radius: 0.5rem;
  --shadow-x: 1px;
  --shadow-y: 2px;
  --shadow-blur: 5px;
  --shadow-spread: 1px;
  --shadow-opacity: 0.06;
  --shadow-color: hsl(0 0% 0%);
  --shadow-2xs: 1px 2px 5px 1px hsl(0 0% 0% / 0.03);
  --shadow-xs: 1px 2px 5px 1px hsl(0 0% 0% / 0.03);
  --shadow-sm:
    1px 2px 5px 1px hsl(0 0% 0% / 0.06), 1px 1px 2px 0px hsl(0 0% 0% / 0.06);
  --shadow:
    1px 2px 5px 1px hsl(0 0% 0% / 0.06), 1px 1px 2px 0px hsl(0 0% 0% / 0.06);
  --shadow-md:
    1px 2px 5px 1px hsl(0 0% 0% / 0.06), 1px 2px 4px 0px hsl(0 0% 0% / 0.06);
  --shadow-lg:
    1px 2px 5px 1px hsl(0 0% 0% / 0.06), 1px 4px 6px 0px hsl(0 0% 0% / 0.06);
  --shadow-xl:
    1px 2px 5px 1px hsl(0 0% 0% / 0.06), 1px 8px 10px 0px hsl(0 0% 0% / 0.06);
  --shadow-2xl: 1px 2px 5px 1px hsl(0 0% 0% / 0.15);

  /* Theme-specific accent glow (for buttons, focus states) */
  --accent-glow: oklch(0.7058 0.0777 302.0489 / 0.3);
  --accent-dim: oklch(0.7058 0.0777 302.0489 / 0.1);
}

/* ============================================
   SYNC OR SWIM THEME
   Dark mode only - techy SaaS aesthetic
   Neon green accent, monospace-heavy
   ============================================ */

.theme-sync-or-swim,
.theme-sync-or-swim.dark {
  /* Core backgrounds - deep dark with slight blue undertone */
  --background: oklch(0.13 0.01 270);
  --foreground: oklch(0.98 0 0);

  /* Card/Surface colors - elevated surfaces */
  --card: oklch(0.16 0.01 270);
  --card-foreground: oklch(0.98 0 0);
  --popover: oklch(0.18 0.012 270);
  --popover-foreground: oklch(0.98 0 0);

  /* Primary - Neon green (the signature color) */
  --primary: oklch(0.85 0.2 155);
  --primary-foreground: oklch(0.13 0.01 270);

  /* Secondary - Subtle dark surface */
  --secondary: oklch(0.22 0.01 270);
  --secondary-foreground: oklch(0.85 0.02 270);

  /* Muted - For disabled/subtle elements */
  --muted: oklch(0.18 0.01 270);
  --muted-foreground: oklch(0.6 0.01 270);

  /* Accent - Same as primary for this theme */
  --accent: oklch(0.25 0.02 155);
  --accent-foreground: oklch(0.85 0.2 155);

  /* Destructive - Red-pink */
  --destructive: oklch(0.65 0.22 10);
  --destructive-foreground: oklch(0.98 0 0);

  /* Borders and inputs */
  --border: oklch(0.28 0.015 270);
  --input: oklch(0.2 0.01 270);
  --ring: oklch(0.85 0.2 155);

  /* Charts - vibrant colors that pop on dark */
  --chart-1: oklch(0.85 0.2 155);
  --chart-2: oklch(0.75 0.15 220);
  --chart-3: oklch(0.65 0.22 10);
  --chart-4: oklch(0.8 0.15 75);
  --chart-5: oklch(0.7 0.18 300);

  /* Sidebar - slightly darker than main bg */
  --sidebar: oklch(0.11 0.01 270);
  --sidebar-foreground: oklch(0.98 0 0);
  --sidebar-primary: oklch(0.85 0.2 155);
  --sidebar-primary-foreground: oklch(0.13 0.01 270);
  --sidebar-accent: oklch(0.22 0.02 155);
  --sidebar-accent-foreground: oklch(0.85 0.2 155);
  --sidebar-border: oklch(0.25 0.015 270);
  --sidebar-ring: oklch(0.85 0.2 155);

  /* Semantic colors */
  --success: oklch(0.85 0.2 155);
  --success-foreground: oklch(0.13 0.01 270);
  --warning: oklch(0.8 0.15 75);
  --warning-foreground: oklch(0.13 0.01 270);
  --info: oklch(0.75 0.15 220);
  --info-foreground: oklch(0.13 0.01 270);

  /* Typography - techy fonts */
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "IBM Plex Sans", Georgia, serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;

  /* Slightly larger radius for modern feel */
  --radius: 0.5rem;

  /* Deeper shadows for dark theme */
  --shadow-2xs: 0 1px 2px 0 oklch(0 0 0 / 0.3);
  --shadow-xs: 0 1px 3px 0 oklch(0 0 0 / 0.4);
  --shadow-sm: 0 2px 4px 0 oklch(0 0 0 / 0.4);
  --shadow: 0 4px 6px -1px oklch(0 0 0 / 0.4);
  --shadow-md: 0 6px 10px -2px oklch(0 0 0 / 0.5);
  --shadow-lg: 0 10px 15px -3px oklch(0 0 0 / 0.5);
  --shadow-xl: 0 20px 25px -5px oklch(0 0 0 / 0.5);
  --shadow-2xl: 0 25px 50px -12px oklch(0 0 0 / 0.6);

  /* Glow effects - signature neon glow */
  --accent-glow: oklch(0.85 0.2 155 / 0.3);
  --accent-dim: oklch(0.85 0.2 155 / 0.1);
}

/* Sync or Swim specific enhancements */
.theme-sync-or-swim {
  /* Opt-in glow effect for primary CTA buttons */
  /* Add .btn-glow class to buttons that should have the neon glow effect */
  & .btn-glow {
    box-shadow: 0 0 20px var(--accent-glow);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
  }

  & .btn-glow:hover {
    box-shadow: 0 0 30px var(--accent-glow), 0 0 60px var(--accent-dim);
    transform: translateY(-1px);
  }

  /* Focus rings with glow */
  & *:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--primary), 0 0 20px var(--accent-glow);
  }

  /* Links get the accent color */
  & a:not([class]) {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
  }

  & a:not([class]):hover {
    color: var(--info);
  }

  /* Code blocks get special treatment */
  & pre,
  & code {
    font-family: var(--font-mono);
  }

  /* Headers use display font */
  & h1, & h2, & h3, & h4, & h5, & h6 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
  }

  /* Monospace elements for that techy feel */
  & .mono,
  & [class*="font-mono"] {
    font-family: var(--font-mono);
    letter-spacing: -0.01em;
  }
}

@theme inline {
  --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);
  --color-sidebar-ring: var(--sidebar-ring);
  --color-success: var(--success);
  --color-success-foreground: var(--success-foreground);
  --color-warning: var(--warning);
  --color-warning-foreground: var(--warning-foreground);
  --color-info: var(--info);
  --color-info-foreground: var(--info-foreground);

  /* Glow effects for themes */
  --color-accent-glow: var(--accent-glow);
  --color-accent-dim: var(--accent-dim);

  --font-sans: var(--font-sans);
  --font-mono: var(--font-mono);
  --font-serif: var(--font-serif);
  --font-display: var(--font-display);

  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);

  --shadow-2xs: var(--shadow-2xs);
  --shadow-xs: var(--shadow-xs);
  --shadow-sm: var(--shadow-sm);
  --shadow: var(--shadow);
  --shadow-md: var(--shadow-md);
  --shadow-lg: var(--shadow-lg);
  --shadow-xl: var(--shadow-xl);
  --shadow-2xl: var(--shadow-2xl);
}
