/* Managed by orbitx.chat (roles/chat/files/brand/orbitx.css). The OrbitX brand over
 * Element Web 1.12, linked from its index.html, which the role writes from the image's own
 * at each run.
 *
 * Element Web draws with Compound, its design system: the colours and the typeface of the
 * interface are --cpd-* custom properties. This sheet gives some of them the OrbitX values
 * (orbitx-patchwork's design tokens: OrbitX Blue #0500D8 and its ramp, Readex Pro), and
 * Element Web's own light and dark themes do the rest.
 *
 * - Changed: the accent, green in Element (selected items, switches, badges, accent text
 *   and icons); the main buttons, near black in Element, in OrbitX Blue, the colour of main
 *   actions; the focus ring and links; the typeface; on the dark theme, the sign-in page's
 *   logo. Success stays green and critical red.
 * - Each theme has its values. On dark, the fills are tonal under a near-black label
 *   (orbitx-patchwork DESIGN.md §3.8). The high-contrast theme keeps Element's own.
 * - Element's declarations sit in cascade layers, which a rule outside any layer outranks;
 *   :root also raises the specificity, should a later release drop the layers.
 */

/* Readex Pro: one variable file per subset, as the OrbitX Keycloak theme ships it (OFL,
   fonts/readex-pro/LICENSE.txt); a page downloads only the subsets it shows. */
@font-face { font-family: "Readex Pro"; font-style: normal; font-display: swap; font-weight: 160 700; src: url("fonts/readex-pro/readex-pro-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: "Readex Pro"; font-style: normal; font-display: swap; font-weight: 160 700; src: url("fonts/readex-pro/readex-pro-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Readex Pro"; font-style: normal; font-display: swap; font-weight: 160 700; src: url("fonts/readex-pro/readex-pro-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Readex Pro"; font-style: normal; font-display: swap; font-weight: 160 700; src: url("fonts/readex-pro/readex-pro-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }

/* Every theme, high contrast included. Compound's own fallbacks follow Readex Pro. A
   person's own choice of font (Settings, Appearance) still wins: Element sets it on the
   page's body itself. */
:root,
:root [class*="cpd-theme-"] {
  --cpd-font-family-sans: "Readex Pro", Inter, "Helvetica Neue", "Segoe UI", Roboto, Ubuntu, "Fira Sans", "Noto Sans", Arial, sans-serif;
}

/* Light: OrbitX Blue (brand-500) for accent and actions, darker steps on hover and press,
   Electric Blue (brand-400) for the focus ring. The transparent steps keep Element's
   opacities. */
:root .cpd-theme-light {
  --cpd-color-text-action-accent: #0500d8;
  --cpd-color-text-link-external: #0500d8;
  --cpd-color-bg-action-primary-rest: #0500d8;
  --cpd-color-bg-action-primary-hovered: #0400b3;
  --cpd-color-bg-action-primary-pressed: #03008f;
  --cpd-color-bg-accent-rest: #0500d8;
  --cpd-color-bg-accent-hovered: #0400b3;
  --cpd-color-bg-accent-pressed: #03008f;
  --cpd-color-bg-accent-selected: #0500d81c;
  --cpd-color-bg-accent-subtle: #f5f5f9;
  --cpd-color-bg-badge-accent: #c9c7fa;
  --cpd-color-text-badge-accent: #03008f;
  --cpd-color-border-accent-subtle: #6d6af0;
  --cpd-color-border-accent-primary: #0500d8;
  --cpd-color-border-focused: #3b36e6;
  --cpd-color-icon-accent-tertiary: #3b36e6;
  --cpd-color-icon-accent-primary: #0500d8;
  --cpd-color-gradient-action-stop1: #8c89f4;
  --cpd-color-gradient-action-stop2: #6d6af0;
  --cpd-color-gradient-action-stop3: #0500d8;
  --cpd-color-gradient-action-stop4: #03008f;
  --cpd-color-gradient-subtle-stop1: #0500d869;
  --cpd-color-gradient-subtle-stop2: #0500d83b;
  --cpd-color-gradient-subtle-stop3: #0500d81c;
  --cpd-color-gradient-subtle-stop4: #0500d80f;
  --cpd-color-gradient-subtle-stop5: #0500d808;
}

/* Dark: tonal fills, brand-250 (lighter on hover and press) under Element's near-black
   label, 6.2:1 on its canvas; dark brand steps for subtle surfaces. */
:root .cpd-theme-dark {
  --cpd-color-text-action-accent: #8c89f4;
  --cpd-color-text-link-external: #8c89f4;
  --cpd-color-bg-action-primary-rest: #8c89f4;
  --cpd-color-bg-action-primary-hovered: #aaa8f7;
  --cpd-color-bg-action-primary-pressed: #c9c7fa;
  --cpd-color-bg-accent-rest: #8c89f4;
  --cpd-color-bg-accent-hovered: #aaa8f7;
  --cpd-color-bg-accent-pressed: #c9c7fa;
  --cpd-color-bg-accent-selected: #0b0a34;
  --cpd-color-bg-accent-subtle: #090821;
  --cpd-color-bg-badge-accent: #0c0a48;
  --cpd-color-text-badge-accent: #aaa8f7;
  --cpd-color-border-accent-subtle: #0400b3;
  --cpd-color-border-accent-primary: #8c89f4;
  --cpd-color-border-focused: #6d6af0;
  --cpd-color-icon-accent-tertiary: #6d6af0;
  --cpd-color-icon-accent-primary: #8c89f4;
  --cpd-color-gradient-action-stop1: #0300a1;
  --cpd-color-gradient-action-stop2: #3b36e6;
  --cpd-color-gradient-action-stop3: #8c89f4;
  --cpd-color-gradient-action-stop4: #c9c7fa;
  --cpd-color-gradient-subtle-stop1: #0c0a48;
  --cpd-color-gradient-subtle-stop2: #0b0a34;
  --cpd-color-gradient-subtle-stop3: #0b0a34;
  --cpd-color-gradient-subtle-stop4: #090821;
  --cpd-color-gradient-subtle-stop5: #090821;
}

/* The sign-in page's logo: config.json names the light one, whose dark letters vanish on
   the dark theme's panel. There the same box shows the dark one; the image stays, unseen,
   so that the box keeps its size. */
:root .cpd-theme-dark .mx_AuthHeaderLogo {
  background: url("orbichat-logo-dark.svg") top center / contain no-repeat content-box;
}

:root .cpd-theme-dark .mx_AuthHeaderLogo img {
  visibility: hidden;
}
