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

@plugin 'tailwind-scrollbar' {
  nocompatible: true;
  preferredStrategy: "pseudoelements";
}

@plugin "@tailwindcss/forms";
@plugin '@tailwindcss/typography';

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

@custom-variant search-cancel (&::-webkit-search-cancel-button);

/*
STRIPED BACKGROUND EXAMPLE:
<div className="border border-[var(--pattern-fg)] 
bg-[repeating-linear-gradient(45deg,_var(--pattern-fg)_0,_var(--pattern-fg)_1px,_transparent_0,_transparent_50%)] 
bg-[size:10px_10px] bg-fixed 
[--pattern-fg:#696969] dark:[--pattern-fg:#e1e1e1]" />				
*/

@theme inline {
  --font-sans: var(--font-inter);
  --font-mono: var(--font-roboto-mono);

  --breakpoint-navqry: 56.25rem;
  --breakpoint-xxs: 20rem;
  --breakpoint-xs: 30rem;
  --breakpoint-3xl: 120rem;
  --breakpoint-4xl: 160rem;
  --breakpoint-5xl: 192rem;
  --container-8xl: 88rem;
  --container-9xl: 96rem;
  --container-10xl: 104rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --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-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-transitorio: var(--transitorio);
  --color-stabile: var(--stabile);
  --color-consulenza: var(--consulenza);
  --color-dasubito: var(--dasubito);
  --color-evidenza: var(--evidenza);
  --color-trattativa: var(--trattativa);
  --color-info: var(--info);
  --color-success: var(--success);

  --color-fxd-foreground: var(--fxd-foreground);
  --color-fxd-secondary: var(--fxd-secondary);

  --accordion-down: accordion-down 0.2s ease-out;
  --accordion-up: accordion-up 0.2s ease-out;
  --caret-blink: caret-blink 1.25s ease-out infinite;
 

  @keyframes accordion-down {
    0% {
      height: 0;
    }

    100% {
      height: var(--radix-accordion-content-height);
    }
  }

  @keyframes accordion-up {
    0% {
      height: var(--radix-accordion-content-height);
    }

    100% {
      height: 0;
    }
  }

  @keyframes collapsible-down {
    0% {
      height: 0;
    }

    100% {
      height: var(--radix-collapsible-content-height);
    }
  }

  @keyframes collapsible-up {
    0% {
      height: var(--radix-collapsible-content-height);
    }

    100% {
      height: 0;
    }
  }

  --animate-accordion-down: accordion-down 0.3s ease-out;
  --animate-accordion-up: accordion-up 0.3s ease-out;
  --animate-collapsible-down: collapsible-down 0.3s ease-out;
  --animate-collapsible-up: collapsible-up 0.3s ease-in;

  @keyframes caret-blink {

    0%,
    70%,
    100%: {
      opacity: 1;
    }

    20%,
    50%: {
      opacity: 0;
    }
  }

  

  --animate-expand: expand 0.3s ease-out forwards;
  @keyframes expand {
    0% {
      width: 0%;
      /*opacity: 0;*/
    }

    100% {
      width: 100%;
      /*opacity: 1;*/
    }
  }
}

