:root {
  --active: #555;
}

body {
  font-size: 14px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 2s;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;

  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Old versions of Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none; /* Non-prefixed version, currently
                                supported by Chrome, Edge, Opera and Firefox */
}

.flex {
  display: flex;
  align-items: center;
  flex-direction: column;
}
/* 
.flex-row {
  flex-direction: row;
} */

.dim {
  opacity: 0.25;
}

.hidden {
  display: none;
}

button {
  margin: 0 5px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  padding: 0.35em;
  background: none;
}

button:not(:disabled) {
  cursor: pointer;
  color: #444;
}

button:hover:not(:disabled) {
  cursor: pointer;
  background-color: rgba(0.1, 0.1, 0.1, 0.1);
}

#app {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  bottom: 0;
}

#app section {
  width: 100%;
  margin: 0 auto;
}

.wrapper {
  width: 100%;
}

.hidden {
  display: none;
}

.skyWrapper {
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  position: relative;
  /* background-color: skyblue; */
  transition: background-color 2s;
  /* pointer-events: none; */
}

.groundbox {

}

#groundbox {
  position: relative;
  pointer-events: none;;
  padding-top: 60px;
  min-height: 245px;
  display:flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  /* z-index: 1; */
}

.cmdline {
  display: flex;
  flex-direction: row;
  width: 100%;
  align-items: center;
  border-style: solid;
  border-width: 1px;
  border-color: black;
  background-color: transparent;
  opacity: 0.75;
}

#app-buttons {
  z-index: 10;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
}

#app-buttons button {
  /* display: block; */
  pointer-events: all;
  margin: 5px;
  padding: 0;
  border: 1px solid #444;
  border-radius: 5px;
  flex-grow: 1;
  height: 3em;
  transition: color 0.2s, background-color 0.2s, border 0.2s;
}

#app-buttons button.activated {
  color: white;
  background-color: var(--active);
  /* border: 1px solid white; */
}

#characters {
  position: absolute;
  display: flex;
  width: 100%;
  justify-content: center;
  bottom: 70px;
}

#characters svg {
  position: relative;
  margin: 0;
}

#cowboy-image,
#npc-image {
  /* position: absolute; */
  width: 120px;
  width: 100px;
  height: 140px;
  margin: 0 -1.5em;
  pointer-events: all;
}

#cowboy-image:hover svg,
#npc-image:hover svg {
  cursor: pointer;
  filter: drop-shadow(0px 0px 5px rgb(255, 255, 255));
}




#timeline-bar button {
  font-family: hellenic-wide-jf;
  width: 65px;
  border-radius: 1em;
}



#skybox-target {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#skybox:hover {
  cursor: pointer;
}

#skybox-icon {
  size: 10em;
  opacity: 0;
  transition: opacity 0.5s;
}

#skybox div:hover #skybox-icon {
  opacity: 1;
}


.close-button {
  position: absolute;
  pointer-events: all;
top:0;
right:0;
}


.close-button i{
  pointer-events: all;
  cursor: pointer;
  color: rgb(81, 81, 81);
  background-color:white;
  border-radius:100%;
  font-size: 24px;
  position: absolute;
  z-index: 3;
  /* width: 0;
  height: 0; */
}
.close-button:hover {
  cursor: pointer;
}
.close-button:hover i{
  color: black;
  background-color:#c1c1c1;
}

.cowboy-window .close-button i{
  top: -8px;
  right: -8px;
}

.body-inventory .close-button i{
  top: -8px;
  right: -8px;
}

#inv-c .close-button {
  top: -8px;
  right: 12px;
}



#rest-panel {
  width: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.cowboy-clickpoint {
  cursor: pointer;
  position: absolute;
  bottom: 11em;
  left: calc(50% - 80px / 2);
  height: 140px;
  width: 80px;
  margin: 0 auto;
  /* border: 1px solid black; */
}

