/* JuriCloud theme for Plane CE v1.4.3. Visual only: overrides Plane's design tokens and hides upsells.
   Palette: knowledge/brand-and-design.md. Plane's tokens: --neutral-*, --brand-* feed --bg-*, --txt-*, --border-*. */
/* Inter: Plane already bundles "Inter Variable". Manrope comes from Google Fonts (system fallback if blocked). */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&display=swap");

/* ---------- Light theme (Plane's default :root tokens) ---------- */
:root:not([data-theme*="dark"]) {
  --neutral-white: #ffffff;
  --neutral-100: #fcfaf6;  /* paper */
  --neutral-200: #f8f5ef;  /* cream */
  --neutral-300: #f4eee3;
  --neutral-400: #eee5d5;
  --neutral-500: #e5d8bf;  /* sand */
  --neutral-600: #d8c7a8;
  --neutral-700: #c8b391;
  --neutral-800: #a08f83;
  --neutral-900: #8a776c;
  --neutral-1000: #6c5a50; /* muted */
  --neutral-1100: #553f39; /* brown */
  --neutral-1200: #110603; /* ink */
  --neutral-black: #110603;

  --brand-100: #faf6ee;
  --brand-200: #f2ebdf;
  --brand-300: #e9dcc2;
  --brand-400: #dcc59b;
  --brand-500: #c9a96d;
  --brand-600: #bd9d60;    /* gold */
  --brand-700: #8f7646;
  --brand-800: #806a40;
  --brand-900: #5e4d2f;
  --brand-1000: #4a3c24;
  --brand-1100: #3a2f1c;
  --brand-1200: #2a2114;
  --brand-default: #715e3a; /* bronze */

  --txt-success-primary: #2a6555;
  --txt-warning-primary: #7d5a12;
  --txt-danger-primary: #a63b27;
  --bg-danger-primary: #a63b27;
  --bg-success-primary: #2a6555;
}

/* Dark theme: keep Plane's dark neutrals, swap the blue accent for gold so it matches the brand. */
:root[data-theme*="dark"] {
  --brand-100: #241d14;
  --brand-200: #2f261a;
  --brand-300: #3d3122;
  --brand-400: #54432b;
  --brand-500: #6e5836;
  --brand-700: #c9a96d;
  --brand-800: #d9c39a;
  --brand-900: #e5d8bf;
  --brand-1000: #f2ebdf;
  --brand-1100: #f8f5ef;
  --brand-1200: #fcfaf6;
  --brand-default: #bd9d60;
}

/* ---------- Type ---------- */
:root {
  --font-body: "Inter Variable", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
/* Manrope only on page titles: Plane uses h3/h4 for small form labels, where Manrope's narrow spaces read badly. */
h1, h2 { font-family: "Manrope", "Inter Variable", ui-sans-serif, system-ui, sans-serif; }
::selection { background: #e5d8bf; color: #110603; }

/* ---------- Primary buttons: gold fill, ink text, 8px radius ---------- */
.bg-accent-primary.text-on-color:not(:disabled) { background-color: #bd9d60; color: #110603; }
.bg-accent-primary.text-on-color:not(:disabled):hover { background-color: #c9a96d; }
.bg-accent-primary.text-on-color:not(:disabled):active { background-color: #b08f52; }
.bg-accent-primary.text-on-color :is(.text-on-color, svg) { color: #110603; }
button.bg-accent-primary, a.bg-accent-primary { border-radius: 8px; }

/* ---------- Hide paid-plan upsells (visual only; no feature is enabled) ---------- */
/* Sidebar footer "Community" edition button that opens the paid-plans modal (and the footer bar that only holds it) */
button[aria-label="Open paid plans' modal"],
div.h-12.border-t:has(button[aria-label="Open paid plans' modal"]),
/* "Pro" UpgradeBadge component (sidebar Active cycles, estimates, project features ...) */
div.w-fit.cursor-pointer.rounded-2xl.text-accent-secondary[class*="bg-accent-primary/20"],
/* "Active cycles" sidebar entry: in CE it only opens an upgrade page */
#active_cycles,
/* Billing & plans entry in workspace settings */
a[href$="/settings/billing"], a[href$="/settings/billing/"],
/* Links to Plane's pricing / checkout / sales pages */
a[href*="plane.so/pricing"], a[href*="app.plane.so/upgrade"], a[href*="plane.so/talk-to-sales"],
a[href="https://plane.so/one"], a[href="https://plane.so/pro"], a[href="https://plane.so/business"],
/* "Upgrade to One" bulk-operations banner in list/spreadsheet layouts */
div.sticky.bottom-0:has(a[href="https://plane.so/one"]),
/* elements flagged by theme.js */
[data-jc-upsell] {
  display: none !important;
}

/* ---------- JuriCloud logo instead of Plane's (sign-in/up header, God mode header) ---------- */
/* Plane's wordmark is an inline <svg viewBox="0 0 253 53">: keep it for layout, hide it, draw ours behind it. */
a:has(> svg[viewBox="0 0 253 53"]) {
  display: block;
  background: url("/__juricloud/logos/jc-logo.svg?v=3") left center / contain no-repeat;
}
a > svg[viewBox="0 0 253 53"] { visibility: hidden; width: 98px; height: 24px; }
:root[data-theme*="dark"] a:has(> svg[viewBox="0 0 253 53"]) { background-image: url("/__juricloud/logos/jc-logo-cream.svg?v=3"); }

/* ---------- Plane promotion (visual only) ---------- */
/* "Star us on GitHub" header button, God mode help-menu Documentation / Forum / Report a bug */
a[href*="github.com/makeplane"], a[href*="docs.plane.so"], a[href*="forum.plane.so"],
/* help-menu items and the sign-in customer-logo strip, flagged by theme.js */
[data-jc-vendor], [data-jc-hide] {
  display: none !important;
}
