.equipment-options-wrapper {
  display: flex;
  margin: 8px;
}

/* Two columns that line up top and bottom: the store sits above the window icons (which
   will grow over time), the collapse toggle sits above settings/logout. The right column
   is a fixed width (just enough for settings+logout) so collapsing the grid never resizes
   the store, and the store spans as wide as the status bar above it. */
.equipment-buttons {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 2px;
  margin: 4px 0 0;
}

.equipment-buttons .store-button {
  grid-column: 1;
  grid-row: 1;
  height: 22px;
  margin: 0;
  background-image: url("../png/options/store_large.png");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: 100% 200%;
  border: 0;
  cursor: pointer;
  image-rendering: pixelated;
  padding: 0px;
}

.equipment-buttons .store-button:active {
  background-position: center bottom;
}

.equipment-buttons .icon-shrink {
  grid-column: 2;
  grid-row: 1;
  width: 44px;
  height: 22px;
  margin: 0;
  padding: 0px;
  background-color: rgba(0, 0, 0, 0.4);
  background-image: url("../png/options/button_shrink.png");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: 100% 200%;
  border: 1px solid black;
  cursor: pointer;
  image-rendering: pixelated;
}

.icon-shrink:hover {
  border-color: white;
}

.icon-shrink:active {
  background-position: center bottom;
}

.icon-shrink.collapsed {
  background-image: url("../png/options/button_enlarge.png");
}

/* Settings/logout (fixed pair, under the store) and the window icons (grows over time,
   under the collapse toggle), split by a thin divider. */
.icon-grid {
  display: contents;
}

.icon-grid.hidden {
  display: none;
}

.icon-group-left {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  gap: 2px;
}

.icon-group-right {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  gap: 2px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 4px;
}

.grid-icon {
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0px;
  background-color: rgba(0, 0, 0, 0.4);
  background-repeat: no-repeat;
  border: 1px solid black;
  cursor: pointer;
  image-rendering: pixelated;
}

.grid-icon:hover {
  border-color: white;
}

.grid-icon.icon-logout {
  background-image: url("../png/options/button_logout.png");
  background-position: left center;
  background-size: 200% 100%;
}

.grid-icon.icon-settings,
.grid-icon.icon-skills,
.grid-icon.icon-battlelist,
.grid-icon.icon-vip,
.grid-icon.icon-hub,
.grid-icon.icon-hunting-analyser {
  background-position: left center;
  background-size: 200% 100%;
}

.grid-icon.icon-settings:active,
.grid-icon.icon-skills:active,
.grid-icon.icon-battlelist:active,
.grid-icon.icon-vip:active,
.grid-icon.icon-hub:active,
.grid-icon.icon-hunting-analyser:active {
  background-position: right center;
}

.grid-icon.icon-settings {
  background-image: url("../png/options/button_options.png");
}

.grid-icon.icon-skills {
  background-image: url("../png/options/button_skills.png");
}

.grid-icon.icon-hub {
  background-image: url("../png/options/terminal.png");
}

.grid-icon.icon-battlelist {
  background-image: url("../png/options/button_battlelist.png");
}

.grid-icon.icon-vip {
  background-image: url("../png/options/button_vip.png");
}

/* Same sprite sheet the mobile layout already uses for its Hunt Analyser button (see
   .mobile-hunt-icon in mobile-layout.css) -- a 2-frame (normal/active) sheet like the icons
   above, just under a name that predates this button getting a real sprite. */
.grid-icon.icon-hunting-analyser {
  background-image: url("../png/options/analyzers.png");
}

/* Two columns beside the backpack: how hard the character swings on the left and what it
   does about its target on the right, line by line, with the stop under both. */
.combat-modes {
  display: grid;
  grid-template-columns: repeat(2, 22px);
  align-content: center;
  gap: 2px;
  margin-left: 4px;
}

.combat-stop {
  grid-column: 1 / -1;
  height: 20px;
  font-size: 10px;
  color: white;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid black;
  cursor: pointer;
}

.combat-stop:hover {
  border-color: white;
}

button.combat-mode {
  width: 22px;
  height: 22px;
  padding: 0px;
  font-size: 0px;
  background: rgba(0, 0, 0, 0.4);
  background-position: center top;
  background-repeat: no-repeat;
  border: 1px solid black;
  cursor: pointer;
  image-rendering: pixelated;
}

button.combat-mode:hover {
  border-color: white;
}

/* The one that is picked, and the two toggles when they are on */
button.combat-mode.on {
  background-color: rgba(200, 170, 60, 0.55);
  background-position: center bottom;
  border-color: white;
}

button.combat-mode.combat-offensive {
  background-image: url("../png/combat-offensive.png");
}

button.combat-mode.combat-balanced {
  background-image: url("../png/combat-balanced.png");
}

button.combat-mode.combat-defensive {
  background-image: url("../png/combat-defensive.png");
}

button.combat-mode.combat-stand {
  background-image: url("../png/combat-stand.png");
}

button.combat-mode.combat-chase {
  background-image: url("../png/combat-chase.png");
}

button.combat-mode.combat-secure {
  background-image: url("../png/combat/safefight.png");
}

.character-status {
  margin: 8px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 3px 2px;
}

.bar {
  flex: 1 1 auto;
  border: 1px solid black;
  border-radius: 8px;
  height: 12px;
  text-align: center;
  cursor: pointer;
  background-image: url("../png/bg3.png");
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), inset 0 -1px 1px rgba(0, 0, 0, 0.55);
}

.bar:hover {
  border: 1px solid white;
}

.bar .icon {
  position: absolute;
  left: 0;
  font-size: 10px;
}