.slide-container {
  width: 75%;
  margin: 10px 0;
  padding: 0 10px;
}

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  background: #d3d3d3;
  border-radius: 10px;
  outline: none;
  opacity: 0.7;
  -webkit-transition: 0.2s;
  transition: opacity 0.2s;
}

.slider:hover {
  opacity: 1;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 100%;
  width: 25px;
  height: 25px;
  background: #04aa6d;
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 25px;
  height: 25px;
  background: #04aa6d;
  cursor: pointer;
}

#effect-panel {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-direction: row;
}

#cowboy-mood::before {
  content: "Mood: ";
}


.notifications {
  height: 50px;
  max-height: 50px;
  position: relative;
}

#action-feed {
  /* position: absolute; */
  /* left: 0; */
  z-index: 100;
  width: 100%;
  margin: 0 auto;
}

.alert-bubble {
  width: 100%;
  cursor: pointer;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
  background: white;
  border-radius: 1em;
  padding: 0.2em;
  animation: expand 6s ease-in-out;
  margin-bottom: 0.3em;
  transition: height 1s;
  /* box-shadow: 3px 3px 3px rgba(0.1, 0.1, 0.1, 0.1); */
  overflow: hidden;
}

.alert-bubble:hover {
  background-color: pink;
}

#event-box {
  text-align: center;
  padding: 0.5em;
  border-radius: 1em;
  background-color: white;
  margin-bottom: 0.3em;
}

#event-box p,
.alert-bubble p {
  margin-bottom: 0;
}

.positive {
  color: black;
}

.negative {
  color: brown;
}

#death-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  z-index: 10;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-color: rgba(0, 0, 0, 0.9);
  text-align: center;
  color: white;
}

.thought {
  justify-content:center;
  text-align:center;
}
.thought:before,
.thought:after {
  content:"";
  border-radius:50%;
  display:block;
  position:absolute;
  z-index: 0;
}

.thought:after {
  z-index: 0;
  visibility: none;
  top:-10px;
  left:45%;
  width:30px;
  height:30px;
  box-shadow: 25px 8px 0 -6px #fff,
              15px 25px 0 -12px #fff,
              5px 30px 0 -16px #fff;
  animation: bubbles 1s linear;
  animation-iteration-count: infinite;
}

.scrollbox {
  overflow-x: hidden;
  overflow-y: auto;
}

.scrollbox-off {
  pointer-events: none;
}

#inventory-scrollbox {
  position:relative;
  /* pointer-events: all; */
  border: 1px solid rgba(0, 0, 0, 0.107);
  border-radius: 24px;
  padding:12px;
  z-index:0;
  max-height: 100%;
  padding-top:30px
}


@media screen and (min-width: 500px) {
  body {
    font-size: 16px;
    overflow: hidden;
  }

  #app section, .note-layer  {
    max-width: 100%;
  }

  .groundbox {
    min-height: 240px;
  }
  .cowboy-window {
   
    margin-bottom: 345px;
  }
  #characters {
    bottom: 100px;
  }
  #cowboy-image,
  #npc-image {
    width: 120px;
    height: 160px;
  }
}



@media screen and (min-width: 875px) {
  #app section, .groundbox, .note-layer, .cowboy-body-bag {
   max-width: 875px;
  }
}

@keyframes expand {
  0% {
    max-height: 0;
    opacity: 0;
  }

  10%,
  95% {
    max-height: 150px;
    opacity: 1;
  }

  100% {
    opacity: 0;
    max-height: 0;
  }
}

.blink {
  animation: blinking 2s linear;
  animation-iteration-count: infinite;
}

@keyframes blinking {
  0% {
    opacity: 0.1;
  }
  50% {
    opacity: 0.1;
  }
  51% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}

@keyframes slowfade {
  0%, 51% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes bubbles {
  0%{ 
  box-shadow:
    25px 8px 0 -6px #fff,
    15px 25px 0 -12px #fff,
    5px 30px 0 -16px #fff;
  }
  100% {
    box-shadow:
    35px -16px 0 -16px #fff,
    25px 8px 0 -6px #fff,
    15px 25px 0 -12px #fff;
  }
}
