:root {
  --weaponry: rgb(237, 211, 238);
  --food: rgb(148, 224, 158);
  --animal: rgb(238, 179, 103);
  --clothing: rgb(241, 225, 75);
  --nicotine: rgb(192, 229, 240);
  --resource: rgb(209, 212, 213);
}

.inv-item.weaponry {
  border: 2px solid var(--weaponry);
}
.inv-item.food {
  border: 2px solid var(--food);
}
.inv-item.animal {
  border: 2px solid var(--animal);
}
.inv-item.clothing {
  border: 2px solid var(--clothing);
}
.inv-item.nicotine {
  border: 2px solid var(--nicotine);
}
.inv-item.resource {
  border: 2px solid var(--resource);
}

body {
  touch-action: none;
}



.inventory-panel {
  pointer-events: all;
  position: relative;
  display: flex;
  justify-content: space-around;
  border-radius: 0.85em;
}

.body-inventory .inventory-panel:hover {
  background-color: rgba(255, 255, 255, 0.525);
}

/* .inventory-panel:hover .inventory-name span {
  animation: pop-n-hide 2s ease-in;
}

.body-inventory:hover .inventory-name span {
  animation: pop-n-hide 2s ease-in;
}

.body-inventory .inventory-panel:hover .inventory-name span {
  animation: pop-n-stay 0.2s ease-in;
  opacity: 1;
} */

.inventory-name {
  position: absolute;
  top: -20px;
  height: 0;
  pointer-events: none;
  text-align: center;
  text-transform: capitalize;
  z-index: 1;
  width:100%;
  text-align: left;
}

.body-inventory .inventory-name, .location-inventory .inventory-name {
  opacity: 0;
}
.body-inventory > .inventory-name {
  opacity: 1;
}


.inventory-name span {
  display: inline-block;
  /* background-color: white; */
  padding: 5px;
  border-radius: 12px;
  opacity: 1;
  /* box-shadow: rgba(10, 10, 10, 0.1) 0px 0px 10px; */
}

.inventory-list {
  display: flex;
  position: relative;
  align-content: space-around;
  justify-content: center;
  flex-wrap: wrap;
  border-radius: 1em;
}

.inventory-close {
  font-size: 24px;
  display: none;
  position: absolute;
  right: 0.6em;
  top: -0.3em;
  color: black;
  text-decoration: none;
}


.menu-popup-close i {
  /* display: none; */
  position: absolute;
  font-size: 24px;
  right: -8px;
  top: -8px;
  color: rgb(81, 81, 81);
  background: white;
  border-radius: 100%;
  text-decoration: none;
  cursor: pointer;
}
.menu-popup-close i:hover {
  color: black;
  cursor: pointer;
}

.inv-pop .inv-pop-list {
  width: 100%;
  position: relative;
  max-height: 25vh;
  overflow-y: scroll;
  overflow-x: hidden;
}

.inv-pop .badge {
  position: absolute;
  top: 1px;
  right: 1px;
  border-radius: 5px;
  padding: 4px 8px;
  background-color: white;
  color: black;
}

.inv-pop .group {
  border: 1px solid rgba(0, 0, 0, 0.2);
  margin-top: 0.1em;
  background: none;
  border-radius: 12px;
}

.inv-pop .group-heading {
  font-size: 12px;
  padding-top: 0.35em;
  text-align: center;
}

.inv-pop .group-body button {
  text-transform: capitalize;
}

.inv-pop .group-body button {
  border: none;
  border-radius: 0;
  margin: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}
.inv-pop .group-body button:last-child {
  border: none;
  border-radius: 0 0 10px 10px;
}

#inv-c .inventory-close
/* .backpack-inventory .inventory-close */ {
  display: inline;
}
.inventory-close i {
  position: absolute;
  top: -10;
  right: -10;
}

a.inventory-close:hover {
  opacity: 1;
  cursor: pointer;
}

/* Item Container Specific Styles */

#inventory-toggle {
  pointer-events: none;
  /* height: 100%; */
  position: absolute;
  display:flex;
  justify-content: flex-end;
  flex-direction:column;
  bottom: -60px;
}

.core-inventories {
  width:100%;

  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  border-radius: 10px;
}