:root {
  --background: oklch(0.98 0 0);
  --foreground: oklch(0.24 0 0);
  --card: oklch(0.99 0 0);
  --card-foreground: oklch(0.24 0 0);
  --popover: oklch(0.99 0 0);
  --popover-foreground: oklch(0.24 0 0);
  --primary: oklch(0.43 0.04 42.00);
  --primary-foreground: oklch(1.00 0 0);
  --secondary: oklch(0.92 0.07 76.67);
  --secondary-foreground: oklch(0.35 0.07 41.41);
  --muted: oklch(0.95 0 0);
  --muted-foreground: oklch(0.50 0 0);
  --accent: oklch(0.93 0 0);
  --accent-foreground: oklch(0.24 0 0);
  --destructive: oklch(61.229% 0.20547 28.742);
  --border: oklch(0.88 0 0);
  --input: oklch(0.88 0 0);
  --ring: oklch(0.43 0.04 42.00);
  --chart-1: oklch(0.43 0.04 42.00);
  --chart-2: oklch(0.92 0.07 76.67);
  --chart-3: oklch(0.93 0 0);
  --chart-4: oklch(0.94 0.05 75.02);
  --chart-5: oklch(0.43 0.04 42.00);
  --sidebar: oklch(0.99 0 0);
  --sidebar-foreground: oklch(0.26 0 0);
  --sidebar-primary: oklch(0.33 0 0);
  --sidebar-primary-foreground: oklch(0.99 0 0);
  --sidebar-accent: oklch(0.98 0 0);
  --sidebar-accent-foreground: oklch(0.33 0 0);
  --sidebar-border: oklch(0.94 0 0);
  --sidebar-ring: oklch(0.77 0 0);

  --stabile: oklch(0.63 0.19 33.26);
  --transitorio: oklch(59.784% 0.09034 248.137);
  --consulenza: oklch(56.144% 0.13916 147.417);
  --dasubito: oklch(60.733% 0.12323 151.794);
  --evidenza: oklch(89.076% 0.1829 96.164);
  --trattativa: oklch(54.164% 0.19878 27.041);

  --info: oklch(62.956% 0.12519 239.161);
  --success: oklch(62.7% 0.194 149.214);
  --fxd-foreground: oklch(0.24 0 0);
  --fxd-secondary: oklch(0.92 0.07 76.67);

  --radius: 0.5rem;
  
  --shadow-2xs: 0 1px 3px 0px oklch(0.00 0 0 / 0.05);
  --shadow-xs: 0 1px 3px 0px oklch(0.00 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0px oklch(0.00 0 0 / 0.10), 0 1px 2px -1px oklch(0.00 0 0 / 0.10);
  --shadow: 0 1px 3px 0px oklch(0.00 0 0 / 0.10), 0 1px 2px -1px oklch(0.00 0 0 / 0.10);
  --shadow-md: 0 1px 3px 0px oklch(0.00 0 0 / 0.10), 0 2px 4px -1px oklch(0.00 0 0 / 0.10);
  --shadow-lg: 0 1px 3px 0px oklch(0.00 0 0 / 0.10), 0 4px 6px -1px oklch(0.00 0 0 / 0.10);
  --shadow-xl: 0 1px 3px 0px oklch(0.00 0 0 / 0.10), 0 8px 10px -1px oklch(0.00 0 0 / 0.10);
  --shadow-2xl: 0 1px 3px 0px oklch(0.00 0 0 / 0.25);
  
}

.dark {
  --background: oklch(0.23 0 0);
  --foreground: oklch(0.95 0 0);
  --card: oklch(0.21 0 0);
  --card-foreground: oklch(0.95 0 0);
  --popover: oklch(0.21 0 0);
  --popover-foreground: oklch(0.95 0 0);
  --primary: oklch(0.92 0.05 67.14);
  --primary-foreground: oklch(0.20 0.02 201.14);
  --secondary: oklch(0.32 0.02 67.00);
  --secondary-foreground: oklch(0.92 0.05 67.14);
  --muted: oklch(0.25 0 0);
  --muted-foreground: oklch(0.77 0 0);
  --accent: oklch(0.29 0 0);
  --accent-foreground: oklch(0.95 0 0);
  --destructive: oklch(61.197% 0.22381 29.492);
  --border: oklch(0.24 0.01 88.77);
  --input: oklch(0.40 0 0);
  --ring: oklch(0.92 0.05 67.14);
  --chart-1: oklch(0.92 0.05 67.14);
  --chart-2: oklch(0.32 0.02 67.00);
  --chart-3: oklch(0.29 0 0);
  --chart-4: oklch(0.35 0.02 67.11);
  --chart-5: oklch(0.92 0.05 67.14);
  --sidebar: oklch(0.21 0.01 285.56);
  --sidebar-foreground: oklch(0.97 0 0);
  --sidebar-primary: oklch(0.49 0.22 264.43);
  --sidebar-primary-foreground: oklch(1.00 0 0);
  --sidebar-accent: oklch(0.27 0.01 285.81);
  --sidebar-accent-foreground: oklch(0.97 0 0);
  --sidebar-border: oklch(0.27 0.01 285.81);
  --sidebar-ring: oklch(0.87 0.01 286.27);

  --info: oklch(50.208% 0.11698 241.771);
  --success: oklch(0.46 0.12 142.21);
  --fxd-foreground: oklch(0.24 0 0);
  --fxd-secondary: oklch(0.92 0.07 76.67);
  
  --shadow-2xs: 0 1px 3px 0px oklch(0.00 0 0 / 0.05);
  --shadow-xs: 0 1px 3px 0px oklch(0.00 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0px oklch(0.00 0 0 / 0.10), 0 1px 2px -1px oklch(0.00 0 0 / 0.10);
  --shadow: 0 1px 3px 0px oklch(0.00 0 0 / 0.10), 0 1px 2px -1px oklch(0.00 0 0 / 0.10);
  --shadow-md: 0 1px 3px 0px oklch(0.00 0 0 / 0.10), 0 2px 4px -1px oklch(0.00 0 0 / 0.10);
  --shadow-lg: 0 1px 3px 0px oklch(0.00 0 0 / 0.10), 0 4px 6px -1px oklch(0.00 0 0 / 0.10);
  --shadow-xl: 0 1px 3px 0px oklch(0.00 0 0 / 0.10), 0 8px 10px -1px oklch(0.00 0 0 / 0.10);
  --shadow-2xl: 0 1px 3px 0px oklch(0.00 0 0 / 0.25);
}



@layer base {
  html {
    @apply scrollbar-none;
    /*@apply scroll-smooth;*/
  }

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

  body {
    @apply bg-background text-foreground;
    font-feature-settings:
      "rlig" 1,
      "calt" 1;
    font-synthesis-weight: none;
    text-rendering: optimizeLegibility;
  }

  .leaflet-pane {
    @apply z-0!;
  }

  .leaflet-bottom {
    @apply z-0!;
  }

  .leaflet-control {
    @apply z-0!;
  }

  .leaflet-top {
    @apply z-0!;
  }

  /* .leaflet-control-attribution {
    @apply !sr-only;
  } */

  [data-vaul-drawer][data-vaul-drawer-direction="bottom"] {
    @apply max-h-[90vh]!;
  }
}

@utility dropdown-override {
  @apply rounded-md! p-2! shadow-xs!;
}

@utility step {
  counter-increment: step;

  &::before {
    @apply border-background bg-muted absolute inline-flex size-9 items-center justify-center rounded-full border-4 text-center -indent-px font-mono text-base font-medium;
    @apply -mt-1 -ml-12.5;
    content: counter(step);
  }
}

@utility scrollbar-default {
  @apply scrollbar-thin scrollbar-track-primary-foreground scrollbar-thumb-primary  scrollbar-track-rounded-full scrollbar-thumb-rounded-full;
}

@utility ph-input-fix {
  @apply py-2! hover:border-muted-foreground focus:border-foreground focus:ring-foreground focus-visible:ring-1
}

@utility no-spinner {
  -moz-appearance: textfield;
  appearance: textfield;

  &::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
  }

  &::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
  }
}

@media print {
  @page {
    margin: 0.5cm;
  }

  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}