/* theme-weave-embed.css
 *
 * Weave-branded Forgejo theme for the embedded iframe.
 * Extends gitea-auto (system light/dark) and overrides brand tokens to
 * match Weave's Rosé Pine palette (see packages/weave-web/src/index.css).
 *
 * Deployed by docker/forgejo-init.sh into
 *   /data/custom/public/assets/css/theme-weave-embed.css
 * and registered via FORGEJO__ui__THEMES / FORGEJO__ui__DEFAULT_THEME.
 *
 * Ref: plans/git-ui-forgejo-embed.md (Step 2).
 */

@import url("/assets/css/theme-gitea-auto.css");

:root {
  /* Rose (light) / Rose (dark) — Forgejo's primary accent */
  --color-primary: #d7827e;
  --color-primary-contrast: #ffffff;
  --color-primary-dark-1: #c4716e;
  --color-primary-dark-2: #b1615d;
  --color-primary-light-1: #deb5b3;
  --color-primary-light-2: #ecd0ce;
  --color-accent: #907aa9;             /* Iris */

  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Chrome-hide for the embedded view.
 * Ship both candidates now; whichever selector Forgejo's DOM actually
 * exposes will match (Step 2 decision-point).
 *
 * Candidate A: <body class="embed"> if Forgejo reflects ?embed=1 as body class.
 * Candidate B: <meta name="weave-embed"> injected by custom/templates/custom/header.tmpl.
 */
body.embed #navbar,
body.embed .page-footer,
body.embed .footer,
:root:has(head meta[name="weave-embed"]) #navbar,
:root:has(head meta[name="weave-embed"]) .page-footer,
:root:has(head meta[name="weave-embed"]) .footer {
  display: none !important;
}

/* Feature-removal defense-in-depth: even if a repo has wiki/projects
 * units left enabled in the DB, hide the tabs in the embedded UI.
 * Ref: Step 3.5 (Feature Policy — Disabled). */
a[href$="/wiki"][class*="item"],
a[href$="/projects"][class*="item"] {
  display: none !important;
}
