/*
 * The Score colors for the Simspace, instead of its Docker blue: the same
 * accent as the lab's site (site/style.css). Loaded after the runtime's own
 * stylesheet (see publish-pages.yaml and compose.yaml), so these overrides
 * use the runtime's selectors and win by coming last.
 */

/* Bootstrap's primary and link colors: buttons, links, the terminal tabs. */
:root,
[data-bs-theme="light"] {
  --bs-primary: #b81f68;
  --bs-primary-rgb: 184, 31, 104;
  --bs-link-color: #b81f68;
  --bs-link-color-rgb: 184, 31, 104;
  --bs-link-hover-color: #93194f;
  --bs-link-hover-color-rgb: 147, 25, 79;
  --bs-primary-text-emphasis: #93194f;
  --bs-primary-bg-subtle: #fce8f1;
  --bs-primary-border-subtle: #f3b9d3;
}

[data-bs-theme="dark"] {
  --bs-primary: #f27aae;
  --bs-primary-rgb: 242, 122, 174;
  --bs-link-color: #f27aae;
  --bs-link-color-rgb: 242, 122, 174;
  --bs-link-hover-color: #f7a8cb;
  --bs-link-hover-color-rgb: 247, 168, 203;
  --bs-primary-text-emphasis: #f7a8cb;
  --bs-primary-bg-subtle: #3a1529;
  --bs-primary-border-subtle: #7a2c52;
}

.btn-primary {
  --bs-btn-bg: #b81f68;
  --bs-btn-border-color: #b81f68;
  --bs-btn-hover-bg: #9c1a58;
  --bs-btn-hover-border-color: #93194f;
  --bs-btn-focus-shadow-rgb: 184, 31, 104;
  --bs-btn-active-bg: #93194f;
  --bs-btn-active-border-color: #8a174a;
  --bs-btn-disabled-bg: #b81f68;
  --bs-btn-disabled-border-color: #b81f68;
}

.btn-outline-primary {
  --bs-btn-color: #b81f68;
  --bs-btn-border-color: #b81f68;
  --bs-btn-hover-bg: #b81f68;
  --bs-btn-hover-border-color: #b81f68;
  --bs-btn-focus-shadow-rgb: 184, 31, 104;
  --bs-btn-active-bg: #b81f68;
  --bs-btn-active-border-color: #b81f68;
  --bs-btn-disabled-color: #b81f68;
  --bs-btn-disabled-border-color: #b81f68;
}

/* The instructions panel: headings' accents, links, inline code, progress. */
.workshop-panel {
  /* The "> [!NOTE]" callouts, GitHub blue by default: the accent instead. */
  --rehype-github-alerts-note-color: var(--wp-accent);
  --wp-accent: #b81f68;
  --wp-accent-soft: rgba(184, 31, 104, 0.1);
  --wp-code-inline-bg: rgba(184, 31, 104, 0.08);
  --wp-code-inline-text: #93194f;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-bs-theme="light"])
    .workshop-panel:not([data-labspace-theme="light"]) {
    --wp-accent: #f27aae;
    --wp-accent-soft: rgba(242, 122, 174, 0.16);
    --wp-code-inline-bg: rgba(242, 122, 174, 0.16);
    --wp-code-inline-text: #f7a8cb;
    /* The Score logo has its own colors: don't turn it white. */
    --wp-logo-filter: none;
  }
}

.workshop-panel[data-labspace-theme="dark"],
[data-bs-theme="dark"] .workshop-panel:not([data-labspace-theme="light"]) {
  --wp-accent: #f27aae;
  --wp-accent-soft: rgba(242, 122, 174, 0.16);
  --wp-code-inline-bg: rgba(242, 122, 174, 0.16);
  --wp-code-inline-text: #f7a8cb;
  --wp-logo-filter: none;
}
