/*
 * StinkySocks Hockey theme for Documenso (self-hosted v1.5.x / v1.8.x).
 * Injected by nginx sub_filter just before </head>; loaded after Documenso's own CSS.
 * Colors sampled 2026-11-17 from https://www.stinkysocks.net/ui/css/style.css:
 *   red #bd0015 (header, buttons, links)   navy #002b4c (headings)   dark blue #082153 (hover)
 * Documenso uses shadcn HSL variables: "H S% L%" with no hsl() wrapper.
 * #ff4b3c is NOT a site brand color: it is a lighter red derived for the dark theme so red text and
 * the focus ring reach 4.5:1 on the dark surface (#bd0015 on #262626 is only 2.29:1).
 * Rollback: remove the sub_filter lines and the /__ssh-theme.css location from the nginx vhost.
 */

:root {
  --ssh-brand: 189 0 21;                       /* #bd0015, rgb triple for the green utilities */
  --primary: 353.3 100% 37.1%;                 /* #bd0015 */
  --primary-foreground: 0 0% 100%;             /* white on red: 6.62:1 */
  --ring: 353.3 100% 37.1%;
  --foreground: 206.1 100% 14.9%;              /* #002b4c navy text */
  --card-foreground: 206.1 100% 14.9%;
  --popover-foreground: 206.1 100% 14.9%;
  --secondary-foreground: 206.1 100% 14.9%;
  --accent-foreground: 206.1 100% 14.9%;
  --field-card: 353 100% 95%;                  /* pale red tint for placed fields */
  --field-card-border: 353.3 100% 37.1%;
  --field-card-foreground: 206.1 100% 14.9%;
  --card-border-tint: 189 0 21;                /* was the green rgb triple */
  --muted-foreground: 215.4 16.3% 40%;         /* stock 46.9% is 4.36:1 on #f5f5f5; this is about 5.5:1 */
}

/* Same specificity as :root and loaded later, so the dark text colors must be restored here
   (navy on #262626 measured 1.04:1 without this). Values are Documenso's stock dark values. */
.dark {
  --foreground: 0 0% 97%;
  --card-foreground: 0 0% 95%;
  --popover-foreground: 0 0% 90%;
  --muted-foreground: 0 0% 85%;
  --ssh-brand: 255 75 60;                      /* #ff4b3c, derived */
  --primary: 4.6 100% 61.8%;
  --primary-foreground: 0 0% 9%;               /* near-black on light red: about 6:1 */
  --ring: 4.6 100% 61.8%;
  --secondary-foreground: 4.6 100% 75%;        /* about #ff897f, 4.83:1 on #3c3c3c */
  --accent-foreground: 4.6 100% 75%;
  --card-border-tint: 255 75 60;
}

/* Documenso hardcodes its green in a few utilities; point them at the brand variable. */
.bg-documenso,
.bg-documenso-500,
.group:hover .group-hover\:bg-documenso,
:is(.dark .dark\:bg-documenso) {
  background-color: rgb(var(--ssh-brand)) !important;
}
.text-documenso,
.text-documenso-700,
.text-documenso-800,
.hover\:text-documenso-600:hover,
.group:hover .group-hover\:text-documenso {
  color: rgb(var(--ssh-brand)) !important;
}
.group:hover .group-hover\:border-documenso\/80,
.group[data-selected] .group-data-\[selected\]\:border-documenso {
  border-color: rgb(var(--ssh-brand)) !important;
}
/* Primary button hover: brand dark blue (light theme). Dark theme keeps its opacity hover. */
.hover\:bg-primary\/90:hover {
  background-color: #082153;
}
/* The faint green background mesh is an image; desaturate it. Untested before deploy. */
img[src*="background-pattern"] {
  filter: grayscale(1);
}
.bg-documenso-200 {
  background-color: rgb(253 224 227) !important;   /* pale red tint, replaces pale green */
}
