/* LinkForge display settings (Account > Display settings). One shared stylesheet for the logged-in app:
   dashboard, admin, Studio shell, login. It is driven by attributes on <html> that templates/_ui_head.html sets
   before first paint:  data-theme=dark|light  data-accent  data-text  data-density  data-motion.
   It is never loaded on public link-in-bio pages. */

/* ---------- text size (every rem-based size follows the root size) ---------- */
html[data-text="sm"] { font-size: 15px; }
html[data-text="lg"] { font-size: 18px; }
html[data-text="xl"] { font-size: 20px; }
html[data-text="sm"] .lfd { font-size: 13px; }
html[data-text="lg"] .lfd { font-size: 16px; }
html[data-text="xl"] .lfd { font-size: 18px; }

/* ---------- density: tighter content spacing (sidebar, top bar and page margins stay as they are) ---------- */
html[data-density="compact"] main > * { --spacing: .21rem; }
html[data-density="compact"] .lfd .card { padding: 12px; }
html[data-density="compact"] .lfd .lfd-head { margin-bottom: 12px; }

/* ---------- reduced motion ---------- */
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after {
  animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
  transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
}

/* ---------- accent color: re-points the purple/violet ramps that every page already uses ---------- */
html[data-accent="blue"]   { --lf-c100:#dbeafe; --lf-c200:#bfdbfe; --lf-c300:#93c5fd; --lf-c400:#60a5fa; --lf-c500:#3b82f6; --lf-c600:#2563eb; --lf-c700:#1d4ed8; --lf-c900:#1e3a8a; }
html[data-accent="teal"]   { --lf-c100:#ccfbf1; --lf-c200:#99f6e4; --lf-c300:#5eead4; --lf-c400:#2dd4bf; --lf-c500:#14b8a6; --lf-c600:#0f766e; --lf-c700:#115e59; --lf-c900:#134e4a; }
html[data-accent="green"]  { --lf-c100:#d1fae5; --lf-c200:#a7f3d0; --lf-c300:#6ee7b7; --lf-c400:#34d399; --lf-c500:#10b981; --lf-c600:#047857; --lf-c700:#065f46; --lf-c900:#064e3b; }
html[data-accent="orange"] { --lf-c100:#ffedd5; --lf-c200:#fed7aa; --lf-c300:#fdba74; --lf-c400:#fb923c; --lf-c500:#f97316; --lf-c600:#c2410c; --lf-c700:#9a3412; --lf-c900:#7c2d12; }
html[data-accent="rose"]   { --lf-c100:#ffe4e6; --lf-c200:#fecdd3; --lf-c300:#fda4af; --lf-c400:#fb7185; --lf-c500:#f43f5e; --lf-c600:#e11d48; --lf-c700:#be123c; --lf-c900:#881337; }
html[data-accent]:not([data-accent="purple"]) {
  --color-purple-100: var(--lf-c100); --color-purple-200: var(--lf-c200); --color-purple-300: var(--lf-c300); --color-purple-400: var(--lf-c400);
  --color-purple-500: var(--lf-c500); --color-purple-600: var(--lf-c600); --color-purple-700: var(--lf-c700); --color-purple-900: var(--lf-c900);
  --color-violet-100: var(--lf-c100); --color-violet-300: var(--lf-c300); --color-violet-400: var(--lf-c400);
  --color-violet-500: var(--lf-c500); --color-violet-600: var(--lf-c600); --color-violet-700: var(--lf-c700);
  /* Studio shell + analytics/radar variables */
  --acc: var(--lf-c500); --focus: var(--lf-c400); --purple: var(--lf-c500); --grad: linear-gradient(135deg, var(--lf-c500), #ec4899);
}

/* ================= LIGHT THEME ================= */
html[data-theme="light"] { color-scheme: light; }
html[data-theme="light"] body { background: #f4f4f8; color: #17151f; }

/* text that is purple/violet/green/red... on dark needs to be darker on a light page */
html[data-theme="light"] {
  --color-purple-300: #7e22ce; --color-purple-400: #7e22ce; --color-violet-300: #6d28d9; --color-violet-400: #6d28d9;
  --color-green-200: #166534; --color-green-300: #15803d; --color-green-400: #15803d;
  --color-red-200: #991b1b; --color-red-300: #b91c1c; --color-red-400: #b91c1c;
  --color-yellow-300: #854d0e; --color-yellow-400: #a16207; --color-amber-100: #78350f; --color-amber-200: #92400e; --color-amber-300: #92400e; --color-amber-400: #b45309;
  --color-pink-300: #be185d; --color-pink-400: #be185d;
}
html[data-theme="light"][data-accent]:not([data-accent="purple"]) {
  --color-purple-300: var(--lf-c700); --color-purple-400: var(--lf-c700); --color-violet-300: var(--lf-c700); --color-violet-400: var(--lf-c700);
  --acc: var(--lf-c700); --focus: var(--lf-c700); --purple: var(--lf-c700); --grad: linear-gradient(135deg, var(--lf-c600), #db2777);
}

/* surfaces */
html[data-theme="light"] .bg-\[\#0a0a0f\] { background-color: #f4f4f8; }
html[data-theme="light"] .bg-\[\#0a0a0f\]\/95 { background-color: rgba(244,244,248,.95); }
html[data-theme="light"] .bg-\[\#12121a\], html[data-theme="light"] .bg-\[\#111118\], html[data-theme="light"] .bg-\[\#1a1a2e\],
html[data-theme="light"] .bg-\[\#0d0d14\], html[data-theme="light"] .bg-gray-900 { background-color: #ffffff; }
html[data-theme="light"] .bg-black { background-color: #f4f4f8; }
html[data-theme="light"] .bg-gray-800, html[data-theme="light"] .bg-\[\#1a1a24\] { background-color: #eceef5; }
html[data-theme="light"] .bg-gray-700 { background-color: #e1e3ee; }
html[data-theme="light"] .bg-gray-600 { background-color: #c9ccdb; }
html[data-theme="light"] .hover\:bg-gray-800:hover, html[data-theme="light"] .hover\:bg-\[\#1a1a24\]:hover { background-color: #eceef5; }
html[data-theme="light"] .hover\:bg-gray-700:hover, html[data-theme="light"] .hover\:bg-gray-600:hover { background-color: #e1e3ee; }
html[data-theme="light"] .bg-white\/5 { background-color: rgba(23,21,31,.04); }
html[data-theme="light"] .bg-white\/10 { background-color: rgba(23,21,31,.07); }
html[data-theme="light"] .hover\:bg-white\/5:hover { background-color: rgba(23,21,31,.05); }
html[data-theme="light"] .hover\:bg-white\/10:hover { background-color: rgba(23,21,31,.08); }
html[data-theme="light"] .to-\[\#12121a\] { --tw-gradient-to: #ffffff; }
html[data-theme="light"] .from-\[\#12121a\] { --tw-gradient-from: #ffffff; }

/* borders */
html[data-theme="light"] .border-white\/10, html[data-theme="light"] .border-white\/15 { border-color: rgba(23,21,31,.12); }
html[data-theme="light"] .border-white\/5, html[data-theme="light"] .border-gray-800 { border-color: rgba(23,21,31,.07); }
html[data-theme="light"] .border-white\/20, html[data-theme="light"] .border-gray-700 { border-color: rgba(23,21,31,.2); }
html[data-theme="light"] .divide-white\/5 > :not(:last-child) { border-color: rgba(23,21,31,.07); }

/* text */
html[data-theme="light"] .text-white, html[data-theme="light"] .hover\:text-white:hover { color: #17151f; }
html[data-theme="light"] .text-white\/70 { color: rgba(23,21,31,.72); }
html[data-theme="light"] .text-gray-200 { color: #2e2c3d; }
html[data-theme="light"] .text-gray-300 { color: #45435a; }
html[data-theme="light"] .text-gray-400 { color: #5a5870; }
html[data-theme="light"] .text-gray-500 { color: #6a6880; }
html[data-theme="light"] .text-gray-600 { color: #7b7990; }
html[data-theme="light"] .placeholder-gray-500::placeholder, html[data-theme="light"] input::placeholder, html[data-theme="light"] textarea::placeholder { color: #8a889c; }
/* white text stays white on solid accent / status buttons and gradients */
html[data-theme="light"] :is(.bg-purple-500,.bg-purple-600,.bg-purple-700,.bg-violet-600,.bg-violet-700,.bg-pink-500,.bg-pink-600,.bg-red-600,.bg-red-600\/90,.bg-red-500,.bg-green-500,.bg-green-600,.bg-blue-500,.bg-blue-600,.bg-gradient-to-r,.bg-gradient-to-br,.bg-gradient-to-b,.bg-black\/60).text-white,
html[data-theme="light"] :is(.bg-purple-500,.bg-purple-600,.bg-purple-700,.bg-violet-600,.bg-violet-700,.bg-pink-500,.bg-pink-600,.bg-red-600,.bg-red-500,.bg-green-500,.bg-green-600,.bg-gradient-to-r,.bg-gradient-to-br) .text-white,
html[data-theme="light"] :is(.bg-purple-500,.bg-purple-600,.bg-purple-700,.bg-violet-600,.bg-pink-500,.bg-red-600,.bg-red-500,.bg-green-600,.bg-gradient-to-r,.bg-gradient-to-br):hover.text-white { color: #ffffff; }
html[data-theme="light"] .text-transparent { color: transparent; }
/* the brand gradient text (bg-clip-text) keeps working */

/* old theme.css leftovers (body.light on pages that still load theme.js) must agree with this palette */
html[data-theme="light"] body.light { background: #f4f4f8 !important; }

/* footer, cookie notice, admin dialog */
html[data-theme="light"] .lf-foot { background: #ffffff; border-top-color: rgba(23,21,31,.1); }
html[data-theme="light"] .lf-foot__name { color: #17151f; }
html[data-theme="light"] .lf-foot__nav a { background: #eceef5; color: #45435a; }
html[data-theme="light"] .lf-foot__bottom { border-top-color: rgba(23,21,31,.1); }
html[data-theme="light"] .lf-foot__tagline, html[data-theme="light"] .lf-foot__tagline a { color: #5a5870; }
html[data-theme="light"] .lf-foot__copy { color: #6a6880; }
html[data-theme="light"] .ckb { background: #ffffff; color: #17151f; border-color: rgba(23,21,31,.14); box-shadow: 0 8px 30px rgba(40,30,80,.18); }
html[data-theme="light"] .ckb a { color: #7e22ce; }
html[data-theme="light"] #confirmDlg { color: #17151f; background: #ffffff; }
html[data-theme="light"] #confirmDlg p { color: #5a5870; }
html[data-theme="light"] .lf-drawer-x { background: rgba(23,21,31,.07); color: #17151f; }
html[data-theme="light"] .lf-drawer-head span { color: #6a6880; }
html[data-theme="light"] .lf-drawer-head { border-bottom-color: rgba(23,21,31,.1); }
html[data-theme="light"] .lf-backdrop { background: rgba(20,18,30,.45); }

/* Analytics / Radar (their own variables) */
html[data-theme="light"] .lfd {
  --bg: #f4f4f8; --panel: #ffffff; --panel-2: #f1f1f7; --line: rgba(23,21,31,.1); --line-2: rgba(23,21,31,.18);
  --text: #17151f; --muted: #5a5870; --dim: #6a6880; --shadow: 0 1px 2px rgba(40,30,80,.08), 0 12px 28px -18px rgba(40,30,80,.28);
  --green: #047857; --amber: #b45309; --red: #b91c1c; --blue: #1d4ed8; --cyan: #0e7490;
}

/* Analytics / Radar pieces that have their own hard-coded dark colours */
html[data-theme="light"] .lfd-nav a:hover { background: rgba(23,21,31,.05); color: #17151f; }
html[data-theme="light"] .lfd-nav a[aria-current="page"] { color: #17151f; }
html[data-theme="light"] .seg button[aria-pressed="true"] { background: rgba(23,21,31,.08); color: #17151f; }
html[data-theme="light"] .lfd .btn, html[data-theme="light"] .lfd .select { color: #17151f; }
html[data-theme="light"] .lfd .btn:hover { border-color: rgba(23,21,31,.3); }
html[data-theme="light"] .lfd .btn-grad { color: #fff; }
html[data-theme="light"] .lfd .switch span { background: #c9ccdb; }
html[data-theme="light"] .lfd .note { background: rgba(37,99,235,.07); border-color: rgba(37,99,235,.25); color: #1e3a8a; }
html[data-theme="light"] .lfd .delta.flat, html[data-theme="light"] .lfd .chip { background: rgba(23,21,31,.05); }
html[data-theme="light"] .lfd .tip { background: #fff; color: #17151f; box-shadow: 0 12px 30px -10px rgba(40,30,80,.35); }
html[data-theme="light"] .lfd .tag { color: #9d174d; background: rgba(236,72,153,.1); border-color: rgba(236,72,153,.3); }
html[data-theme="light"] .lfd .bar, html[data-theme="light"] .lfd .ico { background: rgba(23,21,31,.07); }
html[data-theme="light"] .lfd .checks li, html[data-theme="light"] .lfd .compliance ul { color: #3a3850; }
html[data-theme="light"] .lfd .act-age_gate { color: #6d28d9; } html[data-theme="light"] .lfd .act-geo_blocked { color: #be123c; }
html[data-theme="light"] .lfd .flow .st b { color: #17151f; }
html[data-theme="light"] .lfd svg [stroke*="255,255,255"] { stroke: rgba(23,21,31,.14); }
html[data-theme="light"] .lfd svg [fill*="255,255,255"] { fill: rgba(23,21,31,.06); }
html[data-theme="light"] .lfd svg [stroke="#1f1f28"] { stroke: #e3e4ee; }
html[data-theme="light"] .lfd svg text[fill="#fff"], html[data-theme="light"] .lfd svg text[fill="#ffffff"] { fill: #17151f; }
html[data-theme="light"] .lf-foot__mail { color: #5a5870 !important; }

/* a few inline-styled dark surfaces / borders in older templates */
html[data-theme="light"] [style*="background:#12121a"], html[data-theme="light"] [style*="background: #12121a"] { background: #ffffff !important; }
html[data-theme="light"] [style*="background:#0a0a0f"], html[data-theme="light"] [style*="background: #0a0a0f"] { background: #f4f4f8 !important; }
html[data-theme="light"] [style*="rgba(255,255,255,.08)"] { border-color: rgba(23,21,31,.12) !important; }
html[data-theme="light"] .ckb__ok { color: #17151f; border-color: rgba(23,21,31,.3); }
html[data-theme="light"] [style*="color:#a1a1aa"], html[data-theme="light"] [style*="color: #a1a1aa"] { color: #5a5870 !important; }