.cowboy-body-bag {
  pointer-events: none;
  display: flex;
  justify-content: space-evenly;
  width: 100%;
  margin-bottom: 0px;
}

.body-inventory {
  /* border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 1em; */
  position: relative;
  transition: transform 0.3s;
}
/* .body-inventory:hover, .backpack-inventory:hover {
  transform: scale(1.03);
} */

.body-inventory > div {
  background-color: rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s;
  width: 191px;
  padding: 0.5em;
}

.body-inventory > div:hover {
  background: rgba(255, 255, 255, 0.2);
}

.backpack-inventory {
  transition: transform 0.3s;
}

.backpack-inventory:hover .inventory-list{
  background: rgb(238, 220, 192);
}

.backpack-inventory .inventory-list {
  background: rgb(224, 203, 172);

  width: 191px;
  padding: 0.5em;
}

.container-inventory {
  /* justify-content: center; */
}

#inv-c .inventory-list {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.5em;
  /* margin-top: 0.5em; */
}
/* .container-inventory .inventory-list {
  background: rgba(0, 0, 0, 0.05);
} */

.inv-hands,
.body-inventory div .inventory-list {
  flex-direction: column;
}

.trading-window {
  display: flex;
  justify-content: center;
  position: relative;
  margin-bottom: 5px;
  width: 100%;
}

#trade-credit {
  margin: 18px 10px 0 10px;
}
#trading-bubble button {
  margin: 5px;
  height: 3em;
  flex-grow:1;
  border-radius: 1em;
}

#trading-bubble {
  display: flex;
  flex-direction: column;
  max-width: 500px;
  background-color: white;
  padding: 0.5em;
  border-radius: 1.5em;
  align-items: center;
  margin: 0 auto;
}

.inv-slot {
  margin: 0.1em;
  position: relative;
  width: 55px;
  height: 55px;
  border: 2px solid rgba(0, 0, 0, 0.05);
  /* mix-blend-mode: multiply; */
  border-radius: 0.75em;
  transition: transform 0.4s;
}

.inv-slot-filled:hover {
  cursor: pointer;
  mix-blend-mode: normal;
  background-color: rgb(255, 255, 255);
}

.inv-slot-water {
  border: 2px solid rgba(85, 146, 251, 1);
}

.inv-slot.inv-slot-highlight {
  background-color: rgb(255, 208, 208);
}

.inv-slot.inv-slot-control {
  background-color: #ffeecc;
  /* position: absolute; */
}

.inv-slot-filled.inv-slot-selected > .inv-item {
  background-color: #ffd7fc;
}

.inv-slot-filled {
  background-color: rgba(255, 255, 255, 0.8);
}

.inv-slot > .inv-item {
  /* border: none;   */
  position: absolute;
  margin: 1px;
  padding: 2px;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  border-radius: 0.85em;
  /* background-color: #ffeecc; */
  background-position: center;
  background-size: 80%, cover;
  background-repeat: no-repeat;
}

.inv-item {
  pointer-events: none;
}

.item-label {
  opacity: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-slot:hover .item-label {
  opacity: 1;
  display: block;
  padding: 7px;
  border-radius: 1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  bottom: 60px;
  left: calc(-37px);
  width: 120px;
  text-align: center;
  background-color: white;
  z-index:1;
}

.inv-count-label {
  pointer-events: none;
  position: absolute;
  text-align: right;
  font-size: 0.9em;
  right: 4.5px;
  bottom: 0;
}

.inv-pop {
  display: none;
  padding: 7px;
  border-radius: 1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  background-color: white;
  filter: drop-shadow(0px 0px 2px rgba(10, 10, 10, 0.25));
  /* box-shadow: rgba(10, 10, 10, 0.25) 0px 0px 10px; */
  opacity: 1 !important;
  z-index: 2;
}

.inv-pop:before,
.inv-pop:after, 
.inv-slot:hover .item-label:before, 
.inv-slot:hover .item-label:after {
  content: "";
  position: absolute;
  top: 100%;
  border-top: 15px solid white;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  z-index: 1;
  /* box-shadow:inherit; */
}
.inv-pop:after {
  box-shadow: none;
  z-index: 8;
}

.inv-pop button {
  border-style: 1px solid black;
  width: 100%;
  margin: 0;
  margin-top: 0.35em;
  border-radius: 1em;
}

.inv-pop-heading {
  text-align: center;
}

.inv-pop-heading button {
  border: none;
  margin: 0;
  padding: 0;
  text-decoration: underline;
  border-radius: none;
}

.inv-pop::-webkit-scrollbar {
  width: 1px !important;
}

.bop {
  transform: scale(1);
  animation: pulse 0.3s;
}

div.inv-slot-fill-container {
  position: absolute;
  bottom: 10px;
  left: 4px;
  width: calc(100% - 8px);
  height: 0px;
  background: none;
}

div.inv-slot-fill-bar {
  height: 5px;
  top: 10px;
  overflow-x: hidden;
  overflow-y: hidden;
  background: none;
  border-radius: 0.4em;
}

div.inv-slot-fill-bar-contents {
  /* position: absolute; */
  background-color: #cc9b8c;
  height: 5px;
  border-radius: 0.4em;
  margin-top: 0px;
  /* width: 65px; */
}

#backpack-bar .fill-container {
  position: absolute;
  bottom: 11px;
  left: 13px;
  width: calc(100% - 13px * 2);
  height: 0px;
  background: none;
}

