/*
 * doom-one for Forgejo (SMP Sales).
 *
 * Built on Forgejo's own dark theme: that file supplies every rule, this one
 * only swaps the palette for doom-one's (github.com/doomemacs/themes,
 * themes/doom-one-theme.el) and adds the SMP Finder sign-in page.
 *
 * doom-one: bg #282c34  bg-alt #21242b  base0 #1B2229  base1 #1c1f24
 *   base2 #202328  base3 #23272e  base4 #3f444a  base5 #5B6268  base6 #73797e
 *   base7 #9ca0a4  base8 #DFDFDF  fg #bbc2cf
 *   red #ff6c6b  orange #da8548  green #98be65  teal #4db5bd  yellow #ECBE7B
 *   blue #51afef  dark-blue #2257A0  magenta #c678dd  violet #a9a1e1
 *   cyan #46D9FF  dark-cyan #5699AF
 */
@import url("./theme-forgejo-dark.css");

:root {
  /* Forgejo's grey ramp, rebuilt from doom-one's bases (900 darkest). */
  --steel-900: #1b2229;
  --steel-850: #1c1f24;
  --steel-800: #21242b;
  --steel-750: #282c34;
  --steel-700: #2e323b;
  --steel-650: #353a43;
  --steel-600: #3f444a;
  --steel-550: #464b52;
  --steel-500: #50565d;
  --steel-450: #5b6268;
  --steel-400: #676d73;
  --steel-350: #73797e;
  --steel-300: #7f8489;
  --steel-250: #8a8f94;
  --steel-200: #9ca0a4;
  --steel-150: #aab0bb;
  --steel-100: #bbc2cf;

  /* Accent: doom-one blue. "dark-N" are lighter in dark themes. */
  --color-primary: #51afef;
  --color-primary-contrast: #1b2229;
  --color-primary-dark-1: #6ebcf2;
  --color-primary-dark-2: #8ac9f4;
  --color-primary-dark-3: #a3d4f6;
  --color-primary-dark-4: #b9def8;
  --color-primary-dark-5: #cfe8fa;
  --color-primary-dark-6: #e2f1fc;
  --color-primary-dark-7: #f2f9fe;
  --color-primary-light-1: #3ea2e8;
  --color-primary-light-2: #2c8fd6;
  --color-primary-light-3: #2a7cc0;
  --color-primary-light-4: #2368aa;
  --color-primary-light-5: #2257a0;
  --color-primary-light-6: #1d4a87;
  --color-primary-light-7: #183d70;
  --color-primary-alpha-10: #51afef19;
  --color-primary-alpha-20: #51afef33;
  --color-primary-alpha-30: #51afef4b;
  --color-primary-alpha-40: #51afef66;
  --color-primary-alpha-50: #51afef80;
  --color-primary-alpha-60: #51afef99;
  --color-primary-alpha-70: #51afefb3;
  --color-primary-alpha-80: #51afefcc;
  --color-primary-alpha-90: #51afefe1;

  --color-secondary-alpha-10: #3f444a19;
  --color-secondary-alpha-20: #3f444a33;
  --color-secondary-alpha-30: #3f444a4b;
  --color-secondary-alpha-40: #3f444a66;
  --color-secondary-alpha-50: #3f444a80;
  --color-secondary-alpha-60: #3f444a99;
  --color-secondary-alpha-70: #3f444ab3;
  --color-secondary-alpha-80: #3f444acc;
  --color-secondary-alpha-90: #3f444ae1;

  /* Named colours. The plain ones fill buttons and labels under white text,
     so they're doom-one's hues darkened; "-light" are doom-one's own, used
     for text and icons. */
  --color-red: #c94a4a;
  --color-orange: #b06a35;
  --color-yellow: #a98232;
  --color-olive: #7f9a45;
  --color-green: #5f8a2e;
  --color-teal: #35858c;
  --color-blue: #2f80c4;
  --color-violet: #6f66c0;
  --color-purple: #9a4fb3;
  --color-pink: #b24d8a;
  --color-black: #1b2229;
  --color-red-light: #ff6c6b;
  --color-orange-light: #da8548;
  --color-yellow-light: #ecbe7b;
  --color-olive-light: #b5c97a;
  --color-green-light: #98be65;
  --color-teal-light: #4db5bd;
  --color-blue-light: #51afef;
  --color-violet-light: #a9a1e1;
  --color-purple-light: #c678dd;
  --color-pink-light: #dc8cc3;
  --color-black-light: #23272e;
  --color-red-dark-1: #b53f40;
  --color-orange-dark-1: #9c5d2e;
  --color-yellow-dark-1: #96732b;
  --color-olive-dark-1: #6f883c;
  --color-green-dark-1: #537a27;
  --color-teal-dark-1: #2e757b;
  --color-blue-dark-1: #2870ae;
  --color-violet-dark-1: #6159ad;
  --color-purple-dark-1: #88449f;
  --color-pink-dark-1: #9e437a;
  --color-black-dark-1: #161b21;
  --color-red-dark-2: #a03637;
  --color-orange-dark-2: #885027;
  --color-yellow-dark-2: #826425;
  --color-olive-dark-2: #607634;
  --color-green-dark-2: #476a21;
  --color-teal-dark-2: #27656a;
  --color-blue-dark-2: #2257a0;
  --color-violet-dark-2: #544d98;
  --color-purple-dark-2: #763a8b;
  --color-pink-dark-2: #8a3a6a;
  --color-black-dark-2: #12161b;

  /* Terminal colours, as doom-one sets them for vterm/ansi-color. */
  --color-console-fg: #bbc2cf;
  --color-console-fg-subtle: #73797e;
  --color-console-bg: #1b2229;
  --color-console-border: #3f444a;
  --color-console-active-bg: #3f444a;
  --color-console-menu-bg: #23272e;
  --color-console-menu-border: #5b6268;
  --color-ansi-black: #1b2229;
  --color-ansi-red: #ff6c6b;
  --color-ansi-green: #98be65;
  --color-ansi-yellow: #ecbe7b;
  --color-ansi-blue: #51afef;
  --color-ansi-magenta: #c678dd;
  --color-ansi-cyan: #46d9ff;
  --color-ansi-bright-black: #5b6268;
  --color-ansi-bright-red: #ff8b8a;
  --color-ansi-bright-green: #aecb85;
  --color-ansi-bright-yellow: #f2d09f;
  --color-ansi-bright-blue: #7cc2f3;
  --color-ansi-bright-magenta: #d498e5;
  --color-ansi-bright-cyan: #74e2ff;

  /* Diffs and messages: doom-one's red/green/yellow/blue mixed into bg. */
  --color-diff-removed-word-bg: #6a3539;
  --color-diff-added-word-bg: #44582f;
  --color-diff-removed-row-bg: #3a2a30;
  --color-diff-moved-row-bg: #4a3f2a;
  --color-diff-added-row-bg: #2c3529;
  --color-diff-removed-row-border: #6a3539;
  --color-diff-moved-row-border: #8a6d3a;
  --color-diff-added-row-border: #44582f;
  --color-error-border: #6a3539;
  --color-error-bg: #44292d;
  --color-error-bg-active: #6a3539;
  --color-error-bg-hover: #6a3539;
  --color-error-text: #ffc9c8;
  --color-success-border: #4f6a32;
  --color-success-bg: #2f3d27;
  --color-success-text: #c8e2a6;
  --color-warning-border: #8a6d3a;
  --color-warning-bg: #4a3e28;
  --color-warning-text: #ecbe7b;
  --color-info-border: #2a7cc0;
  --color-info-bg: #233a52;
  --color-info-text: #bbc2cf;
  --color-red-badge: #ff6c6b;
  --color-red-badge-bg: #ff6c6b22;
  --color-red-badge-hover-bg: #ff6c6b44;
  --color-green-badge: #98be65;
  --color-green-badge-bg: #98be6522;
  --color-green-badge-hover-bg: #98be6544;
  --color-yellow-badge: #ecbe7b;
  --color-yellow-badge-bg: #ecbe7b22;
  --color-yellow-badge-hover-bg: #ecbe7b44;
  --color-orange-badge: #da8548;
  --color-orange-badge-bg: #da854822;
  --color-orange-badge-hover-bg: #da854844;

  /* Surfaces: editor bg for boxes and code, bg-alt for the page. */
  --color-body: #21242b;
  --color-box-body: #282c34;
  --color-box-header: #23272e;
  --color-box-body-highlight: #2e323b;
  --color-text-dark: #dfdfdf;
  --color-text-focus: #dfdfdf;
  --color-footer: #1b2229;
  --color-header-wrapper: #1c1f24;
  --color-header-wrapper-transparent: #1c1f2400;
  --color-nav-bg: #1b2229;
  --color-code-bg: #282c34;
  --color-markup-code-block: #23272e;
  --color-markup-code-inline: #1c1f24;
  --color-expand-button: #3f444a;
  --color-editor-line-highlight: #2e323b;
  --color-tooltip-bg: #1b2229f0;
  --color-tooltip-text: #dfdfdf;
  --color-selection-bg: #42444a;
  --color-selection-fg: #dfdfdf;
  --color-indicator-active: #51afef;
  --color-indicator-active-20: #51afef33;
  --color-indicator-idle: #98be65;
  --color-indicator-idle-20: #98be651a;
}

