/* Robin branding override for Activepieces */
@font-face {
    font-family: 'Noah Grotesque';
    src: url('/branding/fonts/Noah Grotesque Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Noah Grotesque';
    src: url('/branding/fonts/Noah Grotesque Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Noah Grotesque';
    src: url('/branding/fonts/Noah Grotesque Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Noah Grotesque';
    src: url('/branding/fonts/Noah Grotesque Regular Italic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
}

/* Override all fonts globally */
*,
body,
html,
input,
button,
select,
textarea {
    font-family: 'Noah Grotesque', system-ui, sans-serif !important;
}

/*
 * Only replace the AP BRAND logos (from CDN), NOT piece/connector logos.
 */
img[src*="activepieces.com/brand/full-logo"],
img[src*="cdn.activepieces.com/brand"] {
    content: url('/branding/robin-logo.svg') !important;
}

/* Hide "Powered by Activepieces" */
[class*="powered-by"],
[class*="poweredBy"] {
    display: none !important;
}

/* ── Override AP primary color (HSL format) ────────────────── */
:root {
    --primary: 178 50% 60% !important;
    --primary-100: 178 60% 85% !important;
    --primary-300: 178 50% 35% !important;
    --primary-foreground: 0 0% 100% !important;
    --sidebar-primary: 178 50% 60% !important;
    --sidebar-primary-foreground: 0 0% 100% !important;
    --add-button-shadow: 0px 0px 0px 6px hsl(178 60% 85%) !important;
}

.dark {
    --primary: 178 50% 55% !important;
    --primary-100: 178 60% 30% !important;
    --primary-300: 178 50% 80% !important;
    --primary-foreground: 0 0% 100% !important;
    --sidebar-primary: 178 50% 55% !important;
    --sidebar-primary-foreground: 0 0% 100% !important;
}

/* ══════════════════════════════════════════════════════════════
   IFRAME MODE — when AP is embedded inside Robin
   ══════════════════════════════════════════════════════════════ */

/* Hide the sidebar completely */
body.robin-iframe [data-sidebar="sidebar"] {
    display: none !important;
}

/* Override inline style --sidebar-width on any element */
body.robin-iframe [style*="--sidebar-width"] {
    --sidebar-width: 0px !important;
    --sidebar-width-icon: 0px !important;
}

/* Force zero sidebar width everywhere */
body.robin-iframe {
    --sidebar-width: 0px !important;
    --sidebar-width-icon: 0px !important;
}

/* The spacer div that reserves sidebar width — collapse it.
   Scoped to sidebar markup only: plain `.peer` is also used by Shadcn
   Checkbox/Switch/RadioGroup inputs, so an unscoped rule hides them too. */
body.robin-iframe [data-sidebar="sidebar"].peer,
body.robin-iframe div.peer[data-side],
body.robin-iframe div.peer[data-state="expanded"],
body.robin-iframe div.peer[data-state="collapsed"] {
    display: none !important;
}

/* Make sidebar-inset (main content wrapper) take full width */
body.robin-iframe main {
    width: 100% !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Hide breadcrumb navigation */
body.robin-iframe [data-slot="breadcrumb"],
body.robin-iframe nav[aria-label="breadcrumb"] {
    display: none !important;
}

/* Hide help/docs links to activepieces.com */
body.robin-iframe a[href*="community.activepieces.com"],
body.robin-iframe a[href*="activepieces.com/docs"],
body.robin-iframe a[href*="activepieces.com/about"] {
    display: none !important;
}

/* Hide any help/question-mark button in the header */
body.robin-iframe button[aria-label*="help" i],
body.robin-iframe button[aria-label*="aide" i],
body.robin-iframe a[aria-label*="help" i] {
    display: none !important;
}

/* Hide Activepieces toast notifications (sonner/congratulation popups) */
body.robin-iframe [data-sonner-toaster],
body.robin-iframe [data-sonner-toast],
body.robin-iframe section[aria-label*="Notifications"],
body.robin-iframe section[aria-label*="notifications"] {
    display: none !important;
}

/* Hide "Add note" button in canvas controls (lucide sticky-note icon) */
#canvas-controls button:has(svg.lucide-sticky-note),
#canvas-controls button:has(svg.lucide-StickyNote) {
    display: none !important;
}
