/**
 * Geek-tik brand skin for Cinny (dark theme).
 *
 * Overrides Cinny v4.x dark theme CSS variables (vanilla-extract hashes from
 * ghcr.io/cinnyapp/cinny:latest as of 2026-07). After upgrading the Cinny
 * image, re-check hashes in assets/*.css if colors stop applying.
 *
 * Site tokens (apps/web globals.css):
 *   surface #0d1117 | frost #161b22 | sage #21262d | edge #30363d
 *   ink #e6edf3 | muted #8b949e | vivid #00e785 | accent #3fb950
 */
.dark-theme {
  /* User / link accents (stable tokens) */
  --tc-link: #00e785;
  --mx-uc-1: #00e785;
  --mx-uc-2: #3fb950;
  --mx-uc-3: #7ee787;
  --mx-uc-4: #56d364;
  --mx-uc-5: #2ea043;
  --mx-uc-6: #238636;
  --mx-uc-7: #3fb950;
  --mx-uc-8: #00e785;

  /* Background */
  --oq6d070: #0d1117;
  --oq6d071: #161b22;
  --oq6d072: #21262d;
  --oq6d073: #30363d;
  --oq6d074: #e6edf3;

  /* Surface */
  --oq6d075: #161b22;
  --oq6d076: #21262d;
  --oq6d077: #30363d;
  --oq6d078: #3d444d;
  --oq6d079: #e6edf3;

  /* SurfaceVariant */
  --oq6d07a: #21262d;
  --oq6d07b: #30363d;
  --oq6d07c: #3d444d;
  --oq6d07d: #484f58;
  --oq6d07e: #e6edf3;

  /* Primary → vivid mint */
  --oq6d07f: #00e785;
  --oq6d07g: #00d47a;
  --oq6d07h: #00c070;
  --oq6d07i: #00a862;
  --oq6d07j: #0d1117;
  --oq6d07k: #123528;
  --oq6d07l: #164032;
  --oq6d07m: #1a4c3b;
  --oq6d07n: #1f5744;
  --oq6d07o: #7ee787;

  /* Secondary → soft ink (was pure white CTA) */
  --oq6d07p: #e6edf3;
  --oq6d07q: #d0d7de;
  --oq6d07r: #b1bac4;
  --oq6d07s: #8b949e;
  --oq6d07t: #0d1117;
  --oq6d07u: #30363d;
  --oq6d07v: #3d444d;
  --oq6d07w: #484f58;
  --oq6d07x: #545d68;
  --oq6d07y: #e6edf3;

  /* Success → accent green */
  --oq6d07z: #3fb950;
  --oq6d0710: #56d364;
  --oq6d0711: #3fb950;
  --oq6d0712: #2ea043;
  --oq6d0713: #0d1117;
  --oq6d0714: #1a3d24;
  --oq6d0715: #1f4a2b;
  --oq6d0716: #245632;
  --oq6d0717: #296238;
  --oq6d0718: #aff5b4;

  --oq6d071t: rgba(0, 231, 133, 0.45);
  --oq6d071u: rgba(0, 0, 0, 0.85);
  --oq6d071v: rgba(13, 17, 23, 0.72);
}

/* Butter shares the same user-color tokens when selected as dark alt */
.butter-theme {
  --tc-link: #00e785;
  --mx-uc-1: #00e785;
  --mx-uc-2: #3fb950;
  --mx-uc-3: #7ee787;
  --mx-uc-4: #56d364;
  --mx-uc-5: #2ea043;
  --mx-uc-6: #238636;
  --mx-uc-7: #3fb950;
  --mx-uc-8: #00e785;
}

/* Soften room chrome to match site surface */
.dark-theme,
.butter-theme {
  color-scheme: dark;
}

html.dark-theme,
html:has(.dark-theme),
body:has(.dark-theme) {
  background-color: #0d1117;
}

/* Membership is managed by geek-tik — hide Cinny invite CTA if script misses it */
button[hidden] {
  display: none !important;
}

/* Room chrome not needed in team embed */
button[aria-label="More Options"],
button[aria-controls^="menu-"] {
  display: none !important;
}

/* Read-receipt bar under composer — can open profiles / leave team room */
button[data-gtk-hide-following="1"] {
  display: none !important;
}

/* Message Search filters (scope / other rooms) — team embed is one room */
[data-gtk-hide-search-filter="1"] {
  display: none !important;
}

/* Injected exit from Message Search when Cinny has no desktop back button */
button[data-gtk-search-back="inject"] {
  display: inline-flex !important;
  align-items: center;
  margin: 0.5rem 0.75rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid #30363d;
  border-radius: 9999px;
  background: transparent;
  color: #00e785;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}

button[data-gtk-search-back="inject"]:hover {
  border-color: rgba(0, 231, 133, 0.45);
}
