/* Catppuccin — palette mappings from the official catppuccin/shadcn-ui port:
   https://github.com/catppuccin/shadcn-ui (themes/{flavor}/{flavor}-mauve.css).
   Aerion-specific override: --ring uses mauve (matching --primary convention)
   instead of the upstream port's text color. */
@layer base {
  /* Catppuccin Latte — Saturated mid-lightness colors with white initials. */
  [data-theme="catppuccin-latte"] {
    color-scheme: light;
    --background: 220 23% 95%;           /* base #EFF1F5 */
    --foreground: 234 16% 35%;           /* text #4C4F69 */
    --card: 220 23% 95%;                 /* base */
    --card-foreground: 234 16% 35%;      /* text */
    --popover: 220 23% 95%;              /* base */
    --popover-foreground: 234 16% 35%;   /* text */
    --primary: 266 85% 58%;              /* mauve #8839EF */
    --primary-foreground: 220 23% 95%;   /* base */
    --secondary: 223 16% 83%;            /* surface0 #CCD0DA */
    --secondary-foreground: 234 16% 35%; /* text */
    --muted: 223 16% 83%;                /* surface0 */
    --muted-foreground: 233 13% 41%;     /* subtext1 #5C5F77 */
    --accent: 223 16% 83%;               /* surface0 */
    --accent-foreground: 234 16% 35%;    /* text */
    --destructive: 347 87% 44%;          /* red #D20F39 */
    --destructive-foreground: 220 23% 95%; /* base */
    --border: 225 14% 77%;               /* surface1 #BCC0CC */
    --input: 225 14% 77%;                /* surface1 */
    --ring: 266 85% 58%;                 /* mauve */
    /* Avatar palette: 14 distinct Catppuccin Latte colors with white initials. */
    --avatar-fg: 0 0% 100%;              /* white */
    --avatar-1:  11 56% 67%;             /* rosewater */
    --avatar-2:  0 60% 67%;              /* flamingo */
    --avatar-3:  316 73% 69%;            /* pink */
    --avatar-4:  266 85% 58%;            /* mauve */
    --avatar-5:  347 87% 44%;            /* red */
    --avatar-6:  355 76% 59%;            /* maroon */
    --avatar-7:  22 99% 52%;             /* peach */
    --avatar-8:  35 77% 49%;             /* yellow */
    --avatar-9:  109 58% 40%;            /* green */
    --avatar-10: 183 74% 35%;            /* teal */
    --avatar-11: 197 97% 46%;            /* sky */
    --avatar-12: 189 70% 42%;            /* sapphire */
    --avatar-13: 220 91% 54%;            /* blue */
    --avatar-14: 231 97% 72%;            /* lavender */
  }

  /* Catppuccin Frappé — Lightest of the dark flavors. */
  [data-theme="catppuccin-frappe"] {
    color-scheme: dark;
    --dark-mail-bg-l: 8;                 /* override: lower than chrome L to minimize hue-rotate brown artifact */
    --background: 229 19% 23%;           /* base #303446 */
    --foreground: 227 70% 87%;           /* text #C6D0F5 */
    --card: 229 19% 23%;                 /* base */
    --card-foreground: 227 70% 87%;
    --popover: 229 19% 23%;              /* base */
    --popover-foreground: 227 70% 87%;
    --primary: 277 59% 76%;              /* mauve #CA9EE6 */
    --primary-foreground: 229 19% 23%;   /* base */
    --secondary: 230 16% 30%;            /* surface0 #414559 */
    --secondary-foreground: 227 70% 87%;
    --muted: 230 16% 30%;                /* surface0 */
    --muted-foreground: 227 44% 80%;     /* subtext1 #B5BFE2 */
    --accent: 230 16% 30%;               /* surface0 */
    --accent-foreground: 227 70% 87%;
    --destructive: 359 68% 71%;          /* red #E78284 */
    --destructive-foreground: 229 19% 23%; /* base */
    --border: 227 15% 37%;               /* surface1 #51576D */
    --input: 227 15% 37%;
    --ring: 277 59% 76%;                 /* mauve */
    /* Avatar palette: 14 distinct Catppuccin Frappé colors with dark initials. */
    --avatar-fg: 229 19% 23%;            /* base */
    --avatar-1:  10 57% 88%;             /* rosewater #F2D5CF */
    --avatar-2:  0 59% 84%;              /* flamingo #EEBEBE */
    --avatar-3:  316 73% 84%;            /* pink #F4B8E4 */
    --avatar-4:  277 59% 76%;            /* mauve */
    --avatar-5:  359 68% 71%;            /* red */
    --avatar-6:  358 66% 76%;            /* maroon #EA999C */
    --avatar-7:  20 79% 70%;             /* peach #EF9F76 */
    --avatar-8:  40 62% 73%;             /* yellow #E5C890 */
    --avatar-9:  96 44% 68%;             /* green #A6D189 */
    --avatar-10: 172 40% 65%;            /* teal #81C8BE */
    --avatar-11: 189 48% 73%;            /* sky #99D1DB */
    --avatar-12: 199 55% 69%;            /* sapphire #85C1DC */
    --avatar-13: 222 74% 74%;            /* blue #8CAAEE */
    --avatar-14: 239 67% 84%;            /* lavender #BABBF1 */
  }

  /* Catppuccin Macchiato — Mid-dark flavor between Frappé and Mocha. */
  [data-theme="catppuccin-macchiato"] {
    color-scheme: dark;
    --dark-mail-bg-l: 8;                 /* override: lower than chrome L to minimize hue-rotate brown artifact */
    --background: 232 23% 18%;           /* base #24273A */
    --foreground: 227 68% 88%;           /* text #CAD3F5 */
    --card: 232 23% 18%;                 /* base */
    --card-foreground: 227 68% 88%;
    --popover: 232 23% 18%;              /* base */
    --popover-foreground: 227 68% 88%;
    --primary: 267 83% 80%;              /* mauve #C6A0F6 */
    --primary-foreground: 232 23% 18%;   /* base */
    --secondary: 230 19% 26%;            /* surface0 #363A4F */
    --secondary-foreground: 227 68% 88%;
    --muted: 230 19% 26%;                /* surface0 */
    --muted-foreground: 228 39% 80%;     /* subtext1 #B8C0E0 */
    --accent: 230 19% 26%;               /* surface0 */
    --accent-foreground: 227 68% 88%;
    --destructive: 351 74% 73%;          /* red #ED8796 */
    --destructive-foreground: 232 23% 18%; /* base */
    --border: 231 16% 34%;               /* surface1 #494D64 */
    --input: 231 16% 34%;
    --ring: 267 83% 80%;                 /* mauve */
    /* Avatar palette: 14 distinct Catppuccin Macchiato colors with dark initials. */
    --avatar-fg: 232 23% 18%;            /* base */
    --avatar-1:  10 59% 90%;             /* rosewater #F4DBD6 */
    --avatar-2:  0 58% 86%;              /* flamingo #F0C6C6 */
    --avatar-3:  316 74% 85%;            /* pink #F5BDE6 */
    --avatar-4:  267 83% 80%;            /* mauve */
    --avatar-5:  351 74% 73%;            /* red */
    --avatar-6:  355 71% 77%;            /* maroon #EE99A0 */
    --avatar-7:  21 86% 73%;             /* peach #F5A97F */
    --avatar-8:  40 70% 78%;             /* yellow #EED49F */
    --avatar-9:  105 48% 72%;            /* green #A6DA95 */
    --avatar-10: 171 47% 69%;            /* teal #8BD5CA */
    --avatar-11: 189 59% 73%;            /* sky #91D7E3 */
    --avatar-12: 199 66% 69%;            /* sapphire #7DC4E4 */
    --avatar-13: 220 83% 75%;            /* blue #8AADF4 */
    --avatar-14: 234 82% 85%;            /* lavender #B7BDF8 */
  }

  /* Catppuccin Mocha — Light pastels on dark base; dark initials. */
  [data-theme="catppuccin-mocha"] {
    color-scheme: dark;
    --dark-mail-bg-l: 8;                 /* override: lower than chrome L to minimize hue-rotate brown artifact */
    --background: 240 21% 15%;           /* base #1E1E2E */
    --foreground: 226 64% 88%;           /* text #CDD6F4 */
    --card: 240 21% 15%;                 /* base */
    --card-foreground: 226 64% 88%;      /* text */
    --popover: 240 21% 15%;              /* base */
    --popover-foreground: 226 64% 88%;   /* text */
    --primary: 267 84% 81%;              /* mauve #CBA6F7 */
    --primary-foreground: 240 21% 15%;   /* base */
    --secondary: 237 16% 23%;            /* surface0 #313244 */
    --secondary-foreground: 226 64% 88%; /* text */
    --muted: 237 16% 23%;                /* surface0 */
    --muted-foreground: 227 36% 80%;     /* subtext1 #BAC2DE */
    --accent: 237 16% 23%;               /* surface0 */
    --accent-foreground: 226 64% 88%;    /* text */
    --destructive: 343 81% 75%;          /* red #F38BA8 */
    --destructive-foreground: 240 21% 15%; /* base */
    --border: 234 13% 31%;               /* surface1 #45475A */
    --input: 234 13% 31%;                /* surface1 */
    --ring: 267 84% 81%;                 /* mauve */
    /* Avatar palette: 14 distinct Catppuccin pastel colors with dark initials. */
    --avatar-fg: 240 21% 15%;            /* base — dark text on light pastels */
    --avatar-1:  10 56% 91%;             /* rosewater */
    --avatar-2:  0 59% 88%;              /* flamingo */
    --avatar-3:  316 72% 86%;            /* pink */
    --avatar-4:  267 84% 81%;            /* mauve */
    --avatar-5:  343 81% 75%;            /* red */
    --avatar-6:  350 65% 77%;            /* maroon */
    --avatar-7:  23 92% 75%;             /* peach */
    --avatar-8:  41 86% 83%;             /* yellow */
    --avatar-9:  115 54% 76%;            /* green */
    --avatar-10: 170 57% 73%;            /* teal */
    --avatar-11: 189 71% 73%;            /* sky */
    --avatar-12: 199 76% 69%;            /* sapphire */
    --avatar-13: 217 92% 76%;            /* blue */
    --avatar-14: 232 97% 85%;            /* lavender */
  }
}
