@import 'variables';

:root {
  --podcast-spinning-animation: spin 20s linear infinite;
}

.podcast-episode-container {
  .hero {
    padding-bottom: 30px;
    text-align: center;
    .title {
      padding-top: 10px;
      background: $black;
      min-height: 300px;
      margin-bottom: -60px;
      @media screen and (min-width: 600px) {
        padding-top: 20px;
        min-height: 400px;
        margin-bottom: -120px;
      }
      color: white;
      h2 {
        font-weight: 500;
        margin: 0;
        margin-top: 40px;
        font-size: 20px;
        color: rgb(235, 243, 245);
        a {
          color: white;
          display: inline-block;
          margin-right: 4px;
        }
        img {
          height: 28px;
          width: 28px;
          vertical-align: -5px;
          height: 23px;
          width: 23px;
          vertical-align: -4px;
          margin-right: 8px;
          border-radius: 30px;
        }
        .follow-action-button {
          width: 260px;
          border-radius: 3px;
          border: 0px;
          display: block;
          margin: 20px auto;
          padding: 10px 0px;
          font-size: 25px;
        }
        @media screen and (min-width: 600px) {
          font-size: 24px;
          img {
            height: 28px;
            width: 28px;
            vertical-align: -5px;
          }
        }
      }
      h1 {
        font-weight: 700;
        margin: 15px auto 18px;
        font-size: 30px;
        line-height: 31px;
        max-width: 94%;

        @media screen and (min-width: 680px) {
          font-size: 45px;
          line-height: 55px;
          margin-bottom: 28px;
        }
        @media screen and (min-width: 800px) {
          font-size: 49px;
          line-height: 58px;
        }
        &.smaller {
          font-size: 23px;
          line-height: 25.5px;
          @media screen and (min-width: 490px) {
            font-size: 30px;
            line-height: 35px;
          }
          @media screen and (min-width: 680px) {
            font-size: 35px;
            line-height: 39px;
            margin-bottom: 20px;
          }
          @media screen and (min-width: 800px) {
            font-size: 45px;
            line-height: 50px;
          }
        }
      }
      time {
        padding-bottom: 70px;
        display: block;
        @media screen and (min-width: 600px) {
          padding-bottom: 150px;
        }
      }
    }
    .status-message {
      margin: auto;
      margin-top: -52px;
      @media screen and (min-width: 680px) {
        margin-top: -63px;
      }
      position: absolute;
      text-align: center;
      left: 0;
      right: 0;
      color: $black;
      padding: 2px 0px 3px;
      border-radius: 2px;
      transition: opacity 400ms ease;
      background: white;
      width: 130px;
      font-size: 16px;
      font-weight: bold;
      display: none;
      &.showing {
        display: block;
      }
    }

    .record-wrapper {
      background-color: transparent;
      border: 0;
    }

    .playing {
      .record {
        .main-image {
          animation-play-state: running;
        }
        .play-butt {
          display: none;
        }
        .pause-butt {
          display: block;
        }
      }
    }

    .record {
      position: relative;
      cursor: pointer;
      width: 72vw;
      height: 72vw;
      margin: auto;
      @media screen and (min-width: 380px) {
        width: 270px;
        height: 270px;
      }
      @media screen and (min-width: 680px) {
        width: 290px;
        height: 290px;
      }
      .main-image {
        border-radius: 450px;
        box-shadow: 5px 5px 60px rgba(0, 0, 0, 0.3);
        background: $black;
        position: relative;
        width: 100%;
        height: 100%;
        min-height: 160px;
        animation: var(--podcast-spinning-animation);
        animation-play-state: paused;
        -webkit-backface-visibility: hidden;
        @media screen and (min-width: 680px) {
          width: 290px;
          min-height: 290px;
        }
      }
      .butt {
        position: absolute;
        width: 120px;
        height: 120px;
        top: 50%;
        left: 50%;
        margin: -60px 0 0 -60px;
      }
      .pause-butt {
        display: none;
      }
      &.playing {
        .main-image {
          animation-play-state: running;
        }
        .play-butt {
          display: none;
        }
        .pause-butt {
          display: block;
        }
      }
    }
    audio {
      display: none;
    }
  }
  .container {
    margin-bottom: 60px;
    margin-top: 20px;
    .comments-container {
      margin-bottom: 20px;
    }
  }
}

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