.mediaPage {
  .mediaContent {
    gap: 2em 4em;
    display: grid;
    padding: 30px;
  }

  .mediaPageSeasons {
    display: grid;
    gap: 2em;

    .seasons, .episodes {
      display: grid;
      margin: 1em 0;
      grid-gap: 2em;

      p {
        margin-top: 1em;
        color: var(--secondaryTextColor);
        padding: 0 2px;
        font-family: "Roboto Condensed Regular", Arial;
      }
    }

    .seasons {
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));

      &.selected {
        .season:not(.active) .cardImageWrapper {
          opacity: .3;
        }
      }

      .season {
        width: 200px;
        text-align: center;

        &:not(.active) {
          cursor: pointer;

          &:hover .cardImageWrapper {
            filter: brightness(1.2);
          }
        }

        .cardImageWrapper {
          width: 200px;
          height: 300px;
          border-radius: 10px;
          overflow: hidden;
          transition: 0.2s ease-in-out;
          transition-property: filter, opacity;

          .placeholder {
            height: 100%;
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: center;

            svg {
              width: 48px;
            }
          }

          .imageLoad {
            height: 100%;
            width: 100%;
            animation: onHideImage 0s ease-in-out forwards;

            &.show-true {
              animation: onActiveImage 300ms ease-in-out forwards;
            }

            &.show-false {
              animation: onHideImage 300ms ease-in-out forwards;
            }

            img {
              height: 100%;
              width: 100%;
              object-fit: cover;
            }
          }
        }
      }
    }

    .episodes {
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));

      .episode {
        text-align: center;
        border-radius: 5px;
        cursor: pointer;
        width: 100%;

        &:hover .cardImageWrapper {
          filter: brightness(1.2);

          .progress {
            opacity: 1;
          }
        }

        .cardImageWrapper {
          position: relative;
          width: inherit;
          height: 200px;
          border-radius: 10px;
          overflow: hidden;
          transition: filter 0.2s ease-in-out;

          .placeholder {
            height: 100%;
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: center;

            svg {
              width: 48px;
            }
          }

          .imageLoad {
            height: 100%;
            width: 100%;
            animation: onHideImage 0s ease-in-out forwards;

            &.show-true {
              animation: onActiveImage 300ms ease-in-out forwards;
            }

            &.show-false {
              animation: onHideImage 300ms ease-in-out forwards;
            }

            img {
              height: 100%;
              width: 100%;
              object-fit: cover;
            }
          }

          .progress {
            position: absolute;
            background: var(--tertiaryColor);
            left: 50%;
            opacity: 0;
            bottom: 1em;
            height: 4px;
            border-radius: 10px;
            width: 90%;
            transition: opacity 200ms ease-in-out;
            transform: translateX(-50%);

            .value {
              position: absolute;
              left: 0;
              width: 0;
              max-width: 100%;
              height: 4px;
              border-radius: 4px;
              transition: width 200ms ease-in-out;
              background: var(--accentColor);
            }
          }
        }
      }
    }
  }
}

/*
    * == KEYFRAMES ==
*/

@keyframes mediaPageBackdropAppear {
  0% {
    transform: scale(1.1);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes mediaPageContentAppear {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes imageLoaded {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes onActiveImage {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes onHideImage {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}


/*
    * == MEDIA QUERIES ==
*/

@media only screen and (max-width: 2560px) and (max-height: 1440px) {
  .mediaBackdrop img {
    object-position: 30% 30%;
  }
}

@media only screen and (max-width: 720px) and (max-height: 1440px) {
  .mediaBackdrop img {
    object-position: 50%;
  }
}

@media only screen and (min-width: 1080px) {
  .mediaPage .mediaContent {
    grid-template-columns: auto 1fr;
    padding: 60px 90px;
  }
}
