/* Hacker Rouge: the Hacker theme (black and terminal green, square corners, monospace) with red-orange borders
   and warm card tints. Its black carries a red hue (0): Comet mixes colours in OKLCH, which blends hues, so a line
   that is 30 % green over this black comes out red-orange. The Super Tool has the same colours, worked out
   (SuperTools/supertool/comet_themes.py). Made from hacker-theme.css: change both together. */
/* Black and green terminal-style theme with sharp corners */
/* Matches the exact structure of DaisyUI built-in themes */

[data-theme="hacker-rouge"] {
  color-scheme: dark;
  
  /* Base colors - Pure black backgrounds */
  --color-base-100: oklch(0% 0 0);
  --color-base-200: oklch(8% 0 0);
  --color-base-300: oklch(15% 0 0);
  --color-base-content: oklch(86% 0.25 142);
  
  /* Primary - Terminal Green (--p for DaisyUI components like logo) */
  --p: 0.86 0.25 142;
  --color-primary: oklch(86% 0.25 142);
  --color-primary-content: oklch(0% 0 0);
  
  /* Secondary - Dark Green */
  --color-secondary: oklch(60% 0.2 142);
  --color-secondary-content: oklch(0% 0 0);
  
  /* Accent - Bright Terminal Green */
  --color-accent: oklch(86% 0.25 142);
  --color-accent-content: oklch(0% 0 0);
  
  /* Neutral - Black */
  --color-neutral: oklch(0% 0 0);
  --color-neutral-content: oklch(86% 0.25 142);
  
  /* Info - Terminal Green */
  --color-info: oklch(86% 0.25 142);
  --color-info-content: oklch(0% 0 0);
  
  /* Success - Bright Terminal Green */
  --color-success: oklch(86% 0.25 142);
  --color-success-content: oklch(0% 0 0);
  
  /* Warning - Yellow-Green */
  --color-warning: oklch(97% 0.2 99);
  --color-warning-content: oklch(0% 0 0);
  
  /* Error - Red */
  --color-error: oklch(63% 0.25 25);
  --color-error-content: oklch(100% 0 0);
  
  /* Border radius - Sharp corners for terminal style */
  --radius-selector: 0rem;
  --radius-field: 0rem;
  --radius-box: 0rem;
  
  /* Base sizes */
  --size-selector: 0.25rem;
  --size-field: 0.25rem;
  
  /* Border */
  --border: 1px;
  
  /* Effects */
  --depth: 0;
  --noise: 0;
}

/* Terminal-style font */
[data-theme="hacker-rouge"] {
  font-family: 'Courier New', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Terminal-style cursor for inputs */
[data-theme="hacker-rouge"] input,
[data-theme="hacker-rouge"] textarea,
[data-theme="hacker-rouge"] select {
  caret-color: oklch(86% 0.25 142);
}

/* Terminal-style focus effects */
[data-theme="hacker-rouge"] input:focus,
[data-theme="hacker-rouge"] textarea:focus,
[data-theme="hacker-rouge"] select:focus {
  box-shadow: 0 0 0 1px oklch(86% 0.25 142);
  border-color: oklch(86% 0.25 142);
}

/* Remove animations for terminal feel */
[data-theme="hacker-rouge"] * {
  transition: none !important;
}

/* Terminal-style scrollbar */
[data-theme="hacker-rouge"] ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

[data-theme="hacker-rouge"] ::-webkit-scrollbar-track {
  background: oklch(0% 0 0);
}

[data-theme="hacker-rouge"] ::-webkit-scrollbar-thumb {
  background: oklch(86% 0.25 142);
  border-radius: 0;
}

[data-theme="hacker-rouge"] ::-webkit-scrollbar-thumb:hover {
  background: oklch(60% 0.2 142);
}

/* Override any default rounded corners for hacker theme */
[data-theme="hacker-rouge"] .rounded-box,
[data-theme="hacker-rouge"] .rounded-btn,
[data-theme="hacker-rouge"] .rounded-badge,
[data-theme="hacker-rouge"] .rounded-input,
[data-theme="hacker-rouge"] .rounded-select,
[data-theme="hacker-rouge"] .rounded-toggle,
[data-theme="hacker-rouge"] .rounded-textarea,
[data-theme="hacker-rouge"] .card,
[data-theme="hacker-rouge"] .btn,
[data-theme="hacker-rouge"] .input,
[data-theme="hacker-rouge"] .select,
[data-theme="hacker-rouge"] .textarea,
[data-theme="hacker-rouge"] .badge,
[data-theme="hacker-rouge"] .alert,
[data-theme="hacker-rouge"] .modal,
[data-theme="hacker-rouge"] .menu,
[data-theme="hacker-rouge"] .tabs {
  border-radius: 0 !important;
}

/* DaisyUI 4 variables. Comet loads DaisyUI 4 (its components and ds.css read --b1, --bc, --p ... as OKLCH parts):
   without them the theme fell back to DaisyUI's light defaults, so Comet showed hacker as a light theme while the
   Super Tool showed it dark. These are the same colours as the Super Tool (SuperTools/supertool/comet_themes.py).
   The black and grey parts have no colour (chroma 0) but carry the theme's green hue: Comet mixes colours in OKLCH,
   which blends hues too, and a black with hue 0 (red) turned every green border and card tint red-orange. */
[data-theme="hacker-rouge"] {
    --p: 85.992% 0.2501 141.96;
    --pc: 0.000% 0.0000 0.00;
    --s: 59.935% 0.1997 141.99;
    --a: 85.992% 0.2501 141.96;
    --n: 0.000% 0.0000 0.00;
    --b1: 0.000% 0.0000 0.00;
    --b2: 8.467% 0.0000 0.00;
    --b3: 14.958% 0.0000 0.00;
    --bc: 85.992% 0.2501 141.96;
    --in: 85.992% 0.2501 141.96;
    --su: 85.992% 0.2501 141.96;
    --wa: 94.951% 0.2024 106.97;
    --er: 62.994% 0.2502 25.07;
    --sc: 0.000% 0.0000 0.00;
    --ac: 0.000% 0.0000 0.00;
    --nc: 85.992% 0.2501 141.96;
    --inc: 0.000% 0.0000 0.00;
    --suc: 0.000% 0.0000 0.00;
    --wac: 0.000% 0.0000 0.00;
    --erc: 0.000% 0.0000 0.00;
    --rounded-box: 0;
    --rounded-btn: 0;
    --rounded-badge: 0;
    --tab-radius: 0;
}

/* Comet's beta design (ds.css) draws borders at 14 % of the text colour: on hacker's pure black that green line was
   all but invisible. Hacker gets the Super Tool's stronger lines instead: borders at the Super Tool's field-border
   strength, a brighter hover/focus line, and cards lifted a little off the black page. The extra "html" in the
   selector makes these win over ds.css, which is loaded after this file. */
html#theme-root[data-theme="hacker-rouge"],
html[data-theme="hacker-rouge"] {
    --ds-border:       color-mix(in oklch, oklch(var(--bc)) 30%, oklch(var(--b1)));
    --ds-border-hover: color-mix(in oklch, oklch(var(--bc)) 48%, oklch(var(--b1)));
    --ds-bg-1:         color-mix(in oklch, oklch(var(--bc)) 4%, oklch(var(--b1)));
    --ds-bg-2:         color-mix(in oklch, oklch(var(--bc)) 7%, oklch(var(--b1)));
    --ds-bg-3:         color-mix(in oklch, oklch(var(--bc)) 10%, oklch(var(--b1)));
    --ds-text-3:       oklch(var(--bc) / 0.72);
}
