/* Global CSS */
body{
  margin: 0;
  font-family: 'Microsoft JhengHei', Ubuntu, sans-serif;
  position: relative;
}

ul{
  padding: 0;
}

ul li{
  list-style-type: none;
}

.grid-container{
  display: grid;
}

.flex-container{
  display: flex;
}

.inline-flex-container{
  display: inline-flex !important;
}

/* Layout */
main.grid-container{
  grid-template-rows: 100% 0;
  grid-template-columns: auto;
  height: 100vh;
}

.PC-row{
  overflow-x: auto;
  min-width: 100vw;
  background-color: #23272a;
}

.PC-row__list{
  flex-direction: row;
}

.PC-row__item{
  padding: 20px 15px;
  margin: 10px 7px;
  width: 396px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 15px;
  box-sizing: border-box;
  position: relative;
  transition: background-color 3s;
}

.PC-row__item:first-child{
  margin-left: 14px;
}
.PC-row__item:last-child{
  margin-right: 14px;
}

.PC-list__sortable{
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.inventory-row{
  background-image: linear-gradient(#0e070e 80%, #2e1914 100%);
  background-image: url('../img/wood-pattern.png'), linear-gradient(#0e070e 80%, #2e1914 100%);
  height: 20vh;
  min-width: 100vw;
}

.inventory-row__item{
  padding: 0 30px;
  flex-direction: column;
  flex-wrap: wrap;
  height: 90%;
  min-width: 100vw;
  box-sizing: border-box;
  width: auto !important;
  overflow-x: auto;
}

footer{
  display: block;
  position: fixed;
  right: 20px;
  top: 20px;
}
/* info */
.info-ico__ico{
  font-size: 2em;
  color: rgba(255, 255, 255, 0.6);
  text-align: right;
}

.info-ico__bg{
  position: relative;
  grid-auto-rows: 2em auto;
}

.info-ico__desc{
  display: none;
  margin: 0;
  background-color: rgba(0, 0, 0, 0.95);
  border: solid 3px rgba(255, 255, 255, 0.5);
  padding: 20px;
  color: #fff;
  border-radius: 15px;
}

.color-blk{
  width: 1em;
  height: 1em;
  display: inline-block;
  margin-right: 5px;
  border: solid 3px #555;
}

.color-blk:before{
  content: none !important;
}

/* empty list behavior */
.empty-list{
  display: flex;
  justify-content: center;
  text-align: center;
  height: 100%
}

.empty-list__plus{
  font-size: 7em;
  color: #eee;
  cursor: pointer;
}

.empty-list li{
  align-self: center;
}

.empty-list__plus:hover{
  color: #fff;
}


/* PC Parts */
.PC-parts{
  padding: 8px 13px 8px 40px;
  border-radius: 9px;
  border: solid 3px #fff;
  color: #fff;
  width: 336px;
  min-height: 47px;
  margin: 2px 15px;
  box-sizing: border-box;
  -moz-user-select: none;
  user-select: none;
  transition: transform 0.3s, background-color 3s;
  overflow: hidden;
  cursor: grab;
  position: relative;
}
.PC-parts:hover{
  transform: scale(1.04);
}

.pc-parts-ico {
  width: 20px;
  text-align: center;
  margin: 0 7px 0 0;
}

.svg-as-ico, .png-as-ico{
  max-height: 16px;
  width: 20px;
  object-fit: contain;
}

.CPU{
  background-color: #ff5527;
  order: 1;
}

.RAM{
  background-color: #319576;
  order: 2;
}

.SSD{
  background-color: #ffae00;
  order: 3;
}

.HDD{
  background-color: #898d8c;
  order: 4;
}

.GPU{
  background-color: #9b3454;
  order: 5;
}

.MB{
  background-color: #1e2a59;
  order: 6;
}

.WIFI{
  background-color: #01b3ed;
  order: 7;
}

.PSU{
  background-color: #5c2775;
  order: 8;
}

.DVD{
  background-color: #1a5359;
  order: 9;
}

.CASE{
  background-color: #000;
  order: 10;
}

.noclass{
  background-color: rgba(255, 255, 255, 0.3);
  min-height: 40px;
  order: 99;
}

/* Add PC Parts */
.add-PC-parts__select{
  width: 60px;
}

.add-PC-parts__input{
  background-color: transparent;
  border: 0;
  border-bottom: 1px solid #fff;
  width: calc(100% - 85px);
  color: #fff;
  transition: border 0.1s;
}
.add-PC-parts__input:focus{
  border-bottom: solid 3px #fff;
}

.add-PC-parts__button{
  background-color: transparent;
  border: none;
  color: #fff;
  padding: 0;
  float: right;
  width: 15px;
}


/* inventory */
.inventory-row{
  position: fixed;
  top: 100%;
  transition: 0.7;
}
.inventory-row.show{
  top: auto;
  bottom: 0;
  animation: show-inventory .7s;
}
.inventory-mb__toggle{
  position: absolute;
  display: block;
  right: 5px;
  top: -40px;
  width: 80px;
  height: 40px;
  background-color: #0e070e;
  background-image: url('../img/wood-pattern.png');
  border-radius: 20% 20% 0 0;
  transition: bottom 0.4s ease-in-out;
  text-align: center;
}
.inventory-mb__shown{
  bottom: 20vh;
}
.inventory-toggle__ico{
  color: #fff;
  font-size: 40px;
  transition: transform 0.4s;
}
.inventory-mb__shown .inventory-toggle__ico{
  transform: rotate(180deg);
}

.add-inventory{
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  cursor: pointer;
}

.show .add-inventory{
  display: block;
  opacity: 1;
}

.add-inventory__ico{
  font-size: 3em;
  color: rgba(255, 255, 255, 0.5);
}
/* Price */
.price{
  width: 70px;
  height: 70px;
  position: fixed;
  top: -35px;
  left: -35px;
  background-color: yellow;
  text-align: center;
  padding-top: 40px;
  box-sizing: border-box;
  transform: rotate(-45deg);
  cursor: pointer;
  box-shadow: 0 0 15px #333;
}


/* JQuery UI */
.ui-sortable-helper{
  filter: invert(1);
  transform: scale(1.2) !important;
  cursor: grabbing;
}

@media only screen and (max-width: 829px){
  /* Layout */
  .PC-row__item{
    width: calc(100vw - 28px);
  }
  .inventory-row__item{
    min-width: calc(100vw - 58px);
  }
  /* PC-Parts */
  .PC-parts{
    width: calc(100% - 30px);
    font-size: 12px;
  }
}
@keyframes show-inventory {
  from{
    top: 100%;
  }to{
    bottom: 0;
  }
}

/* Prepend :before image */
.PC-parts:before{
  position: absolute;
  font-family: "Font Awesome 5 Free";
  margin-right: 8px;
  font-weight: 900;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 20px;
  max-height: 20px;
  width: 20px;
  height: 20px;
  text-align: center;
  background-size: contain !important;
}

.CPU:before{
  content: "\f2db";
}

.RAM:before{
  content: "\f538";
}

.SSD:before{
  content: "\f0a0";
  font-weight: 400;
}

.HDD:before{
  content: "\f0a0";
}

.GPU:before{
  content: "";
  background: url('../img/gpu20.svg');
}

.MB:before{
  content: "";
  background: url('../img/mb.png');
}

.WIFI:before{
  content: "\f1eb";
}

.PSU:before{
  content: "\f1e6";
}

.DVD:before{
  content: "\f51f";
}

.CASE:before{
  content: "";
  background: url('../img/case20.svg');
}

/* Reveal Price */
.PC-parts:after{
  content: none;
}

.reveal .PC-parts__model{
  display: none;
}

.reveal .PC-parts:after{
  content: "$ " attr(data-price);
  display: inline;
}

.pricetag{
  position: absolute;
  display: none;
  background-image: url('../img/pricetag.png');
  background-size: contain;
  width: 120px;
  height: 60px;
  bottom: 23px;
  right: 10px;
  transform: rotate(-20deg);
  justify-content: center;
  align-items: center;

  font-size: 20px;
  font-weight: bold;
}

.pricetag:before {
  content: "$";
  display: inline;
  margin-right: 5px;
}

.reveal .pricetag{
  display: flex;
}