.bar-symbol {
  background-repeat: no-repeat;
  background-size: contain;
  display: block;
  flex: 0 0 12px;
  height: 11px;
  image-rendering: pixelated;
  width: 12px;
}

.bar-symbol.hp-symbol {
  background-image: url("../png/hitpoints_symbol.png");
}

.bar-symbol.mp-symbol {
  background-image: url("../png/mana_symbol.png");
}

.bar .percentage {
  position: absolute;
  font-size: 10px;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
}

.bar-current {
  flex: 0 0 32px;
  width: 32px;
  height: 12px;
  color: white;
  text-shadow: 1px 1px 1px black;
  font-size: 9px;
  line-height: 12px;
  text-align: center;
  box-sizing: border-box;
}

.character-health {
  background-image: url("../png/bars.png");
  background-position: left center;
  background-repeat: no-repeat;
  background-size: 100% 300%;
  left: 0;
  width: 100%;
  height: 100%;
  position: absolute;
}

.character-mana {
  background-image: url("../png/bars.png");
  background-position: left bottom;
  background-repeat: no-repeat;
  background-size: 100% 300%;
  left: 0;
  width: 100%;
  height: 100%;
  position: absolute;
}

#health-bar,
#mana-bar {
  height: 11px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: url("../png/bars.png") left top / 100% 300% no-repeat;
  image-rendering: pixelated;
}

.equipment.wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.equipment-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.status-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 2px;
  /* The icons themselves are tiny (9x9), so the old 18px min-height left as much empty space
     above/below each one as the icon itself was tall -- this keeps just a sliver of breathing
     room instead */
  min-height: 11px;
  margin-top: 4px;
  background-image: url("../png/bg3.png");
  border: 1px solid black;
}

.status-bar img {
  flex: 0 0 auto;
}

/* Warns that a timed status is about to run out (currently just Magic Shield, see
   StatusBar.scheduleMagicShieldBlink) */
.status-bar img.blinking {
  animation: status-blink 0.8s ease-in-out infinite;
}

@keyframes status-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

#head-slot {
  background-image: url("../png/head.png");
}

#armor-slot {
  background-image: url("../png/armor.png");
}

#legs-slot {
  background-image: url("../png/legs.png");
}

#backpack-slot {
  background-image: url("../png/backpack.png");
}

#boots-slot {
  background-image: url("../png/boots.png");
}

#left-slot {
  background-image: url("../png/left.png");
}

#right-slot {
  background-image: url("../png/right.png");
}

#shoulder-slot {
  background-image: url("../png/shoulder.png");
}

#ring-slot {
  background-image: url("../png/ring.png");
}

#quiver-slot {
  background-image: url("../png/quiver.png");
}

.equipment-padding {
  text-align: center;
  font-size: 10px;
  min-height: 24px;
}

/* The two "micro espaço" buttons real Tibia sits just above the amulet and backpack slots
   (Store Inbox and Blessings) -- a badge overlapping the slot's own top edge rather than a
   real extra grid row, since a real row would only exist in two of the three equipment
   columns and break their shared vertical alignment (see equipment-column's independent
   centering above). .slot is already position:relative, the same anchor the per-slot item
   count badge in slot.css uses.

   Each is the bare icon itself -- no boxed/bordered background behind it, and no shrinking it
   down further inside its own little square. Every one of these source images is actually two
   frames (idle/pressed), the same convention .grid-icon already uses elsewhere in this file --
   min/max/blessings split left-right (200% 100%, matching .grid-icon exactly), purse.png splits
   top-bottom instead (100% 200%). Showing both frames stretched into one box at 100% 100% (an
   earlier version of this rule) is what made every one of them look doubled/squashed. */
.hud-icon-button {
  border: 0;
  padding: 0;
  margin: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  cursor: pointer;
  image-rendering: pixelated;
}

.hud-icon-button:hover {
  filter: brightness(1.3);
}

/* Above the amulet slot: two icons side by side (a future inventory-shrink toggle, min/max
   pair -- only the icon for now, no function yet -- and the Blessings button), splitting the
   slot's own 32px width evenly between them. Each source frame is a 12x12 square; 16px wide
   keeps them side by side within the slot's own width, 14px tall keeps them close to square. */
.hud-corner-buttons {
  position: absolute;
  top: -14px;
  left: 0;
  width: 32px;
  height: 14px;
  display: flex;
  z-index: 110;
}

.hud-corner-buttons .hud-icon-button {
  flex: 1 1 50%;
  height: 100%;
  background-size: 200% 100%;
  background-position: left center;
}

.hud-corner-buttons .hud-icon-button:active {
  background-position: right center;
}

#hud-shrink-button {
  background-image: url("../png/window/min_button_small.png");
}

#hud-blessings-button {
  background-image: url("../png/window/button_blessings_grey.png");
}

#hud-blessings-button.blessings-gold {
  background-image: url("../png/window/button_blessings_gold.png");
}

#hud-blessings-button.blessings-green {
  background-image: url("../png/window/button_blessings_green.png");
}

/* Above the backpack slot: one icon spanning the slot's full 32px width. purse.png's single
   frame is 34x12 (the full 34x24 file is idle-over-pressed, stacked top-bottom rather than
   .grid-icon's usual left-right) -- 32x11 keeps that frame's own aspect ratio. */
.hud-icon-button-wide {
  position: absolute;
  top: -11px;
  left: 0;
  width: 32px;
  height: 11px;
  background-size: 100% 200%;
  background-position: center top;
  z-index: 110;
}

.hud-icon-button-wide:active {
  background-position: center bottom;
}

#hud-store-inbox-button {
  background-image: url("../png/window/purse.png");
}
