.wp-block-klarity-klarity-cases-overview-block {
  background: inherit;
  margin-top: -8px !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  &.case_list {
    @include hide-elements-starting-at('.case-wrapper', $hide-cases-from);

    .case {
      .description {
        .title {
          font-weight: bold;
          display: flex;
          flex-direction: column;
          justify-content: center;
          min-height: 80px;
          max-height: 80px;
          line-height: 40px;
          font-size: 32px;
        }

        .short-description {
          height: 80px;
        }
      }
    }
  }

  &.subcase_list {
    .case {
      .description {
        .title {
          font-size: 28px;
          line-height: 32px;
        }

        .short-description {
          font-size: 15px;
        }
      }
    }
  }

  a {
    text-decoration: none !important;
  }

  .case {
    padding: 0;
    font-family: Lato, sans-serif;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);

    &.resolved {
      .thumbnail-container {
        background-size: cover;
      }
    }

    &.unresolved {
      .new, .update {
        display: flex;
        position: absolute;
        font-weight: bold;
        font-style: italic;
        font-family: Unna, sans-serif;
        font-size: 24px;
        line-height: 30px;
        z-index: 5;
        color: white;
        text-transform: uppercase;
        align-items: center;
        justify-content: center;

        &.new {
          background-color: $new-badge--background;
          color: $new-badge--color;
          top: -1.25rem;
          right: -0.75rem;
          height: 85px;
          width: 85px;
          border-radius: 50%;
        }

        &.update {
          background-color: $update-badge--background;
          color: $update-badge--color;
          padding: 0 24px;
          top: #{$case-height--desktop - 30};

          @media only screen and (max-width: 960px) {
            top: #{$case-height--mobile - 30};
          }
        }
      }

      .label {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 5px;
        left: -7px;
        width: 180px;
        height: 20px;
        color: white;
        font-weight: bold;
        font-family: Lato, sans-serif;
        font-size: 12px;
        letter-spacing: 0.2em;
        text-transform: uppercase;

        @media only screen and (max-width: 600px) {
          font-size: 10px;
        }

        &.grey {
          background: #71718A !important;
        }

        &.red {
          background: #E41414 !important;
        }

        &:after {
          position: absolute;
          content: " ";
          top: 20px;
          left: 0;
          width: 0;
          height: 0;
          border-style: solid;
          border-width: 0 7px 7px 0;
          border-color: transparent black transparent transparent;
        }
      }

      .thumbnail-container {
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
      }
    }

    .thumbnail-container {
      height: $case-height--desktop;
    }

    .description {
      display: flex;
      flex-direction: column;
      justify-content: space-evenly;
      height: 200px;
      padding: 15px;

      .title {
        font-family: unna, sans-serif;
        margin-top: 0;
        margin-bottom: 0;
      }

      .headline,
      .description {
        font-family: lato, sans-serif;
      }

      .headline {
        font-weight: 300;
        line-height: 16px;
        font-size: 15px;

        &.headline {
          text-transform: uppercase;
        }
      }

      .description {
        line-height: 24px;
        font-size: 14px;
      }
    }

    .separator {
      width: 50px;
      border-top: 1px solid $text-color;
      margin: 10px auto;
    }

    .short-description {
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
  }

  &.subcase_list {
    &.unresolved_cases {
      @include hide-elements-starting-at('.case-wrapper', $hide-unresolved-subcases-from);
    }
    &.resolved_cases {
      @media screen and (max-width: 600px) {
        @include hide-elements-starting-at('.case-wrapper', $hide-resolved-subcases-from--mobile);
      }
      @media screen and (min-width: 600px) {
        @include hide-elements-starting-at('.case-wrapper', $hide-resolved-subcases-from--desktop);
      }
    }

    .case {
      text-align: left;

      &.unresolved {
        .video-container {
          width: 100% !important;
          max-width: 100% !important;
          height: $case-height--desktop !important;
          max-height: $case-height--desktop;
          margin-top: $top-margin_desktop;
          padding-top: 0 !important;
          padding-bottom: 0 !important;

          @media screen and (max-width: 600px) {
            max-height: $case-height--mobile;
            margin-top: $top-margin_mobile;
          }

          iframe {
            background: black;
            width: 100% !important;
            height: 100% !important;
          }

          .play-icon {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
          }

          .video-timestamp {
            position: absolute;
            right: 5px;
            bottom: 5px;
            padding: 0 5px;
            background: black;
            color: white;
            font-family: Lato, sans-serif;
            font-weight: bold;
            line-height: 15px;
            font-size: 10px;
          }
        }

        .description {
          min-height: $description-height-unresolved--mobile;

          @media screen and (min-width: 600px) {
            min-height: $description-height-unresolved--desktop;
          }

          .case-progress {
            a {
              line-height: 20px;
              font-size: 12px;
              color: $link-color;
              text-decoration: underline !important;
            }
          }
        }
      }

      &.resolved {
        box-shadow: none;
        margin-top: $top-margin_desktop;
        height: $case-height-resolved--mobile;

        @media screen and (min-width: 600px) {
          height: $case-height-resolved--desktop;
        }

        .thumbnail-container {
          height: 100%;
        }

        .description {
          justify-content: flex-start;
          font-size: 14px;
          font-weight: 300;
          padding-top: 0;
          padding-bottom: 0;

          @media screen and (min-width: 600px) {
            font-size: 18px;
            padding-right: 30px;
          }
        }
      }

      .description {
        height: 100%;

        * {
          text-align: left;
        }
      }
      .case-progress-title{
        font-size: 12px;
        margin: 0;
        line-height: 16px;
        text-align: left;
        color: #0F0F0F;
        display:inline;
      }
      .case-progress {
        display:flex;
        .case-block {
          &.step-0 {
            background-color:#E1E1E1;
          }
          &.step-1 {
            background-color: #78A8DA;
          }
          &.step-2 {
            background: linear-gradient(90deg, #78A8DA, #96DDEB 124%);
          }
          &.step-3 {
            background: linear-gradient(90deg,  #96DDEB 25.94%, #59D27B 73.31%);
          }
          &.step-4 {
            background: linear-gradient(90deg, #59D27B -21.32%, #1FA24A 92.65%);
          }
          &.step-5 {
            background-color: #1FA24A;
          }
          width:20%;
          height:8px;
          margin-right:1px;
        }
      }
    }
  }

  .see-all, .see-less {
    clear: both;
    font-size: 14px;
    text-transform: uppercase;
    text-align: right;
    cursor: pointer;

    &.see-all {
      display: none;
    }

    &.see-less {
      background: inherit;

      &.sticky {
        @media screen and (max-width: 600px) {
          position: fixed;
          width: 100%;
          right: 0;
          bottom: 0;
          padding: 15px calc(15px + 0.75rem) 15px 0;
        }
      }
    }
  }
}
