/* Tasksmith brand overrides for Documenso signing UI */

/* ── Light mode (warm cream/sand) ── */
:root {
  --background: 40 30% 98%;
  --foreground: 30 10% 15%;
  --card: 40 25% 97%;
  --card-foreground: 30 10% 15%;
  --popover: 38 28% 96%;
  --popover-foreground: 30 10% 15%;
  --primary: 35 20% 45%;
  --primary-foreground: 40 30% 98%;
  --secondary: 36 18% 94%;
  --secondary-foreground: 30 12% 20%;
  --muted: 35 20% 93%;
  --muted-foreground: 30 8% 45%;
  --accent: 35 25% 92%;
  --accent-foreground: 30 12% 18%;
  --border: 35 15% 88%;
  --input: 35 15% 88%;
  --ring: 35 20% 45%;
}

/* ── Dark mode via class or data-attribute ── */
.dark,
[data-theme="dark"] {
  --background: 220 50% 14% !important;
  --foreground: 210 20% 98% !important;
  --card: 222 40% 7% !important;
  --card-foreground: 210 20% 98% !important;
  --popover: 222 40% 7% !important;
  --popover-foreground: 210 20% 98% !important;
  --primary: 199 89% 58% !important;
  --primary-foreground: 220 50% 14% !important;
  --secondary: 220 30% 14% !important;
  --secondary-foreground: 210 20% 98% !important;
  --muted: 220 30% 14% !important;
  --muted-foreground: 218 11% 65% !important;
  --accent: 220 30% 14% !important;
  --accent-foreground: 210 20% 98% !important;
  --border: 220 25% 18% !important;
  --input: 220 25% 18% !important;
  --ring: 199 89% 58% !important;
}

/* ── Dark mode via OS preference ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: 220 50% 14%;
    --foreground: 210 20% 98%;
    --card: 222 40% 7%;
    --card-foreground: 210 20% 98%;
    --popover: 222 40% 7%;
    --popover-foreground: 210 20% 98%;
    --primary: 199 89% 58%;
    --primary-foreground: 220 50% 14%;
    --secondary: 220 30% 14%;
    --secondary-foreground: 210 20% 98%;
    --muted: 220 30% 14%;
    --muted-foreground: 218 11% 65%;
    --accent: 220 30% 14%;
    --accent-foreground: 210 20% 98%;
    --border: 220 25% 18%;
    --input: 220 25% 18%;
    --ring: 199 89% 58%;
  }
}

/* Hide "Powered by" or external brand links in signing ceremony */
a[href*="documenso.com"] {
  visibility: hidden !important;
  font-size: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Hide legal consent fine-print external links in footer/consent areas */
footer a[target="_blank"],
[class*="consent"] a[target="_blank"],
[class*="disclosure"] a[target="_blank"] {
  color: transparent !important;
  pointer-events: none !important;
  font-size: 0 !important;
}

/* Override any remaining green/emerald Documenso accent */
[style*="background-color: hsl(142"],
[style*="background: hsl(142"] {
  background-color: hsl(var(--primary)) !important;
}

/* Hide inline SVG branding logo, replace with Tasksmith logo image */
[class*="branding-logo"] svg,
[data-testid="branding-logo"] svg {
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  clip-path: inset(100%) !important;
}
[class*="branding-logo"],
[data-testid="branding-logo"] {
  background-image: url('/static/tasksmith-logo.png') !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  min-width: 120px !important;
  min-height: 32px !important;
}

/* Hide signup/register CTA on completion page */
a[href*="/signup"],
a[href*="/register"],
form[action*="/signup"] {
  display: none !important;
}
