@import "https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&family=Saira:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap";

html[data-ui-whatsynaptor="active"] {
  --bg: #12141a !important;
  --bg-accent: #14161d !important;
  --bg-elevated: #1a1d25 !important;
  --bg-hover: #262a35 !important;
  --bg-muted: #262a35 !important;
  --card: #181b22 !important;
  --card-foreground: #f4f4f5 !important;
  --popover: #181b22 !important;
  --popover-foreground: #f4f4f5 !important;
  --panel: #12141a !important;
  --panel-strong: #1a1d25 !important;
  --panel-hover: #262a35 !important;
  --chrome: rgba(18, 20, 26, 0.95) !important;
  --chrome-strong: rgba(18, 20, 26, 0.98) !important;
  --text: #e4e4e7 !important;
  --text-strong: #fafafa !important;
  --chat-text: #e4e4e7 !important;
  --muted: #71717a !important;
  --muted-strong: #52525b !important;
  --muted-foreground: #71717a !important;
  --border: #27272a !important;
  --border-strong: #3f3f46 !important;
  --border-hover: #52525b !important;
  --input: #27272a !important;
  --accent: var(--ui-brand-accent, var(--accent));
  --primary: var(--ui-brand-accent, var(--primary));
  --ring: var(--ui-brand-accent, var(--ring));
  --accent-hover: var(--ui-brand-accent-hover, var(--accent-hover));
  --accent-muted: var(--ui-brand-accent, var(--accent-muted));
  --accent-glow: var(--ui-brand-accent-glow, var(--accent-glow));
  --focus: color-mix(in srgb, var(--ui-brand-accent, var(--ring)) 20%, transparent);
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 3px color-mix(in srgb, var(--ui-brand-accent, var(--ring)) 70%, transparent);
  --font-body: var(--ui-brand-font-body, var(--font-body));
  --font-display: var(--ui-brand-font-display, var(--font-display));
}

html[data-ui-whatsynaptor="active"] body {
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--ui-brand-accent-glow, transparent) 72%, transparent), transparent 28%),
    var(--bg);
}

html[data-ui-whatsynaptor="active"] .login-gate__header {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

html[data-ui-whatsynaptor="active"] .login-gate__logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

html[data-ui-whatsynaptor="active"] .login-gate__title {
  font-family: "Saira", var(--ui-brand-font-display, var(--font-display));
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-strong);
  text-transform: none;
}

html[data-ui-whatsynaptor="active"] .login-gate__sub {
  font-family: "Manrope", var(--ui-brand-font-body, var(--font-body));
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
  color: var(--muted);
  text-transform: uppercase;
}

html[data-ui-whatsynaptor="active"] .topbar-video-layer,
html[data-ui-whatsynaptor="active"] .ui-whatsynaptor-topbar-video-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  clip-path: inset(0);
  contain: paint;
  pointer-events: none;
}

html[data-ui-whatsynaptor="active"] .topbar-video,
html[data-ui-whatsynaptor="active"] .ui-whatsynaptor-topbar-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
  filter: brightness(.9) saturate(1.2);
}

html[data-ui-whatsynaptor="active"] .topbar-video-scrim,
html[data-ui-whatsynaptor="active"] .ui-whatsynaptor-topbar-video-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #06091247, #0609123d),
    linear-gradient(90deg, #0609122e, #0609120f 45%, #06091229);
}

html[data-ui-whatsynaptor="active"] .topbar,
html[data-ui-whatsynaptor="active"] [class*="topbar"],
html[data-ui-whatsynaptor="active"] header {
  position: relative;
  isolation: isolate;
}

html[data-ui-whatsynaptor="active"] .topbar > *,
html[data-ui-whatsynaptor="active"] [class*="topbar"] > *,
html[data-ui-whatsynaptor="active"] header > * {
  position: relative;
  z-index: 1;
}

html[data-ui-whatsynaptor="active"] .nav-item__icon,
html[data-ui-whatsynaptor="active"] .nav-collapse-toggle__icon,
html[data-ui-whatsynaptor="active"] .nav-item__external-icon {
  color: var(--ui-brand-accent, var(--accent)) !important;
  text-shadow: none;
}

html[data-ui-whatsynaptor="active"] .topbar-theme-mode {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html[data-ui-whatsynaptor="active"] .topbar {
    background: var(--bg);
  }

  html[data-ui-whatsynaptor="active"] .whatsapp-guide-btn,
  html[data-ui-whatsynaptor="active"] .whatsapp-guide-btn__icon {
    animation: none;
  }
}

/* ui-patcher hardcoded accent cleanup */
html[data-ui-whatsynaptor="active"]:root[data-theme="light"] .chat-group.user .chat-bubble,
html[data-ui-whatsynaptor="active"]:root[data-theme="light"] .chat-line.user .chat-bubble {
  border-color: color-mix(in srgb, var(--ui-brand-accent, #3d8f6e) 20%, transparent) !important;
  background: color-mix(in srgb, var(--ui-brand-accent, #3d8f6e) 12%, transparent) !important;
}

html[data-ui-whatsynaptor="active"]:root[data-theme="light"] .chat-group.user .chat-bubble:hover,
html[data-ui-whatsynaptor="active"]:root[data-theme="light"] .chat-line.user .chat-bubble:hover {
  background: color-mix(in srgb, var(--ui-brand-accent, #3d8f6e) 16%, transparent) !important;
}

html[data-ui-whatsynaptor="active"] .config-changes-badge,
html[data-ui-whatsynaptor="active"] .config-diff,
html[data-ui-whatsynaptor="active"] .config-subnav__item.active {
  border-color: color-mix(in srgb, var(--ui-brand-accent, #3d8f6e) 35%, transparent) !important;
  color: var(--ui-brand-accent, #3d8f6e) !important;
}

html[data-ui-whatsynaptor="active"] .config-diff {
  background: color-mix(in srgb, var(--ui-brand-accent, #3d8f6e) 10%, transparent) !important;
}

html[data-ui-whatsynaptor="active"] .startup-overlay,
html[data-ui-whatsynaptor="active"] .topbar-video-layer,
html[data-ui-whatsynaptor="active"] .ui-whatsynaptor-topbar-video-layer,
html[data-ui-whatsynaptor="active"] .ui-whatsynaptor-loader {
  display: none !important;
}
