* {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#mui-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 99999999;
  background-color: rgba(0, 0, 0, 0.2);
  overflow: auto;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  padding: 15px;
  background-color: #f9f9f9;
}

a,
a:hover {
  outline: none;
  text-decoration: none;
}

.mdc-ripple-upgraded--background-focused::before {
  opacity: 0 !important;
}
.mdc-icon-button:not(.mdc-ripple-upgraded):focus::before,
.mdc-icon-button:hover::before {
  opacity: 0;
}

.mui-btn {
  font-family: "Roboto";
}

/* absolute FAB with drawer */

.app-fab--absolute {
  z-index: 5;
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  touch-action: none;
}

.app-fab--absolute-secondary {
  z-index: 5;
  position: fixed;
  bottom: 1rem;
  right: 5rem;
  touch-action: none;
}

.fab-drawer {
  position: fixed;
  z-index: 10;
  bottom: 5rem;
  display: flex;
  flex-direction: column-reverse;
  padding: 0px 10px;
  right: 0.9rem;
  min-height: 0;
}

@media (min-width: 1024px) {
  .app-fab--absolute {
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .app-fab--absolute-secondary {
    bottom: 1.5rem;
    right: 5.5rem;
  }

  .fab-drawer {
    bottom: 5.5rem;
    right: 1.4rem;
  }
}

.app-fab--absolute:not(:focus) + .fab-drawer {
  pointer-events: none;
}

.app-fab--absolute:not(:focus) + .fab-drawer:active {
  pointer-events: auto;
}

.app-fab--absolute:not(:focus) + .fab-drawer .mdc-fab {
  /* -webkit-transform: translateZ(0); */
  transform: scale(0);
  opacity: 0;
}

.fab-drawer .mdc-fab {
  will-change: transform, opacity;
  margin-bottom: 10px;
  opacity: 1;
  transition: transform 300ms ease-in-out 100ms, opacity 300ms ease-out 100ms;
}

/* panels  */

/* controls menu */
.controls {
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  text-align: center;
  font-size: 40px;
  display: flex;
  justify-content: space-evenly;
  position: fixed;
  bottom: 0px;
  width: 100%;
  z-index: 1;
  left: 0;
}

.controls i {
  margin-top: 7px;
  cursor: pointer;
}

/* players panel */
#players {
  padding-bottom: 10px;
  width: 100%;
}

#players ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.player {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
  font-family: "Beleren Bold";
}

.player-content {
  display: flex;
  padding-top: 2px;
  position: relative;
}

.player-content .grip {
  cursor: move;
  padding: 19px 15px 0px 15px;
}

.player-content .decrease {
  margin-left: auto;
}

.player-content .ticker {
  position: absolute;
  right: 58px;
  top: 2px;
  font-size: 13px;
}

.player-content .player_hp {
  font-weight: bolder;
  font-size: 40px;
  border: none;
  width: 70px;
  text-align: center;
  height: 52px;
  padding-top: 3px;
}

.player-content button {
  font-size: 50px;
  font-weight: bolder;
  padding: 0px;
  text-align: left;
  width: 50px;
  height: 50px;
}

.player-content :last-child {
  margin-right: 10px;
}

.overlay-container {
  width: 80%;
  height: 80%;
  margin: 0 auto;
  background: #f9f9f9;
  align-self: center;
}

