*,
*::before,
*::after {
  box-sizing:border-box;
  margin:0;
  padding:0;
}

:root {
  --bodyBG: #302922;
  --darkBG: #201e1c;
  --darkHoverBG: #36312d;
  --bankBG: #844b40;

  --fontColor: #fff;
  --spacing: calc(740px + 2rem);
}

@font-face {
  font-family: "HelvetiPixel";
  src: url("./fonts/HelvetiPixel.ttf");
}

@font-face {
  font-family: "Adventurer";
  src: url("./fonts/Adventurer.ttf");
}

body {
  background-color: var(--bodyBG);
  color: var(--fontColor);
  padding: 0;
  font-size: 18px;
  font-family: 'HelvetiPixel', sans-serif;
  line-height: 1;
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow-y: hidden;
  margin: 0;
}

h1,h2,h3,h4,h5,h6 {
  font-family: 'Adventurer', sans-serif;
  margin-bottom: 0.5rem;
}

h1 {
  margin-bottom: 1rem;
}

h2 {
  margin-top: 2.5rem;
}

.title-version {
  font-size: 0.65rem;
}

.button {
  border: 0;
  background-color: var(--darkBG);
  padding: 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  font-family: 'HelvetiPixel', sans-serif;
  font-size: 20px;
  cursor: pointer;
}

.button:hover,
.button:focus {
  background-color: var(--darkHoverBG);
}

.button span {
  color: white;
}

.button img {
  width: 1.5rem;
  height: 1.5rem;
  line-height: 0;
  display: block;
  margin-left: 1rem;
  margin-right: 1rem;
}

.on,
.off {
  display: flex;
  align-items: center;
}

[data-state="false"] .on,
[data-state="true"] .off {
  display: none;
}

/* Range selector
============================================ */

range-selector {
  display: flex;
  align-items: center;
}

range-selector input {
  width: 350px;
}

range-selector span {
  margin-left: 1.5rem;
}

range-selector div {
  margin-left: 0.25rem
}

/* Fade
============================================ */

.fade {
  display: block;
  background: url(../images/fade.png);
  background-position: -70px 0;
  background-repeat: repeat-y;
  background-size: 1400px;
  position: absolute;
  top: 0;
  left: 0;
  width: 1400px;
  height: 1050px;
  z-index: 99;
  transition: ease-in-out 0.5s left;
}

.fade--fade-out {
  left: -1500px;
}

/* startscreen
============================================ */

start-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease-in-out, visibility 0.15s ease-in-out;
  z-index: 100;
  border-radius: 15px;
}

start-screen.is-active {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.start-screen__panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--bankBG);
  padding: 2rem;
  border-radius: 10px;
  width: 60%;
  max-width: 100%;
  max-height: 80vh;
  overflow-y: scroll;
  pointer-events: auto;
}

.start-screen__content {
  margin-bottom: 3rem;
  overflow-y: scroll;
}

.start-screen__content h2 {
  margin-bottom: 1rem;
}

/* Game
============================================ */

.game {
  position: relative;
  display: flex;
  justify-content: space-between;
  width: 1200px;
  height: 1050px;
  margin: 0px auto;
  flex-wrap: wrap;
  background-image: url(../images/bg-tall.png);
  background-repeat: no-repeat;
  background-position: 0 -175px;
  background-size: 1200px;
  overflow: hidden;
}

/* Menu bar
============================================ */

.menu-bar {
  display: flex;
  justify-content: flex-end;
  flex-direction: column;
  align-items: center;
  margin: 1.5rem 2rem;
  position: absolute;
  top: 0;
  right: 0;
}

.menu-bar .button {
  margin-bottom: 1rem;
  width: 150px;
  color: white;
}

.menu {
  width: 100%;
  display: flex;
}

