/**
 * Enigma2World — Chatwoot theme (logo, watermark, colors)
 */
:root {
  --e2w-primary: #050f2c;
  --e2w-primary-light: #2b3552;
  --e2w-accent: #ffbd0c;
  --e2w-accent-hover: #e6a800;
  --e2w-surface: #0f091e;
  --e2w-surface-2: #14142a;
  --e2w-logo-width: min(520px, 92vw);
  --e2w-watermark-size: min(920px, 110vmin);

  --color-woot: #ffbd0c !important;
  --w-500: #ffbd0c !important;
}

.dark {
  --color-woot: #ffbd0c !important;
  --w-500: #ffbd0c !important;
}

/* ── Watermark background (login + dashboard) ── */
html {
  background: var(--e2w-primary) !important;
}

body {
  background-color: var(--e2w-primary) !important;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("/e2w/e2w-logo-watermark.png?v=6") center center / var(--e2w-watermark-size) no-repeat;
  opacity: 0.14;
}

/* Login column — let watermark show through sides */
.min-h-screen.bg-n-background,
.min-h-screen[class*="bg-"] {
  background: transparent !important;
}

#app img[src*="e2w-logo"]:not(:first-of-type) {
  display: none !important;
}

#app img[src*="e2w-logo"]:first-of-type {
  background: transparent !important;
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ── Bigger PNG logo (login + header) ── */
#app img[src*="e2w-logo"],
#app img[src="/e2w/e2w-logo.png"],
img[src*="e2w-logo.png"],
.branding img,
[class*="logo"] img,
a[href="/app/accounts"] img {
  width: var(--e2w-logo-width) !important;
  max-width: var(--e2w-logo-width) !important;
  height: auto !important;
  max-height: none !important;
  min-height: 80px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto 1.25rem !important;
}

/* Login page — extra space for logo */
.min-h-screen img[src*="e2w-logo"],
.flex.min-h-screen img[src*="e2w-logo"] {
  width: var(--e2w-logo-width) !important;
  margin-bottom: 1.5rem !important;
}

/* Sidebar thumbnail logo */
aside img[src*="e2w-favicon"],
aside img[src*="e2w-logo"] {
  width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  margin: 0 !important;
  border-radius: 8px !important;
}

/* ── Colors & sidebar ── */
aside.bg-n-background,
aside[class*="sidebar"] {
  background: linear-gradient(180deg, var(--e2w-primary) 0%, var(--e2w-surface) 100%) !important;
  border-inline-end: 1px solid rgba(255, 189, 12, 0.15) !important;
}

.text-n-brand,
.text-woot-500,
a.text-n-brand,
.router-link-active.text-n-brand {
  color: var(--e2w-accent) !important;
}

.bg-n-brand,
.bg-woot-500,
button.bg-n-brand {
  background-color: var(--e2w-accent) !important;
  color: var(--e2w-primary) !important;
  border-color: var(--e2w-accent) !important;
}

.bg-n-brand:hover,
button.bg-n-brand:hover {
  background-color: var(--e2w-accent-hover) !important;
}

button[type="submit"].bg-n-brand,
button[type="submit"].button--primary {
  background: var(--e2w-accent) !important;
  color: var(--e2w-primary) !important;
  font-weight: 600 !important;
}

/* Login card */
.min-h-screen .bg-n-background,
.min-h-screen .bg-white,
.min-h-screen [class*="rounded"] {
  backdrop-filter: blur(2px);
}

header.bg-n-background {
  background: rgba(5, 15, 44, 0.92) !important;
  border-bottom: 1px solid rgba(255, 189, 12, 0.12) !important;
}

.conversation.selected,
.conversations-list .conversation.active {
  border-inline-start: 3px solid var(--e2w-accent) !important;
}

::-webkit-scrollbar-thumb {
  background: var(--e2w-primary-light) !important;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--e2w-accent) !important;
}
