
@tailwind base;
@tailwind components;
@tailwind utilities;


/* LIGHT MODE */
:root {
  --button-outline: rgba(0,0,0, .10);
  --badge-outline: rgba(0,0,0, .05);

  /* Automatic computation of border around primary / danger buttons */
  --opaque-button-border-intensity: -8; /* In terms of percentages */

  /* Backgrounds applied on top of other backgrounds when hovered/active */
  --elevate-1: rgba(0,0,0, .03);
  --elevate-2: rgba(0,0,0, .08);

  --background: 45 40% 98%;

  --foreground: 210 20% 12%;

  --border: 45 15% 87%;

  --card: 45 28% 95%;

  --card-foreground: 210 20% 12%;

  --card-border: 45 20% 90%;

  --sidebar: 45 25% 94%;

  --sidebar-foreground: 210 20% 12%;

  --sidebar-border: 45 20% 88%;

  --sidebar-primary: 140 25% 60%;

  --sidebar-primary-foreground: 140 25% 15%;

  --sidebar-accent: 260 20% 85%;

  --sidebar-accent-foreground: 260 22% 20%;

  --sidebar-ring: 140 25% 60%;

  --popover: 45 25% 92%;

  --popover-foreground: 210 20% 12%;

  --popover-border: 45 20% 86%;

  --primary: 140 25% 35%;

  --primary-foreground: 140 15% 95%;

  --secondary: 45 18% 86%;

  --secondary-foreground: 210 20% 12%;

  --muted: 45 12% 88%;

  --muted-foreground: 210 12% 35%;

  --accent: 260 15% 88%;

  --accent-foreground: 260 22% 20%;

  --destructive: 0 65% 55%;

  --destructive-foreground: 0 20% 95%;

  --input: 45 20% 82%;
  --ring: 140 25% 60%;
  --chart-1: 140 30% 40%;
  --chart-2: 180 35% 45%;
  --chart-3: 260 25% 50%;
  --chart-4: 35 50% 55%;
  --chart-5: 200 30% 45%;

  --font-sans: Inter, sans-serif;
  --font-serif: Merriweather, serif;
  --font-mono: Menlo, monospace;
  --radius: .5rem; /* 8px */
  --shadow-2xs: 0px 1px 2px 0px hsl(210 15% 20% / 0.03);
  --shadow-xs: 0px 1px 2px 0px hsl(210 15% 20% / 0.05);
  --shadow-sm: 0px 1px 3px 0px hsl(210 15% 20% / 0.08), 0px 1px 2px -1px hsl(210 15% 20% / 0.08);
  --shadow: 0px 1px 3px 0px hsl(210 15% 20% / 0.10), 0px 1px 2px -1px hsl(210 15% 20% / 0.10);
  --shadow-md: 0px 4px 6px -1px hsl(210 15% 20% / 0.10), 0px 2px 4px -2px hsl(210 15% 20% / 0.10);
  --shadow-lg: 0px 10px 15px -3px hsl(210 15% 20% / 0.10), 0px 4px 6px -4px hsl(210 15% 20% / 0.10);
  --shadow-xl: 0px 20px 25px -5px hsl(210 15% 20% / 0.10), 0px 8px 10px -6px hsl(210 15% 20% / 0.10);
  --shadow-2xl: 0px 25px 50px -12px hsl(210 15% 20% / 0.25);
  --tracking-normal: 0em;
  --spacing: 0.25rem;

  /* Automatically computed borders - intensity can be controlled by the user by the --opaque-button-border-intensity setting */

  /* Fallback for older browsers */
  --sidebar-primary-border: hsl(var(--sidebar-primary));
  --sidebar-primary-border: hsl(from hsl(var(--sidebar-primary)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);

  /* Fallback for older browsers */
  --sidebar-accent-border: hsl(var(--sidebar-accent));
  --sidebar-accent-border: hsl(from hsl(var(--sidebar-accent)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);

  /* Fallback for older browsers */
  --primary-border: hsl(var(--primary));
  --primary-border: hsl(from hsl(var(--primary)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);

  /* Fallback for older browsers */
  --secondary-border: hsl(var(--secondary));
  --secondary-border: hsl(from hsl(var(--secondary)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);

  /* Fallback for older browsers */
  --muted-border: hsl(var(--muted));
  --muted-border: hsl(from hsl(var(--muted)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);

  /* Fallback for older browsers */
  --accent-border: hsl(var(--accent));
  --accent-border: hsl(from hsl(var(--accent)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);

  /* Fallback for older browsers */
  --destructive-border: hsl(var(--destructive));
  --destructive-border: hsl(from hsl(var(--destructive)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);
}

.dark {
  --button-outline: rgba(255,255,255, .10);
  --badge-outline: rgba(255,255,255, .05);

  --opaque-button-border-intensity: 9;  /* In terms of percentages */

  /* Backgrounds applied on top of other backgrounds when hovered/active */
  --elevate-1: rgba(255,255,255, .04);
  --elevate-2: rgba(255,255,255, .09);

  --background: 210 15% 8%;

  --foreground: 210 10% 90%;

  --border: 210 15% 18%;

  --card: 210 12% 11%;

  --card-foreground: 210 10% 90%;

  --card-border: 210 15% 20%;

  --sidebar: 210 10% 14%;

  --sidebar-foreground: 210 10% 90%;

  --sidebar-border: 210 15% 22%;

  --sidebar-primary: 140 25% 60%;

  --sidebar-primary-foreground: 140 15% 15%;

  --sidebar-accent: 260 15% 18%;

  --sidebar-accent-foreground: 260 20% 85%;

  --sidebar-ring: 140 25% 60%;

  --popover: 210 10% 16%;

  --popover-foreground: 210 10% 90%;

  --popover-border: 210 15% 24%;

  --primary: 140 25% 35%;

  --primary-foreground: 140 15% 95%;

  --secondary: 210 8% 20%;

  --secondary-foreground: 210 10% 90%;

  --muted: 210 8% 18%;

  --muted-foreground: 210 10% 70%;

  --accent: 260 10% 20%;

  --accent-foreground: 260 20% 85%;

  --destructive: 0 65% 55%;

  --destructive-foreground: 0 20% 95%;

  --input: 210 15% 25%;
  --ring: 140 25% 60%;
  --chart-1: 140 35% 70%;
  --chart-2: 180 40% 65%;
  --chart-3: 260 30% 75%;
  --chart-4: 35 60% 70%;
  --chart-5: 200 35% 70%;

  --shadow-2xs: 0px 1px 2px 0px hsl(0 0% 0% / 0.10);
  --shadow-xs: 0px 1px 2px 0px hsl(0 0% 0% / 0.15);
  --shadow-sm: 0px 1px 3px 0px hsl(0 0% 0% / 0.20), 0px 1px 2px -1px hsl(0 0% 0% / 0.20);
  --shadow: 0px 1px 3px 0px hsl(0 0% 0% / 0.25), 0px 1px 2px -1px hsl(0 0% 0% / 0.25);
  --shadow-md: 0px 4px 6px -1px hsl(0 0% 0% / 0.25), 0px 2px 4px -2px hsl(0 0% 0% / 0.25);
  --shadow-lg: 0px 10px 15px -3px hsl(0 0% 0% / 0.25), 0px 4px 6px -4px hsl(0 0% 0% / 0.25);
  --shadow-xl: 0px 20px 25px -5px hsl(0 0% 0% / 0.25), 0px 8px 10px -6px hsl(0 0% 0% / 0.25);
  --shadow-2xl: 0px 25px 50px -12px hsl(0 0% 0% / 0.50);

}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply font-sans antialiased bg-background text-foreground;
  }
}

/**
 * Using the elevate system.
 * Automatic contrast adjustment.
 *
 * <element className="hover-elevate" />
 * <element className="active-elevate-2" />
 *
 * // Using the tailwind utility when a data attribute is "on"
 * <element className="toggle-elevate data-[state=on]:toggle-elevated" />
 * // Or manually controlling the toggle state
 * <element className="toggle-elevate toggle-elevated" />
 *
 * Elevation systems have to handle many states.
 * - not-hovered, vs. hovered vs. active  (three mutually exclusive states)
 * - toggled or not
 * - focused or not (this is not handled with these utilities)
 *
 * Even without handling focused or not, this is six possible combinations that
 * need to be distinguished from eachother visually.
 */
@layer utilities {

  /* Hide ugly search cancel button in Chrome until we can style it properly */
  input[type="search"]::-webkit-search-cancel-button {
    @apply hidden;
  }

  /* Placeholder styling for contentEditable div */
  [contenteditable][data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: hsl(var(--muted-foreground));
    pointer-events: none;
  }

  /* .no-default-hover-elevate/no-default-active-elevate is an escape hatch so consumers of
   * buttons/badges can remove the automatic brightness adjustment on interactions
   * and program their own. */
  .no-default-hover-elevate {}

  .no-default-active-elevate {}

  /**
   * Toggleable backgrounds go behind the content. Hoverable/active goes on top.
   * This way they can stack/compound. Both will overlap the parent's borders!
   * So borders will be automatically adjusted both on toggle, and hover/active,
   * and they will be compounded.
   */
  .toggle-elevate::before,
  .toggle-elevate-2::before {
    content: "";
    pointer-events: none;
    position: absolute;
    inset: 0px;
    /*border-radius: inherit;   match rounded corners */
    border-radius: inherit;
    z-index: -1;
    /* sits behind content but above backdrop */
  }

  .toggle-elevate.toggle-elevated::before {
    background-color: var(--elevate-2);
  }

  /* If there's a 1px border, adjust the inset so that it covers that parent's border */
  .border.toggle-elevate::before {
    inset: -1px;
  }

  /* Does not work on elements with overflow:hidden! */
  .hover-elevate:not(.no-default-hover-elevate),
  .active-elevate:not(.no-default-active-elevate),
  .hover-elevate-2:not(.no-default-hover-elevate),
  .active-elevate-2:not(.no-default-active-elevate) {
    position: relative;
    z-index: 0;
  }

  .hover-elevate:not(.no-default-hover-elevate)::after,
  .active-elevate:not(.no-default-active-elevate)::after,
  .hover-elevate-2:not(.no-default-hover-elevate)::after,
  .active-elevate-2:not(.no-default-active-elevate)::after {
    content: "";
    pointer-events: none;
    position: absolute;
    inset: 0px;
    /*border-radius: inherit;   match rounded corners */
    border-radius: inherit;
    z-index: 999;
    /* sits in front of content */
  }

  .hover-elevate:hover:not(.no-default-hover-elevate)::after,
  .active-elevate:active:not(.no-default-active-elevate)::after {
    background-color: var(--elevate-1);
  }

  .hover-elevate-2:hover:not(.no-default-hover-elevate)::after,
  .active-elevate-2:active:not(.no-default-active-elevate)::after {
    background-color: var(--elevate-2);
  }

  /* If there's a 1px border, adjust the inset so that it covers that parent's border */
  .border.hover-elevate:not(.no-hover-interaction-elevate)::after,
  .border.active-elevate:not(.no-active-interaction-elevate)::after,
  .border.hover-elevate-2:not(.no-hover-interaction-elevate)::after,
  .border.active-elevate-2:not(.no-active-interaction-elevate)::after,
  .border.hover-elevate:not(.no-hover-interaction-elevate)::after {
    inset: -1px;
  }

  /* Z-Index Layer System - Prevents overlapping menu issues */
  
  /* Base layer for sticky headers and navigation */
  .z-header { z-index: 40; }
  
  /* Dropdowns and popovers that appear above content */
  .z-dropdown { z-index: 50; }
  
  /* Tooltips that should appear above dropdowns */
  .z-tooltip { z-index: 60; }
  
  /* Sheet/drawer panels that slide in from sides */  
  .z-sheet { z-index: 70; }
  
  /* Modals and dialogs that should appear above everything else */
  .z-modal { z-index: 80; }
  
  /* Critical alerts and notifications at the highest level */
  .z-alert { z-index: 90; }
  
  /* Click-outside detector overlay */
  .click-outside-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 49;
    cursor: default;
  }
}

@tailwind base;
@tailwind components;
@tailwind utilities;

/* LIGHT MODE */
:root {
  --button-outline: rgba(0,0,0, .10);
  --badge-outline: rgba(0,0,0, .05);

  /* Automatic computation of border around primary / danger buttons */
  --opaque-button-border-intensity: -8; /* In terms of percentages */

  /* Backgrounds applied on top of other backgrounds when hovered/active */
  --elevate-1: rgba(0,0,0, .03);
  --elevate-2: rgba(0,0,0, .08);

  --background: 45 40% 98%;

  --foreground: 210 20% 12%;

  --border: 45 15% 87%;

  --card: 45 28% 95%;

  --card-foreground: 210 20% 12%;

  --card-border: 45 20% 90%;

  --sidebar: 45 25% 94%;

  --sidebar-foreground: 210 20% 12%;

  --sidebar-border: 45 20% 88%;

  --sidebar-primary: 140 25% 60%;

  --sidebar-primary-foreground: 140 25% 15%;

  --sidebar-accent: 260 20% 85%;

  --sidebar-accent-foreground: 260 22% 20%;

  --sidebar-ring: 140 25% 60%;

  --popover: 45 25% 92%;

  --popover-foreground: 210 20% 12%;

  --popover-border: 45 20% 86%;

  --primary: 140 25% 35%;

  --primary-foreground: 140 15% 95%;

  --secondary: 45 18% 86%;

  --secondary-foreground: 210 20% 12%;

  --muted: 45 12% 88%;

  --muted-foreground: 210 12% 35%;

  --accent: 260 15% 88%;

  --accent-foreground: 260 22% 20%;

  --destructive: 0 65% 55%;

  --destructive-foreground: 0 20% 95%;

  --input: 45 20% 82%;
  --ring: 140 25% 60%;
  --chart-1: 140 30% 40%;
  --chart-2: 180 35% 45%;
  --chart-3: 260 25% 50%;
  --chart-4: 35 50% 55%;
  --chart-5: 200 30% 45%;

  --font-sans: Inter, sans-serif;
  --font-serif: Merriweather, serif;
  --font-mono: Menlo, monospace;
  --radius: .5rem; /* 8px */
  --shadow-2xs: 0px 1px 2px 0px hsl(210 15% 20% / 0.03);
  --shadow-xs: 0px 1px 2px 0px hsl(210 15% 20% / 0.05);
  --shadow-sm: 0px 1px 3px 0px hsl(210 15% 20% / 0.08), 0px 1px 2px -1px hsl(210 15% 20% / 0.08);
  --shadow: 0px 1px 3px 0px hsl(210 15% 20% / 0.10), 0px 1px 2px -1px hsl(210 15% 20% / 0.10);
  --shadow-md: 0px 4px 6px -1px hsl(210 15% 20% / 0.10), 0px 2px 4px -2px hsl(210 15% 20% / 0.10);
  --shadow-lg: 0px 10px 15px -3px hsl(210 15% 20% / 0.10), 0px 4px 6px -4px hsl(210 15% 20% / 0.10);
  --shadow-xl: 0px 20px 25px -5px hsl(210 15% 20% / 0.10), 0px 8px 10px -6px hsl(210 15% 20% / 0.10);
  --shadow-2xl: 0px 25px 50px -12px hsl(210 15% 20% / 0.25);
  --tracking-normal: 0em;
  --spacing: 0.25rem;

  /* Automatically computed borders - intensity can be controlled by the user by the --opaque-button-border-intensity setting */

  /* Fallback for older browsers */
  --sidebar-primary-border: hsl(var(--sidebar-primary));
  --sidebar-primary-border: hsl(from hsl(var(--sidebar-primary)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);

  /* Fallback for older browsers */
  --sidebar-accent-border: hsl(var(--sidebar-accent));
  --sidebar-accent-border: hsl(from hsl(var(--sidebar-accent)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);

  /* Fallback for older browsers */
  --primary-border: hsl(var(--primary));
  --primary-border: hsl(from hsl(var(--primary)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);

  /* Fallback for older browsers */
  --secondary-border: hsl(var(--secondary));
  --secondary-border: hsl(from hsl(var(--secondary)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);

  /* Fallback for older browsers */
  --muted-border: hsl(var(--muted));
  --muted-border: hsl(from hsl(var(--muted)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);

  /* Fallback for older browsers */
  --accent-border: hsl(var(--accent));
  --accent-border: hsl(from hsl(var(--accent)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);

  /* Fallback for older browsers */
  --destructive-border: hsl(var(--destructive));
  --destructive-border: hsl(from hsl(var(--destructive)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);
}

.dark {
  --button-outline: rgba(255,255,255, .10);
  --badge-outline: rgba(255,255,255, .05);

  --opaque-button-border-intensity: 9;  /* In terms of percentages */

  /* Backgrounds applied on top of other backgrounds when hovered/active */
  --elevate-1: rgba(255,255,255, .04);
  --elevate-2: rgba(255,255,255, .09);

  --background: 210 15% 8%;

  --foreground: 210 10% 90%;

  --border: 210 15% 18%;

  --card: 210 12% 11%;

  --card-foreground: 210 10% 90%;

  --card-border: 210 15% 20%;

  --sidebar: 210 10% 14%;

  --sidebar-foreground: 210 10% 90%;

  --sidebar-border: 210 15% 22%;

  --sidebar-primary: 140 25% 60%;

  --sidebar-primary-foreground: 140 15% 15%;

  --sidebar-accent: 260 15% 18%;

  --sidebar-accent-foreground: 260 20% 85%;

  --sidebar-ring: 140 25% 60%;

  --popover: 210 10% 16%;

  --popover-foreground: 210 10% 90%;

  --popover-border: 210 15% 24%;

  --primary: 140 25% 35%;

  --primary-foreground: 140 15% 95%;

  --secondary: 210 8% 20%;

  --secondary-foreground: 210 10% 90%;

  --muted: 210 8% 18%;

  --muted-foreground: 210 10% 70%;

  --accent: 260 10% 20%;

  --accent-foreground: 260 20% 85%;

  --destructive: 0 65% 55%;

  --destructive-foreground: 0 20% 95%;

  --input: 210 15% 25%;
  --ring: 140 25% 60%;
  --chart-1: 140 35% 70%;
  --chart-2: 180 40% 65%;
  --chart-3: 260 30% 75%;
  --chart-4: 35 60% 70%;
  --chart-5: 200 35% 70%;

  --shadow-2xs: 0px 1px 2px 0px hsl(0 0% 0% / 0.10);
  --shadow-xs: 0px 1px 2px 0px hsl(0 0% 0% / 0.15);
  --shadow-sm: 0px 1px 3px 0px hsl(0 0% 0% / 0.20), 0px 1px 2px -1px hsl(0 0% 0% / 0.20);
  --shadow: 0px 1px 3px 0px hsl(0 0% 0% / 0.25), 0px 1px 2px -1px hsl(0 0% 0% / 0.25);
  --shadow-md: 0px 4px 6px -1px hsl(0 0% 0% / 0.25), 0px 2px 4px -2px hsl(0 0% 0% / 0.25);
  --shadow-lg: 0px 10px 15px -3px hsl(0 0% 0% / 0.25), 0px 4px 6px -4px hsl(0 0% 0% / 0.25);
  --shadow-xl: 0px 20px 25px -5px hsl(0 0% 0% / 0.25), 0px 8px 10px -6px hsl(0 0% 0% / 0.25);
  --shadow-2xl: 0px 25px 50px -12px hsl(0 0% 0% / 0.50);

}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply font-sans antialiased bg-background text-foreground;
  }
}

/**
 * Using the elevate system.
 * Automatic contrast adjustment.
 *
 * <element className="hover-elevate" />
 * <element className="active-elevate-2" />
 *
 * // Using the tailwind utility when a data attribute is "on"
 * <element className="toggle-elevate data-[state=on]:toggle-elevated" />
 * // Or manually controlling the toggle state
 * <element className="toggle-elevate toggle-elevated" />
 *
 * Elevation systems have to handle many states.
 * - not-hovered, vs. hovered vs. active  (three mutually exclusive states)
 * - toggled or not
 * - focused or not (this is not handled with these utilities)
 *
 * Even without handling focused or not, this is six possible combinations that
 * need to be distinguished from eachother visually.
 */
@layer utilities {

  /* Hide ugly search cancel button in Chrome until we can style it properly */
  input[type="search"]::-webkit-search-cancel-button {
    @apply hidden;
  }

  /* Placeholder styling for contentEditable div */
  [contenteditable][data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: hsl(var(--muted-foreground));
    pointer-events: none;
  }

  /* .no-default-hover-elevate/no-default-active-elevate is an escape hatch so consumers of
   * buttons/badges can remove the automatic brightness adjustment on interactions
   * and program their own. */
  .no-default-hover-elevate {}

  .no-default-active-elevate {}


  /**
   * Toggleable backgrounds go behind the content. Hoverable/active goes on top.
   * This way they can stack/compound. Both will overlap the parent's borders!
   * So borders will be automatically adjusted both on toggle, and hover/active,
   * and they will be compounded.
   */
  .toggle-elevate::before,
  .toggle-elevate-2::before {
    content: "";
    pointer-events: none;
    position: absolute;
    inset: 0px;
    /*border-radius: inherit;   match rounded corners */
    border-radius: inherit;
    z-index: -1;
    /* sits behind content but above backdrop */
  }

  .toggle-elevate.toggle-elevated::before {
    background-color: var(--elevate-2);
  }

  /* If there's a 1px border, adjust the inset so that it covers that parent's border */
  .border.toggle-elevate::before {
    inset: -1px;
  }

  /* Does not work on elements with overflow:hidden! */
  .hover-elevate:not(.no-default-hover-elevate),
  .active-elevate:not(.no-default-active-elevate),
  .hover-elevate-2:not(.no-default-hover-elevate),
  .active-elevate-2:not(.no-default-active-elevate) {
    position: relative;
    z-index: 0;
  }

  .hover-elevate:not(.no-default-hover-elevate)::after,
  .active-elevate:not(.no-default-active-elevate)::after,
  .hover-elevate-2:not(.no-default-hover-elevate)::after,
  .active-elevate-2:not(.no-default-active-elevate)::after {
    content: "";
    pointer-events: none;
    position: absolute;
    inset: 0px;
    /*border-radius: inherit;   match rounded corners */
    border-radius: inherit;
    z-index: 999;
    /* sits in front of content */
  }

  .hover-elevate:hover:not(.no-default-hover-elevate)::after,
  .active-elevate:active:not(.no-default-active-elevate)::after {
    background-color: var(--elevate-1);
  }

  .hover-elevate-2:hover:not(.no-default-hover-elevate)::after,
  .active-elevate-2:active:not(.no-default-active-elevate)::after {
    background-color: var(--elevate-2);
  }

  /* If there's a 1px border, adjust the inset so that it covers that parent's border */
  .border.hover-elevate:not(.no-hover-interaction-elevate)::after,
  .border.active-elevate:not(.no-active-interaction-elevate)::after,
  .border.hover-elevate-2:not(.no-hover-interaction-elevate)::after,
  .border.active-elevate-2:not(.no-active-interaction-elevate)::after,
  .border.hover-elevate:not(.no-hover-interaction-elevate)::after {
    inset: -1px;
  }

  /* Z-Index Layer System - Prevents overlapping menu issues */
  
  /* Base layer for sticky headers and navigation */
  .z-header { z-index: 40; }
  
  /* Dropdowns and popovers that appear above content */
  .z-dropdown { z-index: 50; }
  
  /* Tooltips that should appear above dropdowns */
  .z-tooltip { z-index: 60; }
  
  /* Sheet/drawer panels that slide in from sides */  
  .z-sheet { z-index: 70; }
  
  /* Modals and dialogs that should appear above everything else */
  .z-modal { z-index: 80; }
  
  /* Critical alerts and notifications at the highest level */
  .z-alert { z-index: 90; }
  
  /* Click-outside detector overlay */
  .click-outside-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 49;
    cursor: default;
  }
 }