.start-screen-reference {
  display: none;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.start-screen-reference.active {
  display: block;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Bank
============================================ */

.bank {
  width: 100%;
  height: calc(100% - 8.5rem);
  overflow-y: scroll;
  border-radius: 5px;
  max-width: 740px;
  margin: 3.25rem auto 2rem;
}

.bank__panel {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 1.5rem 0 3rem;
  position: relative;
  border-radius: 5px;
  background-color: var(--bankBG);
  padding: 1rem;
  min-height: 120px;
  max-width: 740px;
}

.bank__panel--collapsed {
  min-height: 0;
  height: 0;
  cursor: no-drop;
}

.bank__panel--collapsed li {
  display: none;
}

.bank__panel:last-child {
  margin-bottom: 1rem;
}

.bank__panel::before {
  content: attr(data-label);
  position: absolute;
  top: -25px;
  left: 0;
  background-color: var(--bankBG);
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  padding: 5px 10px 10px;
}

.panel__collapse {
  position: absolute;
  top: -22px;
  left: 75px;
  background-color: transparent;
  border: 0;
  color: var(--fontColor);
  font-family: 'HelvetiPixel', sans-serif;
  cursor: pointer;
  font-size: 1.1rem;
}

.panel__collapse:hover {
  opacity: 0.6;
}

/* Items
============================================ */

.item__frame {
  background: url(../images/ui-frame.png);
  background-size: cover;
  position: relative;
  cursor: grab;
  width: 72px;
  height: 72px;
  margin: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
}

.item__frame.item__frame--inactive:hover .item__details {
  opacity: 0 !important;
  visibility: hidden !important;
}

.item__frame.item__frame--locked {
  cursor: not-allowed;
}

.item__frame:hover .item__details{
  display: block;
}

.item__frame img {
  width: 100%;
  position: relative;
}

.item__details {
  display: none;
  position: absolute;
  top: 110%;
  left: 0;
  background-color: #212121;
  color: #fff;
  border-radius: 5px;
  padding: 10px 10px 5px;
  width: 250px;
  z-index: 3;
  box-shadow: 3px 3px 10px rgba(0,0,0,0.5);
}

.item__details::before {
  content: '';
  width: 0px;
  height: 0px;
  border-style: solid;
  border-width: 0 10px 10px 10px;
  border-color: transparent transparent #212121 transparent;
  transform: rotate(0deg);
  position: absolute;
  top: -10px;
  left: 25px;
}

.item__details p,
.item__details h3 {
  margin-bottom: 0.25rem;
}

.item__frame:nth-of-type(8n+7) .item__details,
.item__frame:nth-of-type(8n+8) .item__details {
  left: auto;
  right: 0;
}

.item__frame:nth-of-type(8n+7) .item__details::before,
.item__frame:nth-of-type(8n+8) .item__details::before {
  left: auto;
  right: 25px;
}

.bank__panel:last-child .item__details {
  top: auto;
  bottom: 110%;
}

.bank__panel:last-child .item__details::before {
  content: '';
  width: 0px;
  height: 0px;
  border-style: solid;
  border-width: 0 10px 10px 10px;
  border-color: transparent transparent #212121 transparent;
  transform: rotate(180deg);
  position: absolute;
  bottom: -10px;
  left: 25px;
  top: auto;
}

.bank__panel:last-child .item__frame:nth-of-type(8n+7) .item__details::before,
.bank__panel:last-child .item__frame:nth-of-type(8n+8) .item__details::before {
  left: auto;
  right: 25px;
}

.item__frame--overflow {
  right: 0;
  left: auto;
}

.item--locked {
  position: absolute;
  right: -5px;
  top: -5px;
  background-image: url(../images/ui-locked.png);
  background-size: 24px;
  background-repeat: no-repeat;
  width: 24px;
  height: 24px;
  z-index: 2;
}

.item--heirloom {
  position: absolute;
  right: -5px;
  top: -5px;
  background-image: url(../images/ui-heirloom.png);
  background-size: 16px;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  z-index: 2;
}

.locked {
  color: red;
}

.rarity--junk {
  color: #9e9e9e;
}

.rarity--common {
  color: #FFF;
}

.rarity--uncommon {
  color: #40f029;
}

.rarity--rare {
  color: #4099ff;
}

.rarity--epic {
  color: #ff00ff;
}

.rarity--heirloom {
  color: #ff7700;
}

.tag {
  display: inline-block;
  padding: 7px 10px;
  margin-bottom: 5px;
  margin-top: 0.55rem;
  border-radius: 5px;
  text-transform: capitalize;
}

.tag--magic {
  background-color: #0099ff;
  color: white;
}

.tag--consumable {
  background-color: #ff9900;
  color: white;
}

.tag--weapon {
  background-color: #ccc;
  color: #222;
}

.tag--epic {
  background-color: #ff00ff;
  color: white;
}

.tag--jewellery {
  background-color: #ffcc00;
  color: #222;
}

.tag--crafting {
  background-color: #00cc00;
  color: #222;
}

.tag--material {
  background-color: #193361;
  color: #fff;
}

.tag--tool {
  background-color: #4a3817;
  color: white;
}

.tag--farming {
  background-color: #00ffbf;
  color: #222;
}

.tag--alchemy {
  background-color: #5a9ef0;
  color: #222;
}

.tag--shield {
  background-color: #717171;
  color: #fff;
}

.tag--armor {
  background-color: #30bd77;
  color: #fff;
}

.tag--relic {
  background-color: #00ffff;
  color: #222;
}

.tag--heirloom {
  background-color: #ff7700;
  color: #222;
}

.tag--cooking {
  background-color: #5c11be;
  color: #FFF;
}

.tag--book {
  background-color: #00ff88;
  color: #222;
}

.tag--food {
  background-color: #ff0000;
  color: #FFF;
}

.tag--trophy {
  background-color: #fff700;
  color: #222;
}

.tag--currency {
  background-color: goldenrod;
  color: #222;
}

.tag--mount {
  background-color: #342f1f;
  color: #fff;
}

.tag--junk {
  background-color: #9e9e9e;
  color: #222;
}

[data-simplebar] {
  position: relative;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: flex-start;
  align-items: flex-start;
}

.simplebar-wrapper {
  overflow: hidden;
  width: inherit;
  height: inherit;
  max-width: inherit;
  max-height: inherit;
}

.simplebar-mask {
  direction: inherit;
  position: absolute;
  overflow: hidden;
  padding: 0;
  margin: 0;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  width: auto !important;
  height: auto !important;
  z-index: 0;
}

.simplebar-offset {
  direction: inherit !important;
  box-sizing: inherit !important;
  resize: none !important;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 0;
  margin: 0;
  -webkit-overflow-scrolling: touch;
}

.simplebar-content-wrapper {
  direction: inherit;
  box-sizing: border-box !important;
  position: relative;
  display: block;
  height: 100%; /* Required for horizontal native scrollbar to not appear if parent is taller than natural height */
  width: auto;
  max-width: 100%; /* Not required for horizontal scroll to trigger */
  max-height: 100%; /* Needed for vertical scroll to trigger */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.simplebar-content-wrapper::-webkit-scrollbar,
.simplebar-hide-scrollbar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.simplebar-content:before,
.simplebar-content:after {
  content: ' ';
  display: table;
}

.simplebar-placeholder {
  max-height: 100%;
  max-width: 100%;
  width: 100%;
  pointer-events: none;
}

.simplebar-height-auto-observer-wrapper {
  box-sizing: inherit !important;
  height: 100%;
  width: 100%;
  max-width: 1px;
  position: relative;
  float: left;
  max-height: 1px;
  overflow: hidden;
  z-index: -1;
  padding: 0;
  margin: 0;
  pointer-events: none;
  flex-grow: inherit;
  flex-shrink: 0;
  flex-basis: 0;
}

.simplebar-height-auto-observer {
  box-sizing: inherit;
  display: block;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  height: 1000%;
  width: 1000%;
  min-height: 1px;
  min-width: 1px;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.simplebar-track {
  z-index: 1;
  position: absolute;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

[data-simplebar].simplebar-dragging .simplebar-content {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

[data-simplebar].simplebar-dragging .simplebar-track {
  pointer-events: all;
}

.simplebar-scrollbar {
  position: absolute;
  left: 0;
  right: 0;
  min-height: 10px;
}

.simplebar-scrollbar:before {
  position: absolute;
  content: '';
  background: black;
  border-radius: 7px;
  left: 2px;
  right: 2px;
  opacity: 0;
  transition: opacity 0.2s linear;
}

.simplebar-scrollbar.simplebar-visible:before {
  /* When hovered, remove all transitions from drag handle */
  opacity: 0.5;
  transition: opacity 0s linear;
}

.simplebar-track.simplebar-vertical {
  top: 0;
  width: 11px;
}

.simplebar-track.simplebar-vertical .simplebar-scrollbar:before {
  top: 2px;
  bottom: 2px;
}

.simplebar-track.simplebar-horizontal {
  left: 0;
  height: 11px;
}

.simplebar-track.simplebar-horizontal .simplebar-scrollbar:before {
  height: 100%;
  left: 2px;
  right: 2px;
}

.simplebar-track.simplebar-horizontal .simplebar-scrollbar {
  right: auto;
  left: 0;
  top: 2px;
  height: 7px;
  min-height: 0;
  min-width: 10px;
  width: auto;
}

/* Rtl support */
[data-simplebar-direction='rtl'] .simplebar-track.simplebar-vertical {
  right: auto;
  left: 0;
}

.hs-dummy-scrollbar-size {
  direction: rtl;
  position: fixed;
  opacity: 0;
  visibility: hidden;
  height: 500px;
  width: 500px;
  overflow-y: hidden;
  overflow-x: scroll;
}

.simplebar-hide-scrollbar {
  position: fixed;
  left: 0;
  visibility: hidden;
  overflow-y: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
