.hotbar {
  height: 48px;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.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;
  user-select: none;
  align-items: flex-end;
  justify-content: center;
  border: 1px solid black;
  background-image: url("/png/bg2.png");
  margin: 2px;
  position: relative;
  box-shadow: 0px 0px 10px 0px black;
}

.hotbar-item .hotbar-text {
  flex: 1 1 auto;
  z-index: 10;
  font-size: 8px;
  color: white;
  text-align: center;
  pointer-events: none;
  text-shadow: 1px 1px 0 black;
}

.hotbar-item .hotbar-key {
  font-size: 8px;
  pointer-events: none;
  position: absolute;
  left: 2px;
  top: 2px;
  z-index: 10;
  text-shadow: 1px 1px 0 black;
}

.hotbar-item.assigned .hotbar-key {
  color: white;
}

/* Number of the items of an item hotkey in the equipment and open containers */
.hotbar-item .hotbar-count {
  position: absolute;
  right: 1px;
  bottom: 0px;
  z-index: 10;
  font-size: 9px;
  font-weight: bold;
  color: #f0f0f0;
  pointer-events: none;
  text-shadow: 1px 1px 0 black, -1px 0 0 black;
}

.hotbar-item .hotbar-count.empty {
  color: #d04040;
}

.hotbar-item canvas {
  position: absolute;
  pointer-events: none;
  width: 32px;
  height: 32px;
}

/* "Add item": the cursor is a crosshair until an item is clicked */
body.hotbar-picking,
body.hotbar-picking * {
  cursor: crosshair !important;
}

/* Menu of a hotkey slot */
#hotbar-menu {
  width: 96px;
}

/* "Add spell" window */
#spellbook-modal {
  width: 360px;
}

#spellbook-list {
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  padding: 2px 6px 6px 6px;
  border: 1px solid black;
  box-shadow: inset 0 0 6px black;
  background-image: url("/png/bg2.png");
}

#spellbook-list .spellbook-group {
  margin: 6px 0 3px 0;
  padding-bottom: 1px;
  font-size: 11px;
  font-weight: bold;
  color: #c8b88a;
  border-bottom: 1px solid rgba(0, 0, 0, 0.6);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

#spellbook-list .spellbook-icons {
  display: flex;
  flex-wrap: wrap;
}

#spellbook-list .spellbook-spell {
  width: 32px;
  height: 32px;
  margin: 2px;
  border: 1px solid black;
  box-shadow: 0px 0px 4px 0px black;
  cursor: pointer;
}

#spellbook-list .spellbook-spell canvas {
  display: block;
  width: 32px;
  height: 32px;
  pointer-events: none;
}

#spellbook-list .spellbook-spell:hover {
  box-shadow: 0px 0px 8px 0px white;
}

/* Above the level (or magic level) of the player: greyed, still assignable */
#spellbook-list .spellbook-spell.locked canvas {
  filter: grayscale(1) brightness(0.6);
}

#spellbook-list .spellbook-empty {
  padding: 24px 0;
  text-align: center;
  color: #a0a0a0;
}

#spellbook-info {
  min-height: 28px;
  margin-top: 6px;
  padding: 3px 4px;
  font-size: 11px;
  color: #dcdcdc;
  border: 1px solid black;
  background-image: url("/png/bg2.png");
}

/* Use mode of an item hotkey */
#hotbar-item-modal {
  width: 240px;
}

#hotbar-item-modal .hotbar-item-head {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

#hotbar-item-canvas {
  width: 32px;
  height: 32px;
  margin-right: 8px;
  border: 1px solid black;
  background-image: url("/png/bg2.png");
  box-shadow: 0px 0px 4px 0px black;
}

#hotbar-item-name {
  font-weight: bold;
}

#hotbar-item-modal .hotbar-mode {
  display: block;
  padding: 2px 0;
  cursor: pointer;
}

#hotbar-item-modal .hotbar-mode input {
  margin-right: 6px;
  vertical-align: middle;
}

/* Party shields in front of the names (client/src/party.js) */
.party-shield { display: none; width: 9px; height: 10px; margin-right: 2px; vertical-align: -1px; border-radius: 2px 2px 5px 5px; border: 1px solid rgba(0, 0, 0, 0.8); }
.party-shield.leader { display: inline-block; background: linear-gradient(180deg, #fff3a0, #e0b020); }
.party-shield.member { display: inline-block; background: linear-gradient(180deg, #a8d8ff, #2a7ad0); }
.party-shield.invited { display: inline-block; background: linear-gradient(180deg, #ffffff, #b8b8b8); }
.party-shield.inviter { display: inline-block; background: linear-gradient(180deg, #fff3a0, #e0b020); box-shadow: 0 0 3px #ffffff; }
.party-shield.shared { box-shadow: 0 0 4px 1px #5cff5c; }
.party-shield.shared-off { box-shadow: 0 0 4px 1px #ff4040; }
#screen-menu .party-actions button { display: none; }
#screen-menu .party-actions button.visible { display: block; }

/* Trade window (client/src/trade.js) */
#trade-window { display: none; position: fixed; right: 16px; top: 120px; width: 300px; z-index: 50; padding: 6px; color: #d8d8d8; font-size: 11px;
  background: #3a3a3a; border: 1px solid #111; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); }
#trade-window .trade-title { font-weight: bold; text-align: center; color: #f0e6c8; margin-bottom: 4px; }
#trade-window .trade-columns { display: flex; gap: 4px; }
#trade-window .trade-column { flex: 1 1 0; min-width: 0; background: rgba(0, 0, 0, 0.35); border: 1px solid #111; }
#trade-window .trade-head { padding: 2px 4px; color: #e9c46a; border-bottom: 1px solid #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#trade-window .trade-items { min-height: 80px; max-height: 220px; overflow-y: auto; padding: 2px; }
#trade-window .trade-item { display: flex; align-items: center; gap: 4px; }
#trade-window .trade-item canvas { width: 32px; height: 32px; image-rendering: pixelated; flex: 0 0 32px; }
#trade-window .trade-empty { color: #9a9a9a; font-style: italic; padding: 4px; }
#trade-window .trade-status { min-height: 14px; margin: 4px 0; color: #9fd89f; text-align: center; }
#trade-window .trade-buttons { display: flex; justify-content: center; gap: 8px; }
#screen-menu .party-actions button.visible { display: block; }

/* Skulls of players (client/src/skulls.js) */
/* The skull icons of the Tibia client (client/png/skulls.png, 11 x 11: white, red, green, yellow, orange) */
.skull { display: none; width: 11px; height: 11px; margin-right: 2px; vertical-align: -2px; background: url("../png/skulls.png") no-repeat; image-rendering: pixelated; }
.skull.white { display: inline-block; background-position: 0 0; }
.skull.red { display: inline-block; background-position: -11px 0; }
.skull.green { display: inline-block; background-position: -22px 0; }
.skull.yellow { display: inline-block; background-position: -33px 0; }
/* Above a creature: below the right end of the health bar (Tibia 8.0) */
.text-window .skull { position: absolute; left: calc(50% + 14px); top: 19px; margin: 0; }
/* The status bar: the own skull with the time left */
.status-skull { display: inline-flex; align-items: center; gap: 2px; height: 14px; padding: 0 2px; font-size: 10px; color: #e8e8e8; text-shadow: 1px 1px 0 #000; }
.status-skull .skull { margin: 0; }
