/*
  This package intentionally does NOT ship a Tailwind utilities bundle.
  The consuming app should generate utilities by scanning this package’s
  compiled JS output.

  Scope: design tokens + base layer + scrollbar utilities only.
  Component-level overrides (e.g. legacy PrimeReact `p-*`, Quill `ql-*`)
  and hand-rolled animation classes have been removed — animation
  utilities come from `tw-animate-css`. Re-add specifics on demand.
*/

@source "./src/**/*.{js,ts,jsx,tsx}";
@source "./dist/**/*.js";

@import "tw-animate-css";
@import "react-day-picker/style.css";

/* ---------------------------------------------------------------- */
/* Base element defaults                                            */
/* ---------------------------------------------------------------- */

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
    [type="file"]
  ),
textarea,
select,
[data-slot="input"],
[data-slot="textarea"],
[role="combobox"][aria-expanded] {
  border-radius: 4px;
}

html,
body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  font-family:
    var(--font-inter),
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    "Oxygen",
    "Ubuntu",
    "Cantarell",
    "Fira Sans",
    "Droid Sans",
    "Helvetica Neue",
    sans-serif;
}

/* ---------------------------------------------------------------- */
/* Design tokens                                                   */
/* ---------------------------------------------------------------- */

@theme {
  --font-inter: "Inter";

  /* Highlight colors */
  --color-highlight-100: hsl(265 96% 65%);
  --color-highlight-30: hsl(265 96% 90%);
  --color-highlight-10: hsl(265 100% 97%);

  /* Neutral colors */
  --color-neutral-grey-100: hsl(0 0% 7%);
  --color-neutral-grey-50: hsl(0 0% 54%);
  --color-neutral-grey-15: hsl(0 0% 86%);
  --color-neutral-grey-10: hsl(0 0% 91%);
  --color-neutral-grey-5: hsl(0 0% 96%);
  --color-white: hsl(0 0% 100%);
  --color-border-default: var(--color-neutral-grey-10);

  /* Feedback colors */
  --color-feedback-green: hsl(157 66% 37%);
  --color-feedback-green-light: hsl(154 70% 92%);
  --color-feedback-orange: hsl(41 100% 29%);
  --color-feedback-orange-light: hsl(41 100% 89%);
  --color-feedback-blue: hsl(225 62.6% 37%);
  --color-feedback-blue-light: hsl(226 61% 92%);
  --color-feedback-red: hsl(9 58% 41%);
  --color-feedback-red-light: hsl(6 74% 92%);
  /* More saturated red for destructive (delete) actions and critical tasks */
  --color-feedback-red-strong: hsl(6 76% 45%);
  --color-feedback-grey: hsl(0 0% 28%);
  --color-feedback-grey-light: hsl(0 0% 96%);

  /* Component colors */
  --color-component-default: hsl(206 97.3% 55.7%);
  --color-component-default-drop-zone: hsl(207 97.8% 82.4%);
  --color-component-shared: hsl(27 96% 61%);
  --color-component-shared-drop-zone: hsl(27 95% 84.3%);
  --color-component-layout: hsl(270 95.2% 75.3%);
  --color-component-layout-drop-zone: hsl(270 96% 90.2%);
  --color-component-readonly: hsl(218 10.6% 64.9%);
  --color-component-readonly-drop-zone: hsl(218 11.1% 85.9%);
  --color-component-nonmovable: hsl(0 90.6% 70.8%);
  --color-component-nonmovable-drop-zone: hsl(0 90% 88.2%);
  --color-component-suggestions: hsl(172 66% 50.4%);
  --color-component-suggestions-drop-zone: hsl(172 66.3% 80.2%);

  /* Badge sizing */
  --radius-badge: 4px;
  --badge-padding-y: 4px;
  --badge-padding-x: 8px;
  --badge-padding-sm-y: 2px;
  --badge-padding-sm-x: 4px;

  /* Type scale — text-2xs is the canonical 11px badge/small label size */
  --text-2xs: 11px;
  --text-3xs: 0.6rem;

  /* Animations (only those referenced in source; accordion/fade/zoom/slide
     utilities come from tw-animate-css) */
  --animate-fadeIn: "fadeIn 0.5s ease-in-out";
  --animate-fadeLeft: "fadeLeft 0.8s ease-in-out";
  --animate-fadeRight: "fadeRight 0.8s ease-in-out";

  @keyframes fadeIn {
    "0%": {
      opacity: 0;
    }
    "100%": {
      opacity: 1;
    }
  }
  @keyframes fadeLeft {
    "0%": {
      transform: translateX(-50%);
      opacity: 0;
    }
    "100%": {
      transform: translateX(0);
      opacity: 1;
    }
  }
  @keyframes fadeRight {
    "0%": {
      transform: translateX(50%);
      opacity: 0;
    }
    "100%": {
      transform: translateX(0);
      opacity: 1;
    }
  }
}

@utility badge-pad {
  padding-block: var(--badge-padding-y);
  padding-inline: var(--badge-padding-x);
}

@utility badge-pad-sm {
  padding-block: var(--badge-padding-sm-y);
  padding-inline: var(--badge-padding-sm-x);
}

/* ---------------------------------------------------------------- */
/* Theme variables (shadcn)                                        */
/* ---------------------------------------------------------------- */

:root {
  --background: var(--color-white);
  --foreground: var(--color-neutral-grey-100);
  --card: var(--color-white);
  --card-foreground: var(--color-neutral-grey-100);
  --popover: var(--color-white);
  --popover-foreground: var(--color-neutral-grey-100);
  --primary: var(--color-highlight-100);
  --primary-foreground: var(--color-white);
  --secondary: var(--color-neutral-grey-5);
  --secondary-foreground: var(--color-neutral-grey-100);
  --muted: var(--color-neutral-grey-5);
  --muted-foreground: var(--color-neutral-grey-50);
  --accent: var(--color-neutral-grey-5);
  --accent-foreground: var(--color-neutral-grey-100);
  --destructive: var(--color-feedback-red-strong);
  --destructive-foreground: var(--color-white);
  --border: var(--color-border-default);
  --input: var(--color-border-default);
  --ring: var(--color-neutral-grey-50);
  --chart-1: var(--color-component-default);
  --chart-2: var(--color-component-suggestions);
  --chart-3: var(--color-component-shared);
  --chart-4: var(--color-feedback-green);
  --chart-5: var(--color-feedback-orange);
  --radius: 0.625rem;
  --sidebar: var(--color-white);
  --sidebar-foreground: var(--color-neutral-grey-100);
  --sidebar-primary: var(--color-highlight-100);
  --sidebar-primary-foreground: var(--color-white);
  --sidebar-accent: var(--color-neutral-grey-5);
  --sidebar-accent-foreground: var(--color-neutral-grey-100);
  --sidebar-border: var(--color-border-default);
  --sidebar-ring: var(--color-neutral-grey-50);
}

.dark {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.145 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.145 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.985 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.396 0.141 25.723);
  --destructive-foreground: oklch(0.637 0.237 25.331);
  --border: oklch(0.269 0 0);
  --input: oklch(0.269 0 0);
  --ring: oklch(0.439 0 0);
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.205 0 0);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.269 0 0);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(0.269 0 0);
  --sidebar-ring: oklch(0.439 0 0);
}

@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);
}

/* ---------------------------------------------------------------- */
/* Utilities & base layer                                          */
/* ---------------------------------------------------------------- */

@layer utilities {
  /* Hide scrollbars while keeping scroll functionality */
  .scrollbar-hide {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
  }
  .scrollbar-hide::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground;
  }
  button {
    cursor: pointer;
  }
}
