html {
  height: 100%;
}

/* Thin scrollbars everywhere: scrollbar-width is not inherited, so every scrolling list gets it here
   (lists without a scrollbar, e.g., the mobile hotbar, set "none" on their own class) */
* {
  scrollbar-width: thin;
}

.oogwrap {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* "clip" cannot be scrolled by the browser (e.g., focusing a button after alt-tab shifted the whole panel) */
  overflow: clip;
  height: 100%;
}

/* Grooved separator between the fixed panel (minimap, bars, equipment) and the opened windows below */
.oogwrap2 {
  border-bottom: 1px solid #000;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12);
  margin-bottom: 2px;
}

body {
  height: 100%;
  margin: 0px;
  font-family: Verdana, "Sans-Serif";
  font-weight: bold;
  text-shadow: 0 0 2px black, 0 0 2px black, 0 0 2px black, 0 0 2px black;
  font-size: 12px;
  color: white;
  /* Inherited by every scrolling list and panel (theme.css) */
  scrollbar-color: var(--color-scrollbar-thumb) var(--color-scrollbar-track);
  background-image: url("/png/bg2.png?v=5b440427c14f");
}

#battle-window-target {
  display: none;
  align-items: center;
}

/* Battle Window Bars */
.battle-window-bar-wrapper {
  display: flex;
  flex-direction: column;
}

.bar-holder {
  position: relative;
  height: 12px;
  background-color: #222;
  border: 1px solid black;
  margin: 1px 0;
}

.battle-window-target-stats-bar {
  height: 100%;
  /* Width is set by JS */
}

/* Default fill of the battle list health bars: BattleWindow.updateCreature colors it by the health of the creature */
.health {
  background: #00C000;
}

.mana {
  background: #0000C0;
}

.bar-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 9px;
  color: white;
  line-height: 11px;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
  pointer-events: none;
}

.battle-window-target-wrapper:hover {
  border: 1px solid var(--color-accent);
  cursor: pointer;
}

/* Use-with active (runes, tools) or dragging: Classic target cursor (four arrows pointing inward) everywhere, overriding element cursors */
body[data-cursor="use-with"],
body[data-cursor="use-with"] *,
body[data-cursor="grabbing"],
body[data-cursor="grabbing"] * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='19' shape-rendering='crispEdges'%3E%3Cg fill='black'%3E%3Crect x='5' y='0' width='9' height='2'/%3E%3Crect x='6' y='2' width='7' height='1'/%3E%3Crect x='7' y='3' width='5' height='1'/%3E%3Crect x='8' y='4' width='3' height='1'/%3E%3Crect x='9' y='5' width='1' height='1'/%3E%3Crect x='5' y='17' width='9' height='2'/%3E%3Crect x='6' y='16' width='7' height='1'/%3E%3Crect x='7' y='15' width='5' height='1'/%3E%3Crect x='8' y='14' width='3' height='1'/%3E%3Crect x='9' y='13' width='1' height='1'/%3E%3Crect x='0' y='5' width='2' height='9'/%3E%3Crect x='2' y='6' width='1' height='7'/%3E%3Crect x='3' y='7' width='1' height='5'/%3E%3Crect x='4' y='8' width='1' height='3'/%3E%3Crect x='5' y='9' width='1' height='1'/%3E%3Crect x='17' y='5' width='2' height='9'/%3E%3Crect x='16' y='6' width='1' height='7'/%3E%3Crect x='15' y='7' width='1' height='5'/%3E%3Crect x='14' y='8' width='1' height='3'/%3E%3Crect x='13' y='9' width='1' height='1'/%3E%3C/g%3E%3Cg fill='white'%3E%3Crect x='6' y='1' width='7' height='1'/%3E%3Crect x='7' y='2' width='5' height='1'/%3E%3Crect x='8' y='3' width='3' height='1'/%3E%3Crect x='9' y='4' width='1' height='1'/%3E%3Crect x='6' y='17' width='7' height='1'/%3E%3Crect x='7' y='16' width='5' height='1'/%3E%3Crect x='8' y='15' width='3' height='1'/%3E%3Crect x='9' y='14' width='1' height='1'/%3E%3Crect x='1' y='6' width='1' height='7'/%3E%3Crect x='2' y='7' width='1' height='5'/%3E%3Crect x='3' y='8' width='1' height='3'/%3E%3Crect x='4' y='9' width='1' height='1'/%3E%3Crect x='17' y='6' width='1' height='7'/%3E%3Crect x='16' y='7' width='1' height='5'/%3E%3Crect x='15' y='8' width='1' height='3'/%3E%3Crect x='14' y='9' width='1' height='1'/%3E%3C/g%3E%3C/svg%3E") 9 9, crosshair !important;
}

/* Shift held: show the look cursor like on the game screen */
body[data-cursor="zoom-in"] .battle-window-target-wrapper:hover {
  cursor: zoom-in;
}

.battle-window-target-wrapper {
  display: flex;
  width: 100%;
  margin: 0px 0px 1px 0px;
  /* Transparent until hovered, followed or attacked: the entries keep their size */
  border: 1px solid transparent;
}

/* Battle list entry state (see BattleWindow.__updateBorder): accent while hovered, green when followed, red when attacked */
.battle-window-target-wrapper.hovered {
  border-color: var(--color-accent);
}

.battle-window-target-wrapper.followed {
  border-color: var(--color-battle-follow);
}