#backpack-bar .fill-bar {
  overflow-x: hidden;
  overflow-y: hidden;
  border-radius: 0.4em;
}

#backpack-bar .fill-bar-contents {
  /* position: absolute; */
  background-color: #9a7164;
  height: 5px;
  border-radius: 0.4em;
  transition: width 1s ease-in-out;
}

.button-hover {
  transform: scale(1.5);
  z-index: 1;
  transition: transform 0.2s;
}

.ghost-container {
  position: absolute;
  z-index: 1000;
  opacity: 0.5;
  width: 60px;
  height: 60px;
  transform: scale(1.5);
  cursor: grabbing;
}

.ghost-container.slide {
  transition: top 0.2s, left 0.2s;
}

.inv-slot-disabled {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-image: url("../img/inv/disable.svg");
  background-repeat: no-repeat;
  animation: fade-in 0.1s ease-in-out;
}

.inv-slot-locked {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-image: url("../img/inv/lock.svg");
  background-repeat: no-repeat;
}

.inv-slot-icon {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

.inv-slot-icon > img {
  width: 100%;
}

.inv-slot-faded {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: rgba(color(srgb 1 1 1 / 0.564));
}

.inv-item-price {
  pointer-events: none;
  padding: 0 5px 0 3px;
  position: absolute;
  left: -7px;
  bottom: -11px;
  background-color: beige;
  border-radius: 4px;
  transform: rotate(355deg);
}

.location-inventory {
  max-width: 350px;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  10% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

@media screen and (max-width: 500px) {
  .inv-slot {
    margin-top: 2px;
    width: 40px !important;
    height: 40px !important;
  }
  .inv-slot > .inv-item {
    border-width: 1px;
    border-radius: 20%;
  }
  #inv-c .inventory-list {
    padding: 2px;
  }

  
  .inv-slot:hover .item-label {
    opacity:0;
  }

  .body-inventory > div {
    width: 140px;
    padding: 0.25em;
  }
  .backpack-inventory .inventory-list {
    width: 140px;
    padding: 2px;
  }
}

@media screen and (min-width: 500px) {
  .location-inventory {
    justify-content: center;
    max-width: 500px;
  }
  .core-inventories {
    bottom: 195px;
  }
}

@media screen and (min-width: 875px) {
  .location-inventory {
    flex-grow: 1;
    align-items: center;
    max-width: 875px;
  }
}

.location-inventory .inv-slot-filled {
  animation: pop-n-stay 0.2s ease-in-out;
}
.location-inventory:hover {
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.05);
}

@keyframes pop-n-hide {
  0% {
    transform: scale(0);
    opacity: 1;
  }

  5% {
    transform: scale(1.2);
  }

  10%,
  90% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(0);
  }
}

@keyframes pop-n-stay {
  0% {
    transform: scale(0);
  }

  70% {
    transform: scale(1.2);
  }

  95% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes rise-n-stay {
  0% {
    opacity: 0;
    transform: translatey(400px);
  }
  50%,
  100% {
    opacity: 1;
    transform: translatey(0);
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
