/*
  Built-in themes as shadcn/ui variables: one light block and one dark block each.
  Pick one in Settings. A custom theme pasted in Settings (shadcn / tweakcn export)
  is applied unlayered, so it overrides whatever is set here.
*/

@layer themes {

/* shared defaults, plus code colors (themes may override) */
:root {
  --radius: 0.625rem;
  --font-sans: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.06), 0 1px 3px rgb(0 0 0 / 0.04);
  --shadow-md: 0 1px 2px rgb(0 0 0 / 0.06), 0 3px 10px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 4px 12px rgb(0 0 0 / 0.08), 0 12px 32px rgb(0 0 0 / 0.08);
  --shadow-xl: 0 8px 24px rgb(0 0 0 / 0.12), 0 24px 60px -12px rgb(0 0 0 / 0.22);
  --code-keyword: #8839ef;
  --code-string: #3f8f2a;
  --code-comment: #8c8fa1;
  --code-number: #c75f00;
  --code-function: #1e66f5;
}
.dark {
  --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow-sm: 0 1px 3px rgb(0 0 0 / 0.35);
  --shadow-md: 0 1px 3px rgb(0 0 0 / 0.35), 0 4px 14px rgb(0 0 0 / 0.25);
  --shadow-lg: 0 6px 18px rgb(0 0 0 / 0.4);
  --shadow-xl: 0 12px 32px rgb(0 0 0 / 0.45), 0 30px 70px -12px rgb(0 0 0 / 0.5);
  --code-keyword: #c792ea;
  --code-string: #c3e88d;
  --code-comment: #7f848e;
  --code-number: #f78c6c;
  --code-function: #82aaff;
}

/* Sticky: warm paper page, sticky-note yellow */
[data-theme=sticky] {
  --background: #f4f2ee; --foreground: #2a2724;
  --card: #ffffff; --card-foreground: #2a2724;
  --popover: #ffffff; --popover-foreground: #2a2724;
  --primary: #f2c230; --primary-foreground: #3a2e10;
  --secondary: #efece6; --secondary-foreground: #2a2724;
  --muted: #f1eee8; --muted-foreground: #8a8378;
  --accent: #fbf1c8; --accent-foreground: #2a2724;
  --destructive: #d9483b;
  --border: #e5e1d8; --input: #dcd7cd; --ring: #e2b42a;
  --sidebar: #f4f2ee; --sidebar-foreground: #2a2724;
  --sidebar-primary: #e5b21f; --sidebar-primary-foreground: #3a2e10;
  --sidebar-accent: #faedb8; --sidebar-accent-foreground: #2a2724;
  --sidebar-border: #e5e1d8; --sidebar-ring: #e2b42a;
}
.dark[data-theme=sticky], .dark [data-theme=sticky] {
  --background: #1c1b19; --foreground: #ece8e1;
  --card: #252321; --card-foreground: #ece8e1;
  --popover: #322f2b; --popover-foreground: #ece8e1;
  --primary: #f2c94c; --primary-foreground: #2b2208;
  --secondary: #322f2b; --secondary-foreground: #ece8e1;
  --muted: #2e2c29; --muted-foreground: #a39c90;
  --accent: #3a3424; --accent-foreground: #ece8e1;
  --destructive: #f06b5e;
  --border: #34312d; --input: #3f3b36; --ring: #c9a23a;
  --sidebar: #1c1b19; --sidebar-foreground: #ece8e1;
  --sidebar-primary: #f2c94c; --sidebar-primary-foreground: #2b2208;
  --sidebar-accent: #3b3420; --sidebar-accent-foreground: #f5ebc8;
  --sidebar-border: #2e2c28; --sidebar-ring: #c9a23a;
}