.battle-window-target-wrapper.targeted {
  border-color: var(--color-battle-target);
}

.battle-window-target-title {
  color: rgba(0, 255, 0);
}

.battle-window-target-canvas {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding-left: 2px;
}

.battle-window-target-canvas>canvas {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

.battle-window-target-stats {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: 2px 4px;
}

.visible {
  visibility: visible;
  opacity: 1;
}

.hidden {
  visibility: hidden;
  opacity: 0;
}

.zone-sub {
  font-size: 24px;
  color: white;
  font-family: Goudy Old Style;
}

.zone-title {
  font-variant: small-caps;
  font-family: Arno Pro;
  letter-spacing: 5px;
}

/* Zone message: the theme accent (see theme.css) */
#zone-message hr {
  color: var(--color-accent);
  padding: 0px;
  margin: 0px;
  background: var(--color-accent);
}

#zone-message {
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  font-size: 36px;
  color: var(--color-accent);
  top: 20%;
  text-align: center;
  position: absolute;
  z-index: 10000000;
  padding: 4px;
}

/* Server message on the game screen (look, loot, broadcasts): like in Tibia, no background, only a black outline */
#server-message {
  display: none;
  padding: 4px;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  max-width: 256px;
  top: 50%;
  text-align: center;
  position: absolute;
  text-shadow: 1px 1px 1px black, -1px -1px 1px black, 1px -1px 1px black, -1px 1px 1px black;
}

/* Private messages on the game screen, like the privateLabel of OTClient: their own element (server messages never replace them),
   centered in the upper half of the screen (above the player), 275px wide, light blue without background */
#private-message {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 25%;
  transform: translateY(-50%);
  width: 275px;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  overflow-wrap: break-word;
  pointer-events: none;
  text-shadow: 1px 1px 1px black, -1px -1px 1px black, 1px -1px 1px black, -1px 1px 1px black;
}

/* The close cross of the modals turns gold while hovered, like the header buttons of the windows */
.close-button-transparent:hover {
  font-weight: bold;
  color: var(--color-accent);
  border: none;
  box-shadow: none;
}

.close-button-transparent {
  position: absolute;
  right: 6px;
  border: 0px;
  background: none;
}

/* Styling for input */
input {
  background-image: url("/png/bg3.png?v=cabdf9c77067");
  height: 14px;
  outline: none;
  padding: 4px;
  text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
  font-weight: bold;
  border: 0px;
}

hr {
  border: 0;
  height: 1px;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0), grey, rgba(0, 0, 0, 0));
  margin: 8px;
}

/* Styling for buttons */
button {
  font-size: 10px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  background-image: url("/png/bg3.png?v=cabdf9c77067");
  border: 1px solid black;
  margin: 2px;
  padding: 4px;
  border-radius: 4px;
}

/* Hovered default buttons (e.g., Stats, Battle, the login screen buttons) get the accent border of the theme */
button:hover {
  border: 1px solid var(--color-accent);
  background-image: url("/png/bg2.png?v=5b440427c14f");
}

button:disabled {
  color: grey;
}

button:disabled:hover {
  border: 1px solid grey;
  box-shadow: 0 0 4px 1px grey;
}

/* Styling for custom buttons */
button.symbol-button.small {
  font-size: 8px;
}

button.symbol-button {
  padding: 0px;
  width: 18px;
  height: 18px;
  min-width: 18px;
  max-width: 18px;
}

.symbol-button-long {
  padding: 0px;
  min-width: 24px;
}

#game-wrapper {
  display: none;
  height: 100%;
  min-width: 992px;
  min-height: 508px;
}

/* The column fills the width of its side panel (e.g., as wide as the minimap and equipment), at least 180px.
   "contain: inline-size" stops long content in a window from widening the panel */
#game-wrapper .column {
  display: flex;
  width: auto;
  min-width: 180px;
  contain: inline-size;
  flex-direction: column;
  justify-content: flex-start;
  background-image: url("/png/bg2.png?v=5b440427c14f");
  max-height: 100%;
  min-height: 100%;
  flex: 0 1 auto;
  overflow: hidden;
  overflow: clip;
}

#game-wrapper .main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  overflow: clip;
}


.main .middle {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  align-items: flex-end;
  background-image: url("/png/bg.png?v=552de1a126ee");
}

.main .upper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  background-image: url("/png/bg.png?v=552de1a126ee");
  overflow: hidden;
  /* Anchor for the game modals, which may be larger than the game screen */
  position: relative;
}

.main .lower {
  height: 100%;
  background-image: url("/png/bg2.png?v=5b440427c14f");
  overflow: hidden;
  overflow: clip;
  max-height: 140px;
  flex: 1 1 auto;
}

.no-select {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* The game interface (side panels, windows, buttons, labels) is not selectable: clicking around never highlights text */
#game-wrapper,
.window {
  -webkit-user-select: none;
  user-select: none;
}

/* Only text meant to be copied or typed stays selectable: chat messages, text inputs and text areas (e.g., books) */
#game-wrapper .chat-body,
#game-wrapper input,
#game-wrapper textarea {
  -webkit-user-select: text;
  user-select: text;
}

.canvas-notification {
  text-align: center;
  color: white;
  position: absolute;
  bottom: 2px;
  width: 100%;
  z-index: 8000;
}

#debug-statistics {
  z-index: 1000;
  margin: 8px;
  position: absolute;
  font-size: 10px;
  left: 0px;
  top: 0px;
}