@font-face {
    font-family: 'Pinemon';
    src: url('/static/fonts/PK.ttf') format('truetype');
}

@font-face {
    font-family: 'AngerthasMoria';
    src: url('/static/fonts/AM.ttf') format('truetype');
}


@font-face {
    font-family: 'Futharken';
    src: url('/static/fonts/F.ttf') format('truetype');
}

@font-face {
    font-family: 'Spellweaver';
    src: url('/static/fonts/SW.ttf') format('truetype');
}

@font-face {
  font-family: "Draconis";
  src: url("/static/fonts/draconis/Draconis.ttf") format('truetype');
}
#loader{
    text-align:center
}
.lds-ripple {
  display: inline-block;
  position: relative;
  width: 180px;
  height: 180px;
    left:0;
    right:0;
    margin:auto;
}
.lds-ripple div {
  position: absolute;
  border: 4px solid #fff;
  opacity: 1;
  border-radius: 50%;
  animation: lds-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}
.lds-ripple div:nth-child(2) {
  animation-delay: -0.5s;
}
@keyframes lds-ripple {
  0% {
    top: 72px;
    left: 72px;
    width: 0;
    height: 0;
    opacity: 0;
  }
  4.9% {
    top: 72px;
    left: 72px;
    width: 0;
    height: 0;
    opacity: 0;
  }
  5% {
    top: 72px;
    left: 72px;
    width: 0;
    height: 0;
    opacity: 1;
  }
  100% {
    top: 0px;
    left: 0px;
    width: 148px;
    height: 148px;
    opacity: 0;
  }
}

/* The snackbar - position it at the bottom and in the middle of the screen */
#snackbar {
  visibility: hidden; 
  min-width: 250px; 
  /* margin-left: -125px; */ 
  background-color: #333; 
  color: #fff; 
  text-align: center; 
  border-radius: 8px; 
  border:1px solid white;
  padding: 32px; /* Padding */
  position: fixed; 
  z-index: 1;
  left: 0; 
  right:0; 
  margin:auto;
  width:55vw;
  bottom: -128px;  
  font-size:32px;
  opacity:0.8;
}

/* Show the snackbar when clicking on a button (class added with JavaScript) */
#snackbar.show {
  visibility: visible; /* Show the snackbar */
  /* Add animation: Take 0.5 seconds to fade in and out the snackbar.
  However, delay the fade out process for 2.5 seconds */
  -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
  bottom: 50%;
}

/* Animations to fade the snackbar in and out */
@-webkit-keyframes fadein {
  from {bottom: 0; opacity: 0;}
  to {bottom: 50%; opacity: 0.8;}
}

@keyframes fadein {
  from {bottom: 0; opacity: 0;}
  to {bottom: 50%; opacity:0.8;}
}

@-webkit-keyframes fadeout {
  from {bottom: 50%; opacity: 0.8;}
  to {bottom: 0; opacity: 0;}
}

@keyframes fadeout {
  from {bottom: 50%; opacity: 0.8;}
  to {bottom: 0; opacity: 0;}
}


/********************************************
*/
html {
  padding-top:64px;
}

html,body{
    margin:0;
    background:black;
    color:white;
    background-image:url("/static/img/black-leather.jpg");
    background-size: cover;
    font-size:24px;
    font-family:Draconis;
    -webkit-text-stroke: 1px black;
    /* min-height: calc(100% + 32px); */
  /* fucking stop it*/
    overscroll-behavior: none;
  /* seriously fucking stop it.*/
    overscroll-behavior-x: none;
  /* */
    overscroll-behavior-y: none;
    /* overflow-y: hidden; */
    height: calc(100% - 64px);
}

header{
    padding:0px;
    height: 64px ;
    background-image:url("/static/img/header.jpg");
    background-size:cover;
    box-shadow:0px 0px 4px 2px rgba(0,0,0,0.6);
    position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:10;
  
}

#main {
  height:100%; 
}


.panel  {
  height: calc(100vh - 72px);
  width: 98vw;
  top: 70px;
  border:1px solid grey;
  /*border-radius:8px;*/
  position:fixed;
  transition: all linear 500ms;
}

