.hotbar {
  height: 48px;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

/* Hovered slot: the accent border and glow of the theme, like the other hovered slots and bars */
.hotbar-item:hover {
  cursor: pointer;
  border-color: var(--color-accent);
  box-shadow: 0 0 6px var(--color-accent-glow);
}

.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?v=5b440427c14f");
  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;
}

.hotbar-item .hotbar-key {
  font-size: 8px;
  pointer-events: none;
  position: absolute;
  left: 2px;
  top: 2px;
}

/* Key label by the content of the slot (data-content, set by HotbarManager): spells white, text blue, objects gold */
.hotbar-item .hotbar-key[data-content="spell"] {
  color: white;
}

.hotbar-item .hotbar-key[data-content="text"] {
  color: var(--color-hotbar-key-text);
}

.hotbar-item .hotbar-key[data-content="object"] {
  color: var(--color-hotbar-key-object);
}

.hotbar-item .hotbar-key[data-content="empty"] {
  color: var(--color-hotbar-key-empty);
}

/* Carried amount of a stackable object (HotbarManager.__renderCount), like the item counts of the slots (see slot.css) */
.hotbar-item .hotbar-count {
  color: white;
  font-size: 10px;
  position: absolute;
  bottom: 1px;
  right: 2px;
  pointer-events: none;
  z-index: 11;
  text-shadow: 1px 1px 0 black;
}

.hotbar-item .hotbar-count.empty {
  color: var(--color-text-dim);
}

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

/* Edit hotkey modal */
#hotbar-edit-modal {
  width: 420px;
  max-width: 90vw;
}

/* Tabs: shared look (ui-tabs, see controls.css), three tabs of the same width */
.hotbar-edit-tabs {
  margin-bottom: 8px;
}

.hotbar-edit-tab {
  flex: 1 1 0;
}

/* All panels share one grid cell so switching tabs never changes the size (and position) of the modal */
.hotbar-edit-panels {
  display: grid;
}

/* Text boxes of the edit hotkey modal: shared look and clear button (see text-field.css) */
.hotbar-edit-panel[data-type="text"] > .text-field-box {
  margin-top: 8px;
}

/* Spell list of the edit hotkey modal */

.hotbar-spell-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
}

#hotbar-spell-list {
  height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  border: 1px solid black;
  border-radius: 6px;
  background-color: rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6);
}

.hotbar-spell {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hotbar-spell:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* Selected spell: the selected look of the theme, like the selected entries of the other lists */
.hotbar-spell.selected {
  background-image: var(--gradient-accent);
  box-shadow: inset 0 0 0 1px var(--color-accent);
}

.hotbar-spell.unusable {
  opacity: 0.5;
}

.hotbar-spell canvas {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  box-shadow: 0px 0px 4px 0px black;
}

.hotbar-spell-info {
  flex: 1 1 auto;
  min-width: 0;
}

.hotbar-spell-name {
  font-weight: bold;
}

.hotbar-spell-words {
  margin-left: 6px;
  color: var(--color-accent-text);
  font-style: italic;
}

.hotbar-spell-description,
.hotbar-spell-vocations {
  font-size: 11px;
}

.hotbar-spell-vocations {
  color: var(--color-text-soft);
}

.hotbar-spell-costs {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.hotbar-spell-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  background-color: rgba(0, 0, 0, 0.5);
}

/* Empty list: italic muted text like the other empty lists (travel, quest log, auto loot) */
.hotbar-spell-empty {
  padding: 12px;
  text-align: center;
  font-style: italic;
  color: var(--color-text-muted);
}

.hotbar-edit-panel {
  grid-area: 1 / 1;
}

.hotbar-edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

#hotbar-edit-item {
  width: 32px;
  height: 32px;
  border: 1px solid black;
  background-image: url("/png/bg2.png?v=5b440427c14f");
}

.hotbar-edit-modes {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.hotbar-edit-modes label:has(input:disabled) {
  opacity: 0.5;
}

/* Change key modal */
#hotbar-key-error {
  color: var(--color-error);
  text-align: center;
  min-height: 14px;
  margin-top: 6px;
}

