/*
 * Business Innovation Hub public colour contract.
 *
 * Public BIH route implementations must use these semantic tokens instead of
 * introducing route-local blue or teal action colours.  The contract is kept
 * separate from the SPA so it is available to both hash routes and the
 * server-rendered Research area.
 */
:root {
  --bih-color-action: #0a665f;
  --bih-color-action-hover: #084f4b;
  --bih-color-action-active: #063f3c;
  --bih-color-on-action: #ffffff;

  --bih-color-link: var(--bih-color-action);
  --bih-color-link-hover: var(--bih-color-action-hover);
  --bih-color-focus: var(--bih-color-action);
  --bih-color-action-subtle: #e8f6f2;
  --bih-color-action-border: #72b8b0;
}

html[data-bih-public-theme="business-innovation-hub"] #app :is(a, button, input, select, textarea):focus-visible,
.bih-public-header :is(a, button, summary, select):focus-visible,
footer[data-footer-family="business-innovation-hub"] a:focus-visible,
#productShopPage :is(a, button, input, select):focus-visible {
  outline: 2px solid var(--bih-color-focus);
  outline-offset: 2px;
}

/* The book shop has its own markup, but belongs to the same public family. */
#productShopPage .bih-book-action {
  background: var(--bih-color-action) !important;
  color: var(--bih-color-on-action) !important;
}

#productShopPage .bih-book-action:hover {
  background: var(--bih-color-action-hover) !important;
}

#productShopPage .bih-book-link {
  color: var(--bih-color-link) !important;
}

#productShopPage .bih-book-link:hover {
  color: var(--bih-color-link-hover) !important;
}

#productShopPage .bih-book-outline-action {
  border-color: var(--bih-color-action-border) !important;
  color: var(--bih-color-link) !important;
}

#productShopPage .bih-book-outline-action:hover {
  border-color: var(--bih-color-action) !important;
  background: var(--bih-color-action-subtle) !important;
}

#productShopPage .bih-book-accent-surface {
  background: var(--bih-color-action-subtle) !important;
  color: var(--bih-color-link) !important;
}

#productShopPage .bih-book-control:focus {
  border-color: var(--bih-color-action) !important;
  --tw-ring-color: color-mix(in srgb, var(--bih-color-action) 18%, transparent) !important;
}

#productShopPage .bih-book-light-action-hover:hover {
  background: var(--bih-color-action-subtle) !important;
}

/* Product-shop markup is generated by a dedicated module.  Map its legacy
 * Tailwind-indigo action utilities to the BIH contract without altering book
 * cover artwork or semantic error/success colours. */
#productShopPage :is([class~="bg-indigo-600"], [class~="bg-indigo-700"]) {
  background-color: var(--bih-color-action) !important;
}

#productShopPage :is([class~="hover:bg-indigo-700"], [class~="hover:bg-indigo-800"]):hover {
  background-color: var(--bih-color-action-hover) !important;
}

#productShopPage :is([class~="text-indigo-700"], [class~="text-indigo-800"], [class~="text-indigo-900"]) {
  color: var(--bih-color-link) !important;
}

#productShopPage :is([class~="hover:text-indigo-700"], [class~="hover:text-indigo-900"]):hover {
  color: var(--bih-color-link-hover) !important;
}

#productShopPage :is([class~="border-indigo-200"], [class~="border-indigo-400"]) {
  border-color: var(--bih-color-action-border) !important;
}

#productShopPage :is([class~="hover:border-indigo-400"]):hover {
  border-color: var(--bih-color-action) !important;
}

#productShopPage :is([class~="bg-indigo-50"]) {
  background-color: var(--bih-color-action-subtle) !important;
}

#productShopPage :is([class~="hover:bg-indigo-50"]):hover {
  background-color: var(--bih-color-action-subtle) !important;
}

#productShopPage :is(input, select):focus {
  border-color: var(--bih-color-action) !important;
  --tw-ring-color: color-mix(in srgb, var(--bih-color-action) 18%, transparent) !important;
}