.inactive{
  transition: all linear 500ms;
}

#leftPanel.inactive{
 left:2000px; 
}
#rightPanel.inactive{
  left: -1500px;
}
#upPanel{
  border:0;
}
#upPanel.inactive{
  top: 2000px;
}
#downPanel.inactive{
  top: -2000px;
}

html body .panel.activePanel{
  top:70px;
  left: 0px;
  /*right:8px;
  bottom:8px;*/
  transition:all linear 500ms;
  right: 0;
  margin: auto;
}


#login {
    width: 300px;
    height: 185px;
    border: 2px solid white;
    text-align: center;
    background-color: rgba(22,22,22,0.6);
    margin: auto;
    position: absolute;
    top: -2000px;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 32px;
    font-size:28px;
    border-radius:8px;
    transition: all  linear 500ms;
    opacity:1; 
}

#login input#userid{
  width:234px;
}

#login input#loginsubmit{
  -webkit-text-stroke:0;
}

.hidden{
    display:none; 
    transition: all  linear 500ms;
}


#login label{
    display:block;
    justify-content:center;
    margin-bottom:16px; 
    font-size:1.4em;
}

input{
    padding:8px;
    height: auto;
    /* width: 80%; */
    font-size: 1em;
    margin:8px;
    vertical-align:middle;
    background:#111;
    color:white;
    border:1px solid white;
    border-radius:8px
}

#login input[type="submit"]{
    font-family: AngerthasMoria;
}



.character{
  border:1px solid white;
  /* height: 250px; */
  width: 96vw;
  margin: 16px auto;
  box-shadow: 1px 1px 2px 4px rgba(0,0,0,0.4);
  position:relative;
}

.character img{
  height: 25vw;
  width: 25vw;
}

.character .name {
  /* -webkit-text-stroke:2px black; */
  /* margin: 0; */
}

.character progress{
  /* position:absolute; */
  bottom:0;
  right:8px;
  width: 96%;
  margin: 0 2%;
}

.character, .details {
    /* display: flex; */
    /* flex-flow:wrap; */
    box-sizing:border-box;
    flex-direction: row;
}

.character .raceclass{
  /* font-size:32px; */
}
.character .levelhp{
  /* font-size:36px; */
  display:flex;
  justify-content: space-between;
}

.name-details{
  /*border:1px solid white;*/
  /* width: 25vw; */
  padding:0 8px;
  /* height:225px; */
  flex: 1;
}

.name-details *{
  margin: 0;
}

.stats{
  display: flex;
  /* display:grid; */
  /* grid-template-rows: max-content; */
  /* display: inline-block; */
  /* grid-template-columns:auto auto auto; */
  /* width:350px; */
  /* margin:0 16px; */
  /* height:225px; */
}

.stats {
  border:1px solid white;

}

.stats > div {
  width: 16vw;
  height: 20vw;
  text-align: center;
  vertical-align: top;
  border:1px solid grey;
}
.stats p{
  margin:0;
}

.stats .attrlabel{
  font-size: 16px;
}
.stats .scr{
  /* font-size:42px; */
  /* height: 42px; */
  vertical-align: top;
}
.stats .mod{
  border:1px solid white;
  border-radius:16px;
  display:block;
  width:32px;
  height:32px;
  margin:auto;
}


.character .details{
  /* height:95%; */
  display: flex;
  /* width: 60vw; */
  flex-direction: row;
}



progress{
  /* width:calc(100% - 255px); */
  /* float:right; */
}

.ctrl {
  display:flex;
  justify-content: space-around;
}



div.ctrl input {
  /* display: block; */
  /* margin: 24px 0; */
  width: 30vw;
  -webkit-text-stroke:0;
  color:white;
  /* margin: auto; */
}
div.ctrl input:active{
  color:#00DDDD;
}



/*body header*/ .character-hud {
  /* display:flex; */
  /* width:100%; */
  /* height:100%; */
  height: 64px;
  margin:0;
  position: relative;
  align-content: flex-end;
  align-items: flex-end;
  flex-direction: row;
}

