.hotbar {
  height: 48px;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0px 2px;
  box-sizing: border-box;
  overflow: hidden;
}

.hotbar-item:hover {
  cursor: pointer;
  box-shadow: 0px 0px 10px 0px white;
}

.active {
  animation: fade 0.25s ease-in-out;
}

@keyframes fade {
  0% {   box-shadow: 0px 0px 0px 0px white; }
  50% {   box-shadow: 0px 0px 10px 0px white; }
  100% {   box-shadow: 0px 0px 0px 0px white; }
}

.hotbar-item {
  color: grey;
  display: flex;
  height: 32px;
  width: 32px;
  min-width: 32px;
  flex: 0 0 32px;
  user-select: none;
  align-items: flex-end;
  justify-content: center;
  border: 1px solid transparent;
  background-image: url("../png/item-background.png");
  background-origin: border-box;
  background-size: 34px 34px;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  margin: 2px;
  position: relative;
  box-shadow: 0px 0px 10px 0px black;
}

/* A slot with a real item bound to it (as opposed to a spell, or empty) looks like an actual
   pressable button instead of the plain slot background: clean-button.png is two 34x34 frames
   side by side (left = at rest, right = pressed), same "left normal / right pressed"
   convention as button_gray.png elsewhere in this project (see .modal .modal-footer button:active
   in modal.css). __handleLightUp already toggles the "active" class on click/hotkey press for
   the light-up flash -- reused here to swap to the pressed frame for that same instant. */
.hotbar-item.item-bound {
  background-image: url("../png/clean-button.png");
  background-size: 200% 100%;
  background-position: left center;
}

.hotbar-item.item-bound.active {
  background-position: right center;
}

.hotbar-item .hotbar-text {
  flex: 1 1 auto;
  z-index: 10;
  font-size: 8px;
  color: white;
  text-align: center;
  /* A hotkeyed text macro can be much longer than a spell's cooldown ("12.3s") or an item's
     stack count ever are -- clip it instead of overflowing the 32px slot */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 100%;
}

.hotbar-item .hotbar-key {
  font-size: 8px;
  pointer-events: none;
  position: absolute;
  left: 2px;
  top: 2px;
  right: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hotbar-item canvas {
  position: absolute;
  pointer-events: none;
  width: 32px;
  height: 32px;
}

#hotkey-modal {
  width: 280px;
}

#hotkey-modal-text {
  color: white;
  margin-bottom: 6px;
}