/* Code: doom-one's font-lock faces. */
.chroma .c, .chroma .c1, .chroma .ch, .chroma .cm, .chroma .cs { color: #5b6268; }
.chroma .cp, .chroma .cpf { color: #c678dd; }
.chroma .k, .chroma .kd, .chroma .kn, .chroma .kp, .chroma .kr { color: #51afef; }
.chroma .kc { color: #a9a1e1; }
.chroma .kt { color: #ecbe7b; }
.chroma .m, .chroma .mb, .chroma .mf, .chroma .mh, .chroma .mi, .chroma .il, .chroma .mo { color: #da8548; }
.chroma .s, .chroma .s1, .chroma .s2, .chroma .sa, .chroma .sb, .chroma .sc, .chroma .dl, .chroma .sh, .chroma .sx { color: #98be65; }
.chroma .sd { color: #83898d; }
.chroma .se, .chroma .si, .chroma .sr, .chroma .ss { color: #46d9ff; }
.chroma .n, .chroma .nx, .chroma .p { color: #bbc2cf; }
.chroma .na { color: #ecbe7b; }
.chroma .nb, .chroma .bp { color: #c678dd; }
.chroma .nc, .chroma .ne, .chroma .nn { color: #ecbe7b; }
.chroma .nd { color: #c678dd; }
.chroma .nf, .chroma .fm { color: #c678dd; }
.chroma .ni, .chroma .nl { color: #da8548; }
.chroma .no { color: #a9a1e1; }
.chroma .nt { color: #ff6c6b; }
.chroma .nv, .chroma .vc, .chroma .vg, .chroma .vi, .chroma .vm { color: #dcaeea; }
.chroma .o, .chroma .ow { color: #51afef; }
.chroma .err { color: #ff6c6b; }
.chroma .gh, .chroma .gu { color: #51afef; }
.chroma .gd { color: #ff6c6b; background-color: #3a2a30; }
.chroma .gi { color: #98be65; background-color: #2c3529; }
.chroma .ge { color: #c678dd; }
.chroma .gs { color: #dfdfdf; }
.chroma .go, .chroma .gp { color: #73797e; }

/* Sign-in: the SMP Finder wallpaper full-bleed, its SF mark left clear and
   the sign-in card glassed over the dark band at the bottom. */
.page-content.user.signin {
  min-height: calc(100vh - 7rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 6vh;
  background:
    linear-gradient(to bottom, #1b222900 55%, #1b2229cc 100%),
    url("../img/signin-bg.webp") center 65% / cover no-repeat;
}
.page-content.user.signin > .ui.page.grid { width: 100%; margin: 0; }
.page-content.user.signin .ui.attached.header,
.page-content.user.signin .ui.attached.segment {
  background-color: #21242bb8;
  border-color: #ffffff1a;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.full.height:has(.page-content.user.signin) { padding-bottom: 0; }
