/*
dcl_0032
コインシミュレーション
*/
table {
  border-collapse: separate;
}

.nav-link {
  border: 1px solid !important;
}

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

#reset-btn {
  display: inline-block;
  margin: 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;
}
@media screen and (max-width: 480px) {
  #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;
  }
}

/* ----- コイン ----- */
.flip-coin,
.coin-front,
.coin-back {
  width: 60px;
  height: 60px;
  transform-style: preserve-3d;
}

@media screen and (max-width: 480px) {
  .flip-coin,
  .coin-front,
  .coin-back {
    width: 10vw;
    height: 10vw;
  }
}

.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%;
}
