/* Shared header branding. Page-level link styles must not own logo states. */
:root {
  --pc-brand-hover-color: var(--color-primary-dark, var(--primary-hover, #0057c3));
  --pc-brand-motion: var(--transition-fast, 150ms ease);
}

/* Standalone headers also need a visible brand state on their resolved theme. */
.pc-site-header[data-pc-header-theme="dark"] {
  --pc-brand-hover-color: var(--color-primary-dark, var(--primary-hover, #60a5ff));
}
.pc-site-header[data-pc-header-theme="hc-dark"] {
  --pc-brand-hover-color: var(--primary-hover, #99ccff);
}
.pc-site-header[data-pc-header-theme="hc-light"] {
  --pc-brand-hover-color: var(--primary-hover, #003d99);
}
.pc-site-header[data-pc-header-theme="colorblind"] {
  --pc-brand-hover-color: var(--color-primary-dark, var(--primary, #1464a0));
}

:is(.t-head, .j-head) :is(.t-games-brand, .t-playcity-link, .t-brand, .j-playcity-link, .j-brand),
.pc-site-header .pc-site-header__logo {
  transition: color var(--pc-brand-motion);
}

:is(.t-head, .j-head) :is(.t-games-brand, .t-playcity-link, .t-brand, .j-playcity-link, .j-brand):is(:hover, :focus-visible),
.pc-site-header .pc-site-header__logo:is(:hover, :focus-visible) {
  color: var(--pc-brand-hover-color);
  text-decoration: none;
}

/* A dark blue brand state stays legible over the light translucent header. */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) and (background: color-mix(in srgb, white, transparent)) {
  .pc-site-header[data-pc-header-theme="light"] {
    --pc-brand-hover-color: color-mix(in srgb, var(--color-primary-dark, var(--primary-hover, #0057c3)) 24%, var(--pc-site-header-foreground, #101114));
  }
}

/* Image-only links need the same keyboard underline as Horizon icon links. */
:root .pc-site-header .pc-site-header__logo:focus-visible {
  box-shadow: inset 0 -2px 0 currentColor !important;
}

/* Use the same currentColor SVG rendering as the product headers, while
   retaining the existing image dimensions and accessible link names. */
@supports (mask-image: url('/assets/images/logo/2025_playcity.svg')) or (-webkit-mask-image: url('/assets/images/logo/2025_playcity.svg')) {
  .pc-site-header .pc-site-header__logo { position: relative; }
  .pc-site-header .pc-site-header__logo::before {
    position: absolute;
    inset: 0;
    background: currentColor;
    -webkit-mask: url('/assets/images/logo/2025_playcity.svg') center / contain no-repeat;
    mask: url('/assets/images/logo/2025_playcity.svg') center / contain no-repeat;
    pointer-events: none;
    content: '';
  }
  .pc-site-header .pc-site-header__logo img { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --pc-brand-motion: 0s; }
}

@media (forced-colors: active) {
  .pc-site-header .pc-site-header__logo::before { display: none; }
  .pc-site-header .pc-site-header__logo img { opacity: 1; }
}