/* Docs: Google Docs white and blue */
[data-theme=docs] {
  --radius: 0.5rem;
  --font-sans: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --background: #f9fbfd; --foreground: #1f1f1f;
  --card: #ffffff; --card-foreground: #1f1f1f;
  --popover: #ffffff; --popover-foreground: #1f1f1f;
  --primary: #0b57d0; --primary-foreground: #ffffff;
  --secondary: #edf2fa; --secondary-foreground: #1f1f1f;
  --muted: #f1f3f4; --muted-foreground: #5f6368;
  --accent: #e8f0fe; --accent-foreground: #0b57d0;
  --destructive: #d93025;
  --border: #dadce0; --input: #c4c7c5; --ring: #0b57d0;
  --sidebar: #f9fbfd; --sidebar-foreground: #1f1f1f;
  --sidebar-primary: #0b57d0; --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #d3e3fd; --sidebar-accent-foreground: #041e49;
  --sidebar-border: #e3e3e3; --sidebar-ring: #0b57d0;
}
.dark[data-theme=docs], .dark [data-theme=docs] {
  --background: #1b1c1e; --foreground: #e3e3e3;
  --card: #232427; --card-foreground: #e3e3e3;
  --popover: #2c2d31; --popover-foreground: #e3e3e3;
  --primary: #a8c7fa; --primary-foreground: #062e6f;
  --secondary: #2c2d31; --secondary-foreground: #e3e3e3;
  --muted: #2a2b2e; --muted-foreground: #9aa0a6;
  --accent: #1f3760; --accent-foreground: #d3e3fd;
  --destructive: #f28b82;
  --border: #3c4043; --input: #5f6368; --ring: #a8c7fa;
  --sidebar: #1b1c1e; --sidebar-foreground: #e3e3e3;
  --sidebar-primary: #a8c7fa; --sidebar-primary-foreground: #062e6f;
  --sidebar-accent: #004a77; --sidebar-accent-foreground: #c2e7ff;
  --sidebar-border: #2c2d31; --sidebar-ring: #a8c7fa;
}

/* Notepad: Windows 11 mica gray and blue */
[data-theme=notepad] {
  --radius: 0.5rem;
  --background: #f3f3f3; --foreground: #1a1a1a;
  --card: #ffffff; --card-foreground: #1a1a1a;
  --popover: #f9f9f9; --popover-foreground: #1a1a1a;
  --primary: #005fb8; --primary-foreground: #ffffff;
  --secondary: #ebebeb; --secondary-foreground: #1a1a1a;
  --muted: #f0f0f0; --muted-foreground: #616161;
  --accent: #e6eef7; --accent-foreground: #003e79;
  --destructive: #c42b1c;
  --border: #e0e0e0; --input: #d1d1d1; --ring: #005fb8;
  --sidebar: #eeeeee; --sidebar-foreground: #1a1a1a;
  --sidebar-primary: #005fb8; --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #ffffff; --sidebar-accent-foreground: #1a1a1a;
  --sidebar-border: #e0e0e0; --sidebar-ring: #005fb8;
}
.dark[data-theme=notepad], .dark [data-theme=notepad] {
  --background: #202020; --foreground: #ffffff;
  --card: #2b2b2b; --card-foreground: #ffffff;
  --popover: #2c2c2c; --popover-foreground: #ffffff;
  --primary: #60cdff; --primary-foreground: #003a57;
  --secondary: #333333; --secondary-foreground: #ffffff;
  --muted: #323232; --muted-foreground: #a8a8a8;
  --accent: #1f3a4d; --accent-foreground: #ffffff;
  --destructive: #ff99a4;
  --border: #3a3a3a; --input: #4a4a4a; --ring: #60cdff;
  --sidebar: #1c1c1c; --sidebar-foreground: #ffffff;
  --sidebar-primary: #60cdff; --sidebar-primary-foreground: #003a57;
  --sidebar-accent: #2d2d2d; --sidebar-accent-foreground: #ffffff;
  --sidebar-border: #2b2b2b; --sidebar-ring: #60cdff;
}