.player-content .player_name {
  width: 120px;
  text-transform: capitalize;
  font-size: 25px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 100%;
  padding-top: 14px;
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.player-actions {
  background-color: rgba(0, 0, 0, 0.05);
  display: flex;
  padding: 8px;
  width: 100%;
  min-height: 52px;
}

.player-actions .mana-cost {
  padding-top: 7px;
  white-space: nowrap;
}

.player-actions .card-name {
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.player-actions :last-child {
  margin-left: auto;
}

.player.sortable-drag {
  margin-bottom: 0px;
}

.player-details {
  margin-top: 5px;
  padding: 5px 5px;
  display: flex;
  flex-direction: row;
}

.player-details--content {
  margin-left: 10px;
  padding: 12px 0px 4px 0px;
}

.player-details--content .ra {
  color: var(--mtg-color-fg--blue);
  text-shadow: 0px 0px 5px black;
  display: inline-block;
  font-size: 1.5em;
  margin-top: 1px;
  margin-left: 10px;
}

.player-details--content .ra:first-of-type {
  margin-left: 0px;
}

.player-details--content span {
  display: inline-block;
  width: 30px;
  font-size: 1.5em;
  height: 30px;
  margin-left: 5px;
}

.player-details .settings {
  margin-left: auto;
  background: rgba(0, 0, 0, 0.025);
  border-radius: 40px;
}

.player-details .card-history,
.player-details .search {
  margin-left: 5px;
  background: rgba(0, 0, 0, 0.025);
  border-radius: 40px;
}

.dice-roll-result {
  font-size: 36px;
  line-height: 30px;
  width: 42px;
  text-align: center;
  margin-left: auto;
  /* padding-top: 6px; */
  padding-right: 5px;
}

.player-details .expand {
  display: inline-block;
}

:root {
  --mtg-color-bg--black: rgba(67.5%, 63.5%, 60.4%, 40%);
  --mtg-color-fg--black: rgba(67.5%, 63.5%, 60.4%, 100%);
  --mtg-color-bg--green: rgba(57.6%, 70.6%, 51.4%, 60%);
  --mtg-color-fg--green: rgba(57.6%, 70.6%, 51.4%, 100%);
  --mtg-color-bg--blue: rgba(71%, 80.4%, 89%, 60%);
  --mtg-color-fg--blue: rgba(71%, 80.4%, 89%, 100%);
  --mtg-color-bg--red: rgba(85.9%, 52.5%, 39.2%, 60%);
  --mtg-color-fg--red: rgba(85.9%, 52.5%, 39.2%, 100%);
  --mtg-color-bg--white: rgba(94.1%, 94.9%, 75.3%, 60%);
  --mtg-color-fg--white: rgba(94.1%, 94.9%, 75.3%, 100%);
}

.player[data-color="black"] .mdc-card {
  background-color: var(--mtg-color-bg--black);
}

.player[data-color="blue"] .mdc-card {
  background-color: var(--mtg-color-bg--blue);
}

.player[data-color="green"] .mdc-card {
  background-color: var(--mtg-color-bg--green);
}

.player[data-color="white"] .mdc-card {
  background-color: var(--mtg-color-bg--white);
}

.player[data-color="red"] .mdc-card {
  background-color: var(--mtg-color-bg--red);
}

.ra-cracked-shield[data-color="black"] {
  color: var(--mtg-color-fg--black);
}

.ra-cracked-shield[data-color="blue"] {
  color: var(--mtg-color-fg--blue);
}

.ra-cracked-shield[data-color="green"] {
  color: var(--mtg-color-fg--green);
}

.ra-cracked-shield[data-color="white"] {
  color: var(--mtg-color-fg--white);
}

.ra-cracked-shield[data-color="red"] {
  color: var(--mtg-color-fg--red);
}

/* scenes panel */
#scenes .scenes {
  text-align: center;
  display: none;
}

#scenes .scene {
  display: block;
  width: 100%;
  margin-left: 0px;
}

/* overlays */
#mui-overlay {
  outline: none;
  display: flex;
  background-color: rgba(0, 0, 0, 0.6);
}

#mui-overlay .mui-form--inline {
  width: 80%;
  height: calc(100% - 100px);
  margin: 20px auto;
  padding: 20px;
  background-color: #ffffff;
  text-align: center;
}

#mui-overlay .mui-form--inline .mui-textfield {
  width: 100%;
}

.results {
  list-style: none;
  padding: 0;
  overflow-y: auto;
  height: calc(100% - 70px);
  top: unset !important;
  position: unset !important;
}

.results li {
  width: 100%;
  height: 50px;
  padding: 10px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.overlay-card {
  justify-content: center;
  display: block;
  align-self: center;
  margin: 0 auto;
  max-width: calc(80%);
  max-height: calc(80%);
}

.overlay-card img {
  display: block;
}

.player-history {
  overflow-y: auto;
  overflow-x: hidden;
}

.player-history a {
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.dice-roller {
  display: flex;
  align-content: center;
  justify-content: space-evenly;
  text-align: center;
  flex-direction: column;
}

.dice-cta {
  font-size: 100px;
  margin: 0 auto;
  align-self: center;
  cursor: pointer;
}

.dice-cta.rolling {
  animation: spin 4s linear infinite;
}

/* media queries, mobile first */
@media only screen and (min-width: 320px) {
  /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */
  body.debug h1 {
    color: red;
  }

  .grid {
    display: flex;
    flex-direction: column;
  }

  .mui-scroll-lock {
    /* position: fixed; */
  }

  .hidden {
    display: none;
  }
}
@media only screen and (min-width: 480px) {
  /* smartphones, Android phones, landscape iPhone */
  body.debug h1 {
    color: blue;
  }
}
@media only screen and (min-width: 600px) {
  /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */
  body.debug h1 {
    color: green;
  }
}
@media only screen and (min-width: 801px) {
  /* tablet, landscape iPad, lo-res laptops ands desktops */
  body.debug h1 {
    color: cyan;
  }

  .grid {
    display: grid;
    grid-gap: 10px;
    grid-template-columns: 3fr minmax(0px, 2fr);
    grid-template-rows: 6.5fr minmax(0px, 3.5fr);
  }

  #players {
    margin-bottom: 0px;
    min-width: 0;
  }

  .controls {
    position: absolute;
    left: 15px;
    bottom: 15px;
    width: calc(100% - 30px);
  }

  .results .selected {
    color: #3f51b5;
    box-shadow: 0 0 5px black;
  }

  .mui-scroll-lock {
    position: unset;
  }

  .hidden {
    display: flex;
  }
}

@media only screen and (min-width: 1025px) {
  /* big landscape tablets, laptops, and desktops */
  body.debug h1 {
    color: magenta;
  }
}
@media only screen and (min-width: 1281px) {
  /* hi-res laptops and desktops */
  body.debug h1 {
    color: yellow;
  }
}

@-moz-keyframes spin {
  100% {
    -moz-transform: rotate(360deg);
  }
}
@-webkit-keyframes spin {
  100% {
    -webkit-transform: rotate(360deg);
  }
}
@keyframes spin {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
