/* The map uses a centered sight while placing and a gauntlet while panning. */
@media (any-pointer: fine) and (forced-colors: none) {
  #game {
    --waypoint: url("./assets/cursors/waypoint.svg") 1 1, default;
    --choose: url("./assets/cursors/choose.svg") 8 2, pointer;
    cursor: var(--waypoint);
  }
  #game button:enabled, #game summary, #game .hero-group figure, #field.targeting:not(.panning) { cursor: var(--choose); }
  #game button:disabled { cursor: var(--waypoint); }
  #field.placing, #field.placing.targeting:not(.panning) {
    cursor: url("./assets/cursors/place.svg") 16 16, crosshair;
  }
  #field.panning { cursor: url("./assets/cursors/pan.svg") 16 16, grabbing; }
}

/* Keep a real track and thumb so wheel, touch and keyboard scrolling stay native. */
@media (forced-colors: none) {
  :is(#dialog-body, #site-actions, .hero-scroll, .class-dossier) {
    scrollbar-width: auto;
    scrollbar-color: #bfa981 #28362e;
  }
  @supports selector(::-webkit-scrollbar) {
    :is(#dialog-body, #site-actions, .hero-scroll, .class-dossier) {
      scrollbar-color: auto;
    }
    :is(#dialog-body, #site-actions, .hero-scroll, .class-dossier)::-webkit-scrollbar {
      width: 14px;
      height: 14px;
    }
    :is(#dialog-body, #site-actions, .hero-scroll, .class-dossier)::-webkit-scrollbar-track {
      background: linear-gradient(90deg, transparent 43%, #86795b 43% 56%, transparent 56%);
    }
    :is(#dialog-body, #site-actions, .hero-scroll, .class-dossier)::-webkit-scrollbar-track:horizontal {
      background-image: linear-gradient(0deg, transparent 43%, #86795b 43% 56%, transparent 56%);
    }
    :is(#dialog-body, #site-actions, .hero-scroll, .class-dossier)::-webkit-scrollbar-thumb {
      min-height: 28px;
      min-width: 28px;
      border: 2px solid transparent;
      border-radius: 5px / 8px;
      background: linear-gradient(110deg, #e1c995 0 23%, #b7a27d 24% 64%, #83766b 65%) padding-box;
    }
    :is(#dialog-body, #site-actions, .hero-scroll, .class-dossier)::-webkit-scrollbar-thumb:hover {
      background: linear-gradient(110deg, #f5dfb0 0 23%, #d6bc8f 24% 64%, #a69781 65%) padding-box;
    }
    :is(#dialog-body, #site-actions, .hero-scroll, .class-dossier)::-webkit-scrollbar-thumb:active {
      background: #e5ce9f padding-box;
    }
    :is(#dialog-body, #site-actions, .hero-scroll, .class-dossier)::-webkit-scrollbar-corner {
      background: transparent;
    }
  }

  .tool-row {
    border-color: #a697737d;
    border-radius: 2px;
    background: linear-gradient(135deg, #354435ee, #192b22f2 50%, #18281ff5);
    box-shadow: inset 0 1px #bfa57626, 0 3px 10px #08110d80;
  }
  .tool-row .tool { border-radius: 1px; }
  .tool-row .tool[aria-pressed="true"] {
    background: linear-gradient(125deg, #6c755b94, #45574680);
    box-shadow: inset 0 -2px #d6bd86;
  }
  .work-progress i {
    height: 6px;
    background: #16241e;
    box-shadow: 0 0 0 1px #9d90677d;
  }
  .work-progress b {
    background: linear-gradient(0deg, #92829a 0 34%, #b5c6d3 35% 72%, #e5e3cf 73%);
  }
  .site-commands button:enabled:is(:hover, :focus-visible) {
    background: linear-gradient(90deg, #7f896344, #4f665629);
    box-shadow: inset 2px 0 #c6b17f;
  }
}
