/*
dcl_0032
コインシミュレーション
*/
html,body{
    overflow:hidden;
}
table {
  border-collapse: separate;
}

.nav-link {
  border: 1px solid !important;
}

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

.box-left{
  min-width:312px;
}

.box-right{

}

#reset-btn {
  display: inline-block;
  margin:5px 1em;

  padding: 0.3em 2em;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  color: #0091d4;
  background: #ffffff;
  border: solid 2px #0091d4;
  border-radius: 30px;
  opacity: 0.95;

  cursor: pointer;
  user-select: none;
  z-index: 100;
}

#flip-btn {
  display: inline-block;

  margin-top: 1.5em;
  padding: 0.5em 3em;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  color: #ffffff;
  background: #0091d4;
  border-radius: 30px;

  cursor: pointer;
  user-select: none;
}

#label-trial {
  position: absolute;
  top: 1em;
  right: 0.5em;

  padding: 0 0.5em;
  text-align: center;
  background: #ffffff;
  border: solid 1px #333333;
  border-radius: 5px;
}
#label-max {
  position: absolute;
  top: 3.2em;
  right: 0.75em;

  font-size: small;
}
#label-x {
  position: absolute;
  bottom: -1em;
  right: 0em;

  font-size: small;
}
#label-y {
  position: absolute;
  top: 0em;
  left: 3.75em;

  font-size: small;
}

/* ----- コイン ----- */
.flip-coin,
.coin-front,
.coin-back {
  width: 60px;
  height: 60px;
  transform-style: preserve-3d;
}

.coin-front,
.coin-back {
  background: gold;
  border-radius: 50%;
  position: absolute;
  backface-visibility: hidden;
}

.coin-front > img,
.coin-back > img {
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-touch-callout: none;
  user-select: none;
}

.angle-0 {
  transform: rotateY(0deg);
}
.angle-180 {
  transform: rotateY(-180deg);
}

.flip0 {
  animation: flip_0 1s ease-out 0s 1 normal forwards;
}
.flip1 {
  animation: flip_1 1s ease-out 0s 1 normal forwards;
}
.flip2 {
  animation: flip_2 1s ease-out 0s 1 normal forwards;
}

@keyframes flip_0 {
  to {
    /* 2回転 */
    transform: rotateY(720deg);
  }
}
@keyframes flip_1 {
  to {
    /* 1.5回転 */
    transform: rotateY(540deg);
  }
}
@keyframes flip_2 {
  to {
    /* 1回転 */
    transform: rotateY(360deg);
  }
}

/* ---------- グラフ ---------- */
.grid line {
  stroke: lightgrey;
  shape-rendering: crispEdges;
}

.grid path {
  stroke-width: 0;
}

#graph-container {
  transform-origin: top left;
  width: 100%;
  height: 100%;
}

/* ----------flex----------- */
@media screen and (max-width: 768px) {
  #flexContainer {
    flex-direction: column;
    margin: 0 !important;
  }
}

@media screen and (max-width: 540px) {
  .navbar-brand {
    margin-right: 0 !important;
  }

  .navbar {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .flip-coin,
  .coin-front,
  .coin-back {
    width: 7vw;
    height: 7vw;
  }

  #flip-btn {
    padding: 0.3em 1em;
    margin-top: 2px;
  }

  #coin-area {
    margin-bottom: 10px !important;
  }

  #reset-btn {
    padding: 0.2em 1em;
    margin-top: 2px;
    margin-bottom: 0px;
  }

  #label-trial {
    font-size: 2.5vw;
  }

  #label-max {
    top: 2.75em;
    right: 0em;
    font-size: 2.5vw;
  }

  #label-x {
    font-size: 2.5vw;
  }

  #label-y {
    top: -0.5em;
    left: 2em;
    font-size: 2.5vw;
  }
}

/* ----------横長で高さを小さくしたときの対応 高さ663px以下でリセットボタンが隠れ始めるので小さくする----------- */
@media screen and (min-width: 768px) and (max-height:663px) {
    .navbar {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .flip-coin,
    .coin-front,
    .coin-back {
        width: 7vh;
        height: 7vh;
    }

    #flip-btn {
        padding: 0.3em 1em;
        margin-top: 2px;
    }

    #reset-btn {
        padding: 0.2em 1em;
        margin-top: 2px;
        margin-bottom: 0px;
    }

      #coin-area {
    margin-bottom: 12px !important;
  }
}