/* Shared dock presentation. Native controls keep their layout, hitbox and state.
   The face inherits the current component skin rather than duplicating themes. */
html body .wm-dock-control[data-wm-dock-item] {
  z-index: var(--wm-dock-order, 1);
  /* Bridge legacy hover lifts: the shared spring is the sole transform owner. */
  transform: none !important;
  translate: none !important;
  scale: none !important;
}

html body .wm-dock-control[data-wm-dock-position="static"] { position: relative; }

.wm-dock-control > wm-dock-face.wm-dock-face {
  box-sizing: border-box;
  display: inherit;
  position: relative;
  flex: 1 1 auto;
  align-self: stretch;
  justify-self: stretch;
  grid-column: 1 / -1;
  min-width: 0;
  min-height: 0;
  flex-direction: inherit;
  flex-wrap: inherit;
  align-items: inherit;
  justify-content: inherit;
  align-content: inherit;
  grid-template-columns: inherit;
  grid-template-rows: inherit;
  gap: inherit;
  padding: inherit;
  border-width: inherit;
  border-style: inherit;
  border-color: transparent;
  border-radius: inherit;
  margin: calc(-1 * var(--wm-dock-inset-top, 0px))
    calc(-1 * var(--wm-dock-inset-right, 0px))
    calc(-1 * var(--wm-dock-inset-bottom, 0px))
    calc(-1 * var(--wm-dock-inset-left, 0px));
  color: inherit;
  -webkit-text-fill-color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: inherit;
  text-decoration: inherit;
  white-space: inherit;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-origin: center;
  transform: translate3d(var(--wm-dock-x, 0px), var(--wm-dock-y, 0px), 0)
    scale(var(--wm-dock-scale, 1));
}

[data-wm-dock-active] .wm-dock-control > wm-dock-face.wm-dock-face {
  background: inherit;
  border-color: inherit;
  box-shadow: inherit;
}

/* Pointer targets remain native even when a child supplies its own cursor. */
.wm-dock-control > wm-dock-face.wm-dock-face * { pointer-events: none; }

/* An important layer bridges legacy focus rules without escalating selector
   specificity. Keep the visible ring inside the moving face, not its hitbox. */
@layer wm-dock-focus {
  .wm-dock-control[data-wm-dock-item]:focus-visible { outline: none !important; }
}
.wm-dock-control[data-wm-dock-item]:focus-visible > wm-dock-face.wm-dock-face {
  outline: 2px solid currentColor;
  outline-offset: -3px;
}

html:is([data-motion="off"], [data-motion="reduced"], [data-reduced-motion="true"])
  .wm-dock-control > wm-dock-face.wm-dock-face { transform: none; }

/* Only visible selected controls and primary actions acquire a light pass.
   Keep it beneath the label and within the face while the dock translates it. */
@media screen and (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  [data-wm-dock-lit] > wm-dock-face.wm-dock-face {
    --wm-dock-satin-edge: rgba(197, 145, 61, .15);
    --wm-dock-satin-light: rgba(255, 238, 185, .37);
    overflow: clip;
  }
  html[data-accent="blue"] [data-wm-dock-lit] > wm-dock-face.wm-dock-face {
    --wm-dock-satin-edge: rgba(125, 167, 221, .10);
    --wm-dock-satin-light: rgba(226, 240, 255, .14);
  }
  [data-wm-dock-lit] > wm-dock-face.wm-dock-face::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    transform: translate3d(-100%, 0, 0);
    opacity: var(--wm-dock-satin-opacity, 1);
    background: linear-gradient(111deg, transparent 27%, var(--wm-dock-satin-edge) 38%,
      var(--wm-dock-satin-light) 49%, transparent 66%);
    animation: wm-dock-satin 18s cubic-bezier(.32,.06,.43,1) infinite;
  }
  [data-wm-dock-lit]:is([aria-current], [aria-selected], [aria-pressed]) > wm-dock-face::before {
    animation-delay: .55s;
  }
}

@keyframes wm-dock-satin {
  0%, 4% { transform: translate3d(-100%, 0, 0); }
  25%, 100% { transform: translate3d(100%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .wm-dock-control > wm-dock-face.wm-dock-face { transform: none; }
}

@media print {
  .wm-dock-control > wm-dock-face.wm-dock-face {
    transform: none;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
  }
}
