/* Hide "Powered by Matrix" in the login page footer */
.mx_AuthFooter a[href*="matrix.org"] { display: none; }

/* Accounts are created by the company bot only (enable_registration: false). Element's welcome page shows
   "Create account" unconditionally; the login page link is hidden by UIFeature.registration in element-config.json. */
.mx_DefaultWelcome_buttons a[href="#/register"] { display: none; }

/* Larger welcome-page logo */
.mx_DefaultWelcome_logo img { height: 110px; width: auto; max-width: 90%; }

/* Footer link icons (website / phone / LinkedIn) */
.mx_AuthFooter a[href^="https://aicon.blue"],
.mx_AuthFooter a[href^="tel:"],
.mx_AuthFooter a[href*="linkedin.com"] {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
}
.mx_AuthFooter a[href^="https://aicon.blue"]::before,
.mx_AuthFooter a[href^="tel:"]::before,
.mx_AuthFooter a[href*="linkedin.com"]::before {
  content: ""; width: 18px; height: 18px; background: #0bc59e; flex: none;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat;
}
.mx_AuthFooter a:hover { text-decoration: underline; }
.mx_AuthFooter a[href^="https://aicon.blue"]::before { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%2210%22/%3E%3Cpath d=%22M2 12h20%22/%3E%3Cpath d=%22M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z%22/%3E%3C/svg%3E"); }
.mx_AuthFooter a[href^="tel:"]::before { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M22 16.92v3a2 2 0 0 1-2.18 2 19.8 19.8 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.8 19.8 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z%22/%3E%3C/svg%3E"); }
.mx_AuthFooter a[href*="linkedin.com"]::before { --ic: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22black%22%3E%3Cpath d=%22M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z%22/%3E%3C/svg%3E"); }

/* Login card: dark left panel matching the background, uniform rounded corners (square blur layer removed) */
.mx_AuthPage_modalBlur { display: none; }
.mx_AuthPage_modalContent {
  background: #242424;
  border: 1px solid rgba(11, 197, 158, 0.18);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(11, 197, 158, 0.08);
}
.mx_AuthHeader {
  background: radial-gradient(120% 90% at 0% 0%, rgba(11, 197, 158, 0.16) 0%, rgba(11, 197, 158, 0.04) 45%, rgba(10, 10, 10, 0) 80%), #1f1f1f;
}
.mx_AuthBody { border-radius: 0; }
.mx_AuthFooter { background-image: linear-gradient(rgba(22, 22, 22, 0), rgba(22, 22, 22, 0.55)); }

/* ==========================================================================
   AiCon dark theme palette - replaces Element's blue-tinted tokens.
   Neutral grays in 4 surface levels + brand green #0bc59e as the only accent.
     Surface 0  #161616 space bar / #1e1e1e room list
     Surface 1  #242424  timeline / main background
     Surface 2  #2e2e2e  raised elements (hover, badges, inputs)
     Surface 3  #383838  borders and dividers
   ========================================================================== */
.cpd-theme-dark.cpd-theme-dark {
  /* Surfaces */
  --cpd-color-bg-canvas-default: #1e1e1e;
  --cpd-color-bg-canvas-default-level-1: #242424;
  --cpd-color-bg-canvas-disabled: #202020;
  --cpd-color-bg-subtle-primary: #2e2e2e;
  --cpd-color-bg-subtle-secondary: #262626;
  --cpd-color-bg-subtle-secondary-level-0: #1e1e1e;
  --cpd-color-bg-subtle-tertiary: #1f1f1f;
  --cpd-color-bg-action-secondary-rest: #1e1e1e;
  --cpd-color-bg-action-tertiary-rest: #1e1e1e;
  --cpd-color-bg-action-tertiary-selected: #2e2e2e;
  --cpd-color-bg-action-primary-rest: #f0f0f0;
  --cpd-color-bg-action-primary-disabled: #525252;
  --cpd-color-bg-badge-default: #1e1e1e;
  --cpd-color-bg-badge-secondary: #2e2e2e;
  --cpd-color-bg-badge-primary: #f0f0f0;

  /* Text */
  --cpd-color-text-primary: #f0f0f0;
  --cpd-color-text-secondary: #a3a3a3;
  --cpd-color-text-disabled: #6e6e6e;
  --cpd-color-text-action-primary: #f0f0f0;
  --cpd-color-text-on-solid-primary: #141414;
  --cpd-color-icon-on-solid-primary: #141414;

  /* Brand green (replaces the default blue/green) */
  --cpd-color-bg-accent-rest: #0bc59e;
  --cpd-color-bg-accent-selected: #1f3b34;
  --cpd-color-bg-accent-subtle: #1a2f2a;
  --cpd-color-bg-badge-accent: #1f3b34;
  --cpd-color-bg-success-rest: #0bc59e;
  --cpd-color-bg-success-subtle: #1a2f2a;
  --cpd-color-text-action-accent: #0bc59e;
  --cpd-color-text-action-success: #0bc59e;
  --cpd-color-text-success-primary: #0bc59e;
  --cpd-color-text-badge-accent: #3fd9b4;
  --cpd-color-icon-accent-primary: #0bc59e;
  --cpd-color-icon-accent-tertiary: #08997b;
  --cpd-color-icon-success-primary: #0bc59e;
  --cpd-color-border-accent-primary: #0bc59e;
  --cpd-color-border-accent-subtle: #1f5a4b;
  --cpd-color-border-success-primary: #0bc59e;
  --cpd-color-border-success-subtle: #1f5a4b;
  --cpd-color-border-focused: #0bc59e;

  /* Links and info: teal instead of blue */
  --cpd-color-text-link-external: #3fd9b4;
  --cpd-color-text-info-primary: #3fd9b4;
  --cpd-color-text-badge-info: #3fd9b4;
  --cpd-color-icon-info-primary: #3fd9b4;
  --cpd-color-bg-info-subtle: #1a2f2a;
  --cpd-color-bg-badge-info: #1f3b34;
  --cpd-color-border-info-subtle: #1f5a4b;

  /* Borders */
  --cpd-color-border-disabled: #343434;
  --cpd-color-border-interactive-primary: #7a7a7a;
  --cpd-color-border-interactive-secondary: #3a3a3a;

  /* Icons */
  --cpd-color-icon-primary: #f0f0f0;
  --cpd-color-icon-secondary: #a3a3a3;
  --cpd-color-icon-tertiary: #7a7a7a;
  --cpd-color-icon-quaternary: #565656;
  --cpd-color-icon-disabled: #565656;
  --cpd-color-icon-primary-alpha: rgba(255, 255, 255, .95);
  --cpd-color-icon-secondary-alpha: rgba(255, 255, 255, .54);
  --cpd-color-icon-tertiary-alpha: rgba(255, 255, 255, .41);
  --cpd-color-icon-quaternary-alpha: rgba(255, 255, 255, .27);

  /* Neutral gray scale */
  --cpd-color-gray-100: #1a1a1a; --cpd-color-gray-200: #1e1e1e; --cpd-color-gray-300: #242424;
  --cpd-color-gray-400: #2e2e2e; --cpd-color-gray-500: #383838; --cpd-color-gray-600: #424242;
  --cpd-color-gray-700: #525252; --cpd-color-gray-800: #6e6e6e; --cpd-color-gray-900: #8c8c8c;
  --cpd-color-gray-1000: #9c9c9c; --cpd-color-gray-1100: #adadad; --cpd-color-gray-1200: #c4c4c4;
  --cpd-color-gray-1300: #dcdcdc; --cpd-color-gray-1400: #f0f0f0;

  /* hover/pressed alphas: neutral white instead of blue-tinted */
  --cpd-color-alpha-gray-100: rgba(255, 255, 255, .02); --cpd-color-alpha-gray-200: rgba(255, 255, 255, .04);
  --cpd-color-alpha-gray-300: rgba(255, 255, 255, .06); --cpd-color-alpha-gray-400: rgba(255, 255, 255, .10);
  --cpd-color-alpha-gray-500: rgba(255, 255, 255, .15); --cpd-color-alpha-gray-600: rgba(255, 255, 255, .20);
  --cpd-color-alpha-gray-700: rgba(255, 255, 255, .27); --cpd-color-alpha-gray-800: rgba(255, 255, 255, .41);
  --cpd-color-alpha-gray-900: rgba(255, 255, 255, .54); --cpd-color-alpha-gray-1000: rgba(255, 255, 255, .61);
  --cpd-color-alpha-gray-1100: rgba(255, 255, 255, .68); --cpd-color-alpha-gray-1200: rgba(255, 255, 255, .79);
  --cpd-color-alpha-gray-1300: rgba(255, 255, 255, .89); --cpd-color-alpha-gray-1400: rgba(255, 255, 255, .95);
}

/* Legacy theme variables Element does not define for custom themes (left empty, elements became invisible) */
.cpd-theme-dark.cpd-theme-dark {
  --timeline-text-secondary-color: #a3a3a3;
  --timeline-highlights-color: #2e2e2e;
  --menu-selected-color: #2e2e2e;
  --focus-bg-color: #2e2e2e;
  --eventbubble-bg-hover: #2a2a2a;
  --eventbubble-others-bg: #2e2e2e;
  --eventbubble-self-bg: #1f3b34;
  --secondary-hairline-color: #343434;
  --strong-input-border-color: #7a7a7a;
  --icon-button-color: #a3a3a3;
  --roomtile-default-badge-bg-color: #0bc59e;
  --other-user-pill-bg-color: rgba(11, 197, 158, .2);
  --accent-color-300: #1f3b34;
  --accent-color-400: #1a2f2a;
  --accent-color-1000: #3fd9b4;
  --links: #3fd9b4;
  --alert: #ff5f57;
}

/* Disabled dialog buttons (e.g. Continue): dark text on transparent background was unreadable */
.mx_Dialog button.mx_LegacyDialogButton:disabled,
.mx_Dialog input.mx_LegacyDialogButton[type=submit]:disabled {
  background-color: #2e2e2e;
  border-color: #383838;
  color: #8c8c8c;
  opacity: 1;
}

/* Surface gradient: space bar (darkest) -> room list -> timeline (lightest) */
.mx_SpacePanel { background-color: #161616; }
