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

@config '../../../tailwind.config.mjs';

@custom-variant dark (&:is([data-theme='dark'] *));
@custom-variant sm (@media (width >= theme(--breakpoint-sm)));
@custom-variant md (@media (width >= theme(--breakpoint-md)));
@custom-variant lg (@media (width >= theme(--breakpoint-lg)));
@custom-variant xl (@media (width >= theme(--breakpoint-xl)));
@custom-variant 2xl (@media (width >= theme(--breakpoint-2xl)));

@layer base {
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-weight: unset;
    font-size: unset;
  }
}

@plugin "@tailwindcss/typography";

@source inline("lg:col-span-4");
@source inline("lg:col-span-6");
@source inline("lg:col-span-8");
@source inline("lg:col-span-12");
@source inline("border-border");
@source inline("bg-card");
@source inline("border-error");
@source inline("bg-error/30");
@source inline("border-success");
@source inline("bg-success/30");
@source inline("border-warning");
@source inline("bg-warning/30");

@theme {
  --breakpoint-sm: 40rem;
  --breakpoint-md: 48rem;
  --breakpoint-lg: 64rem;
  --breakpoint-xl: 80rem;
  --breakpoint-2xl: 86rem;
  --font-mono: var(--font-geist-mono);
  --font-sans: var(--font-sans);
  --font-serif: var(--font-serif);
}

@layer utilities {
  .container {
    width: 100%;
    margin-inline: auto;
    padding-inline: 1rem;
  }

  @variant sm {
    .container {
      max-width: var(--breakpoint-sm);
    }
  }

  @variant md {
    .container {
      max-width: var(--breakpoint-md);
      padding-inline: 2rem;
    }
  }

  @variant lg {
    .container {
      max-width: var(--breakpoint-lg);
    }
  }

  @variant xl {
    .container {
      max-width: var(--breakpoint-xl);
    }
  }

  @variant 2xl {
    .container {
      max-width: var(--breakpoint-2xl);
    }
  }
}

:root {
  --bmj-mobile-nav-offset: 0px;
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "DM Serif Display", Georgia, Cambria, "Times New Roman", Times, serif;
  --background: oklch(98.11% 0.0024 152.02deg);
  --foreground: oklch(14.88% 0.0035 152.0deg);
  --card: oklch(94.11% 0.0020 152.00deg);
  --card-foreground: oklch(14.88% 0.0035 152.0deg);
  --popover: oklch(98.11% 0.0024 152.02deg);
  --popover-foreground: oklch(14.88% 0.0035 152.0deg);
  --primary: oklch(25.96% 0.0518 153.22deg);
  --primary-foreground: oklch(98.11% 0.0024 152.02deg);
  --secondary: oklch(36.19% 0.0526 153.84deg);
  --secondary-foreground: oklch(98.11% 0.0024 152.02deg);
  --muted: oklch(96.11% 0.0022 152.01deg);
  --muted-foreground: oklch(33.87% 0.0088 152.6deg);
  --accent: oklch(89.7% 0.0567 154.2deg);
  --accent-foreground: oklch(25.96% 0.0518 153.22deg);
  --destructive: oklch(44.41% 0.2031 24.62deg);
  --destructive-foreground: oklch(98.11% 0.0024 152.02deg);
  --border: oklch(53.23% 0.0084 152.5deg);
  --input: oklch(53.23% 0.0084 152.5deg);
  --ring: oklch(36.19% 0.0526 153.84deg);
  --chart-1: oklch(64.6% 0.222 41.116deg);
  --chart-2: oklch(60% 0.118 184.704deg);
  --chart-3: oklch(39.8% 0.07 227.392deg);
  --chart-4: oklch(82.8% 0.189 84.429deg);
  --chart-5: oklch(76.9% 0.188 70.08deg);
  --radius: 1rem;
  --sidebar: oklch(98.11% 0.0024 152.02deg);
  --sidebar-foreground: oklch(14.88% 0.0035 152.0deg);
  --sidebar-primary: oklch(25.96% 0.0518 153.22deg);
  --sidebar-primary-foreground: oklch(98.11% 0.0024 152.02deg);
  --sidebar-accent: oklch(96.11% 0.0022 152.01deg);
  --sidebar-accent-foreground: oklch(25.96% 0.0518 153.22deg);
  --sidebar-border: oklch(53.23% 0.0084 152.5deg);
  --sidebar-ring: oklch(36.19% 0.0526 153.84deg);
  --success: oklch(78% 0.08 200deg);
  --warning: oklch(89% 0.1 75deg);
  --error: oklch(75% 0.15 25deg);
}

@media (width < 48rem) {
  :root {
    --bmj-mobile-nav-offset: calc(4rem + env(safe-area-inset-bottom));
  }
}

[data-theme='dark'] {
  --background: oklch(12% 0.015 152deg);
  --foreground: oklch(95% 0.005 152deg);
  --card: oklch(16% 0.015 152deg);
  --card-foreground: oklch(95% 0.005 152deg);
  --popover: oklch(12% 0.015 152deg);
  --popover-foreground: oklch(95% 0.005 152deg);
  --primary: oklch(89.7% 0.0567 154.2deg);
  --primary-foreground: oklch(12% 0.015 152deg);
  --secondary: oklch(30% 0.04 152deg);
  --secondary-foreground: oklch(95% 0.005 152deg);
  --muted: oklch(18% 0.015 152deg);
  --muted-foreground: oklch(70% 0.01 152deg);
  --accent: oklch(36.19% 0.0526 153.84deg);
  --accent-foreground: oklch(95% 0.005 152deg);
  --destructive: oklch(39.6% 0.141 25.723deg);
  --destructive-foreground: oklch(63.7% 0.237 25.331deg);
  --border: oklch(24% 0.015 152deg);
  --input: oklch(24% 0.015 152deg);
  --ring: oklch(89.7% 0.0567 154.2deg);
  --sidebar: oklch(16% 0.015 152deg);
  --sidebar-foreground: oklch(95% 0.005 152deg);
  --sidebar-primary: oklch(89.7% 0.0567 154.2deg);
  --sidebar-primary-foreground: oklch(12% 0.015 152deg);
  --sidebar-accent: oklch(24% 0.015 152deg);
  --sidebar-accent-foreground: oklch(95% 0.005 152deg);
  --sidebar-border: oklch(24% 0.015 152deg);
  --sidebar-ring: oklch(89.7% 0.0567 154.2deg);
  --success: oklch(28% 0.1 200deg);
  --warning: oklch(35% 0.08 70deg);
  --error: oklch(45% 0.1 25deg);
}

@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);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --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-warning: var(--warning);
  --color-error: var(--error);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground min-h-[100vh] flex flex-col;
  }
}

html {
  opacity: 0;
}

html[data-theme='dark'],
html[data-theme='light'] {
  opacity: initial;
}

a,
input,
button {
  @apply focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-neutral-400 focus-visible:ring-offset-2 focus-visible:ring-offset-neutral-50 dark:focus-visible:ring-neutral-600 dark:focus-visible:ring-offset-neutral-900;
}