.character-hud .hud-details{
  display:flex;
}

/*body header */.character-hud > div{
  height:100%;
}

/*body header*/ .character-hud img {
  /* height:100%; */
  width:64px;
  position: relative;
}

/*body header*/ .character h2.name {
  margin:0;
  font-size: 36px; 
  display: inline;
}

.character-hud h2.name {
  margin: 0 0 0 8px;
  font-size: 36px;
}

.character-hud progress {
  margin:0 2vw;
  flex:1;
  position: absolute;
  bottom: 0;
  right: 0;
  width: calc(100% - 80px);
}


.online-indicator{
  content:" ";
  position: absolute;
  display: block;
  width:16px;
  height:16px;
  background-color:#FF0000;
  border-radius:8px;
  margin: 0;
  left: 44px;
  bottom: 4px;
}
.online-indicator.connected{
    background-color:#00FF00;
}

#inventoryGrid{
    /* 15 columns motherfucker. */
    width:100%;
    /* box-sizing: border-box; */
    /* height: 100%; */
}

#inventoryGrid .inventory-slot{
    background-color:rgb(0,208,0,0.3);
}

.item {
    background-color:blue;
}

#inventoryGrid .inventory-slot.encumbered{
  background-color:rgba(255,140,0,0.3)
}

.cell{
    touch-action:none; /* okay so who was smoking crack on the day they put this one in? */
    display:inline-block;
    border:1px solid black;
    width:calc((100vw - 16px) / 10);
    height:calc((100vw - 16px) / 10);
    box-sizing: border-box; /* this does fuckall but leaving it in for sanity if we need it later. */
}


.grid-stack-item{
  background-color:blue;
}

.grid {
    position:relative;
    /* left: 0px; */
    border-top: 1px solid grey;
    border-left: 1px solid grey;
}


.grid .overlay, .grid .underlay{
    display:inline-grid;
    /* 15 columns motherfucker. 
    grid-template-columns: auto auto auto  auto auto auto  auto auto auto  auto;/*auto auto  auto auto auto
    ... turns out you can do this with repeat()
    */
    width:100%;
    height: 100%;
}

.grid .overlay{
    /* border:1px solid transparent; */
}

#inventoryGrid .inventory-slot{
    background-color: rgb(0,255,58,0.2);
}

/*
.item {
    background-color:blue;
}
*/

#inventoryGrid .inventory-slot.encumbered{
  background-color: rgba(255,140,0,0.2);
}

/*
.cell{
    touch-action:none; 
    display:inline-block;
    border:1px solid black;
    width:calc((100vw - 16px) / 10);
    height:calc((100vw - 16px) / 10);
    box-sizing: border-box; 
}*/


.grid .grid-cell{
    aspect-ratio:1; 
    box-sizing:border-box; 
    border-right: 1px solid grey; 
    border-bottom:1px solid grey;
}

.item {
    width: calc(100% - 1px);
    height: calc(100% - 1px);
    background-color: rgb(0,255,255);
    /* place-self:center; */
    text-align: center;
    vertical-align: middle;
   }
/*********/ 
.grid .overlay, .grid .underlay{
    aspect-ratio:1; 
}

.grid .overlay{
    position:absolute; 
}

.underlay .occupied{
  background-color:rgba(255,0,0,0.4)!important;
}

select {
  
  /* styling */
  background-color: transparent;
  border: none;
  display: inline-block;
  font: inherit;
  color: white;
  line-height: 1em;
  padding: 0.5em 3.5em 0.5em 1em;

  /* reset */
  margin: 0;      
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image:
    linear-gradient(45deg, transparent 50%, gray 50%),
    linear-gradient(135deg, gray 50%, transparent 50%),
    radial-gradient(white 70%, transparent 72%);
  background-position:
    77%, 81%, 83%;
  background-size:
    9px 9px,
    9px 9px,
    1.5em 1.5em;
  background-repeat: no-repeat;
}

select option {
  background-color: #333;
}