/*
 * CaptiFi theme for sign.captifi.io (Documenso).
 * nginx serves this file from /var/www/captifi-brand and links it into every HTML page, after
 * Documenso's own stylesheet. Colours are Documenso's HSL theme variables set to the CaptiFi
 * brand tokens (Brand Identity/09_Design_Tokens/captifi-tokens.css):
 *   navy #023047 ink, deep teal #17798F the one accent, line #E1E8EE, cloud #F4F7F9,
 *   mist #5B7083 secondary text, teal tint #E6F3F7, DM Sans.
 * Plain UI: white ground, one flat accent, no gradients, no shadows at rest.
 */

@font-face {
  font-family: 'DM Sans';
  src: url('/captifi-brand/DMSans-Variable.woff2') format('woff2');
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('/captifi-brand/DMSans-Italic-Variable.woff2') format('woff2');
  font-weight: 100 1000;
  font-style: italic;
  font-display: swap;
}

/* Light theme, and the light theme Documenso forces on some recipient pages. */
:root,
.dark-mode-disabled {
  --font-sans: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --background: 0 0% 100%;
  --foreground: 200 95% 14%;
  --muted: 204 30% 97%;
  --muted-foreground: 209 18% 44%;
  --popover: 0 0% 100%;
  --popover-foreground: 200 95% 14%;
  --card: 0 0% 100%;
  --card-foreground: 200 95% 14%;
  --card-border: 207 28% 91%;
  --card-border-tint: 225 232 238;
  --border: 207 28% 91%;
  --input: 208 22% 83%;
  --primary: 191 72% 33%;
  --primary-foreground: 0 0% 100%;
  --secondary: 194 52% 94%;
  --secondary-foreground: 200 95% 14%;
  --accent: 204 30% 97%;
  --accent-foreground: 200 95% 14%;
  --ring: 191 72% 33%;
  --widget: 204 30% 97%;
  --field-card: 194 52% 94%;
  --field-card-border: 191 72% 33%;
  --field-card-foreground: 200 95% 14%;

  /* Documenso's own green scale, used by a few utility classes, mapped onto the CaptiFi teal scale. */
  --documenso-50: #F4FAFC;
  --documenso-100: #E9F6FA;
  --documenso-200: #D3EDF5;
  --documenso-300: #A7DBEA;
  --documenso-400: #6FC3DA;
  --documenso-500: #17798F;
  --documenso-600: #146B7E;
  --documenso-700: #0D566C;
  --documenso-800: #094356;
  --documenso-900: #053749;
  --documenso-950: #023047;
  --documenso: #17798F;
}

/* Dark theme (staff pages follow the device setting): keep Documenso's dark ground, swap the green for CaptiFi teal. */
.dark:not(.dark-mode-disabled) {
  --font-sans: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --primary: 191 72% 33%;
  --primary-foreground: 0 0% 100%;
  --ring: 192 70% 43%;
  --secondary-foreground: 191 62% 69%;
  --accent-foreground: 191 62% 69%;
  --card-border-tint: 71 71 71;
}

html,
body {
  font-family: var(--font-sans);
}


/* Documenso's green utility classes, mapped to the CaptiFi teal scale (generated from its app.css, v2.21.1). */
.border-documenso-300{border-color:rgb(211 237 245 / var(--tw-border-opacity, 1))}
.bg-documenso{background-color:rgb(111 195 218 / var(--tw-bg-opacity, 1))}
.bg-documenso-200{background-color:rgb(233 246 250 / var(--tw-bg-opacity, 1))}
.text-documenso{color:rgb(23 121 143 / var(--tw-text-opacity, 1))}
.text-documenso-700{color:rgb(23 121 143 / var(--tw-text-opacity, 1))}
.text-documenso-800{color:rgb(20 107 126 / var(--tw-text-opacity, 1))}
.text-documenso-900{color:rgb(13 86 108 / var(--tw-text-opacity, 1))}
.hover\:text-documenso-600:hover{color:rgb(33 158 188 / var(--tw-text-opacity, 1))}
.group:hover .group-hover\:bg-documenso{background-color:rgb(111 195 218 / var(--tw-bg-opacity, 1))}
.group:hover .group-hover\:text-documenso{color:rgb(23 121 143 / var(--tw-text-opacity, 1))}
.data-\[state\=checked\]\:bg-documenso[data-state=checked]{background-color:rgb(111 195 218 / var(--tw-bg-opacity, 1))}
.dark\:bg-documenso:is(.dark:not(.dark-mode-disabled) *){background-color:rgb(111 195 218 / var(--tw-bg-opacity, 1))}

/* Field outlines and the signer's colour on the document: CaptiFi teal instead of green. */
:root,
.dark-mode-disabled,
.dark:not(.dark-mode-disabled) {
  --recipient-green: 191 72% 33%;
}

/* Plain UI: no decorative mesh behind the sign-in and sign-up forms. */
img[src*="background-pattern"] {
  display: none;
}

/* Plain UI: the floating signing panel on phones and other large shadows get a light navy shadow. */
.shadow-2xl {
  --tw-shadow: 0 -2px 12px rgb(2 48 71 / 0.08);
  --tw-shadow-colored: 0 -2px 12px var(--tw-shadow-color);
}

/* Plain UI: no celebration mesh on the "Document Signed" page and no sheen gradient on cards. */
img[src*="signing-celebration"] {
  display: none;
}
[class*="--sheen-color"] {
  background-image: none !important;
}
