/* Strelo skin for Cal.com.
   Injected via nginx sub_filter - Cal source is NOT modified.
   Recolors Cal v6 design tokens to the Strelo anthracite + violet DS,
   forces dark, hides Cal.com branding. Token names verified against the
   live v6 CSS bundle. */

:root,
.dark,
html,
html.dark {
  color-scheme: dark;

  /* Surfaces - Strelo anthracite (chroma-0 grays, oklch 0.145 / 0.205) */
  --cal-bg: #0e0e10;
  --cal-bg-muted: #161618;
  --cal-bg-subtle: #1c1c1f;
  --cal-bg-emphasis: #2a2a2e;
  --cal-bg-inverted: #fafafa;

  /* Borders - subtle 1px (Strelo uses white/[0.06]) */
  --cal-border: #2e2e33;
  --cal-border-subtle: #232327;
  --cal-border-emphasis: #3c3c42;
  --cal-border-muted: #18181b;
  --cal-border-booker: #232327;

  /* Text */
  --cal-text-emphasis: #fafafa;
  --cal-text: #e4e4e7;
  --cal-text-subtle: #a1a1aa;
  --cal-text-muted: #71717a;
  --cal-text-inverted: #0e0e10;

  /* Brand / primary -> Strelo violet (Cal default is monochrome white/black) */
  --cal-brand: #7c5cff;
  --cal-brand-emphasis: #6a4cf0;
  --cal-brand-subtle: #b7a8ff;
  --cal-brand-text: #ffffff;
  --cal-brand-accent: #ffffff;
  --cal-bg-brand: #7c5cff;
  --cal-bg-brand-emphasis: #6a4cf0;
  --cal-bg-brand-muted: #2a2350;
  --cal-bg-primary: #7c5cff;
  --cal-bg-primary-emphasis: #6a4cf0;
  --cal-bg-primary-muted: #2a2350;
}

/* Base surface + Inter (Cal ships Inter; enforce for safety) */
html,
body {
  background-color: #0e0e10 !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Violet focus ring + selection to match Strelo */
*:focus-visible {
  outline-color: #7c5cff !important;
}
::selection {
  background: rgba(124, 92, 255, 0.32);
}

/* Primary/brand action buttons: keep white text on violet regardless of
   which token Cal wired for the label. Targets Cal's primary button variants. */
button[class*="bg-brand"],
a[class*="bg-brand"],
button[color="primary"],
[data-testid="confirm-book-button"] {
  color: #ffffff !important;
}

/* Hide Cal.com branding (powered-by, footer links to cal.com) */
[data-testid="powered-by-cal"],
[class*="poweredBy"],
a[href*="go.cal.com"],
a[href^="https://cal.com"],
a[href^="http://cal.com"] {
  display: none !important;
}

/* Slim violet scrollbar */
* {
  scrollbar-color: #3a2f73 transparent;
}

/* Primary actions -> Strelo violet, explicit + high specificity in case Cal's
   button token mapping differs from the brand var. Excludes destructive. */
button[type="submit"]:not([color="destructive"]):not([class*="destructive"]),
[data-testid="login-submit"],
[data-testid="signup-submit"],
[data-testid="confirm-book-button"],
a[class*="bg-brand"],
button[class*="bg-brand"] {
  background-color: #7c5cff !important;
  border-color: #6a4cf0 !important;
  color: #ffffff !important;
}
button[type="submit"]:not([color="destructive"]):hover,
[data-testid="confirm-book-button"]:hover {
  background-color: #6a4cf0 !important;
}

/* Cal wordmark logos are replaced with a "Strelo" wordmark by strelo-skin.js.
   Hide any that slip through (SVG logos, loaders) as a fallback. */
img[alt="Cal"],
img[alt="Cal.com"],
img[alt="Cal.com Logo"] {
  display: none !important;
}

/* Public signup links hidden (registration page stays reachable at /signup directly) */
a[href*="/signup"],
a[href="/auth/signup"],
[data-testid="signup"] {
  display: none !important;
}

/* Booking pages: 24h is the default; hide the 12h/24h switch so 12h is never offered.
   Best-effort selectors - refine against a live booking page if the toggle still shows. */
[data-testid="time_format_toggle"],
[data-testid="time-format-toggle"],
[data-testid="toggle-12h-24h"] {
  display: none !important;
}

/* Active progress / inverted accents that Cal renders white -> Strelo violet */
[class*="bg-inverted"][class*="rounded"],
[role="progressbar"] > div,
.bg-brand-default {
  background-color: #7c5cff !important;
}