/* Paper: iA Writer / Bear, warm with a red pencil and serif text */
[data-theme=paper] {
  --radius: 0.75rem;
  --font-sans: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --background: #f1eee8; --foreground: #24211d;
  --card: #fffdf9; --card-foreground: #24211d;
  --popover: #fffdf9; --popover-foreground: #24211d;
  --primary: #d1553e; --primary-foreground: #ffffff;
  --secondary: #f3efe7; --secondary-foreground: #24211d;
  --muted: #f2ede4; --muted-foreground: #8f897e;
  --accent: #f5e3dc; --accent-foreground: #24211d;
  --destructive: #c0392b;
  --border: #e6e1d7; --input: #dcd5c8; --ring: #d1553e;
  --sidebar: #f1eee8; --sidebar-foreground: #24211d;
  --sidebar-primary: #d1553e; --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #e5e0d5; --sidebar-accent-foreground: #24211d;
  --sidebar-border: #e6e1d7; --sidebar-ring: #d1553e;
}
.dark[data-theme=paper], .dark [data-theme=paper] {
  --background: #1a1917; --foreground: #ece6db;
  --card: #22211e; --card-foreground: #ece6db;
  --popover: #2b2926; --popover-foreground: #ece6db;
  --primary: #e57a62; --primary-foreground: #1a1917;
  --secondary: #2b2925; --secondary-foreground: #ece6db;
  --muted: #2e2b27; --muted-foreground: #8e877b;
  --accent: #3d2a24; --accent-foreground: #ece6db;
  --destructive: #f07c6c;
  --border: #35322d; --input: #403c36; --ring: #e57a62;
  --sidebar: #1a1917; --sidebar-foreground: #ece6db;
  --sidebar-primary: #e57a62; --sidebar-primary-foreground: #1a1917;
  --sidebar-accent: #2b2925; --sidebar-accent-foreground: #ece6db;
  --sidebar-border: #2b2925; --sidebar-ring: #e57a62;
}

/* Graphite: Linear / Raycast, cool grays and indigo */
[data-theme=graphite] {
  --radius: 0.5rem;
  --background: #f7f7f8; --foreground: #16171b;
  --card: #ffffff; --card-foreground: #16171b;
  --popover: #ffffff; --popover-foreground: #16171b;
  --primary: #5b63d3; --primary-foreground: #ffffff;
  --secondary: #f1f1f4; --secondary-foreground: #16171b;
  --muted: #f1f1f4; --muted-foreground: #6f7480;
  --accent: #ecedfb; --accent-foreground: #3d44a8;
  --destructive: #e5484d;
  --border: #e5e5e9; --input: #dcdce2; --ring: #5b63d3;
  --sidebar: #f7f7f8; --sidebar-foreground: #16171b;
  --sidebar-primary: #5b63d3; --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #eaeaee; --sidebar-accent-foreground: #16171b;
  --sidebar-border: #e8e8eb; --sidebar-ring: #5b63d3;
}
.dark[data-theme=graphite], .dark [data-theme=graphite] {
  --background: #0c0d0f; --foreground: #e7e8eb;
  --card: #131417; --card-foreground: #e7e8eb;
  --popover: #1a1b1f; --popover-foreground: #e7e8eb;
  --primary: #8a90ff; --primary-foreground: #0c0d0f;
  --secondary: #1c1e22; --secondary-foreground: #e7e8eb;
  --muted: #1d1f23; --muted-foreground: #7a7f8a;
  --accent: #23264a; --accent-foreground: #e7e8eb;
  --destructive: #ff6369;
  --border: #24262b; --input: #2f3238; --ring: #8a90ff;
  --sidebar: #0c0d0f; --sidebar-foreground: #e7e8eb;
  --sidebar-primary: #8a90ff; --sidebar-primary-foreground: #0c0d0f;
  --sidebar-accent: #1b1d21; --sidebar-accent-foreground: #e7e8eb;
  --sidebar-border: #1d1f23; --sidebar-ring: #8a90ff;
}

}
