@import "../variables";
@import "../mixins/display";

.cr-video {
  &__holder {
    position: relative;
    padding-bottom: 56.25%;
    padding-top: 30px;
    height: 0;
    overflow: hidden;
    border: 1px solid $BLACK;
    background: $BLACK;

    iframe,
    object,
    embed {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
  }
}

.cr-video-transcript {
  background-color: $BLACK;
  @include clearfix;

  &__heading {
    background-color: $BLACK;
    border-color: $BLACK;
    padding: 10px 15px;
  }

  &__title {
    margin-top: 0 !important;
    margin-bottom: 0 !important;

    .collapse-toggle {
      font-family: $font-family-museo;
      font-size: 16.1px !important;
      color: $brand-gray-light;
    }

    .anchorjs-link {
      display: none;
    }
  }

  &__body {
    &--outer {
      padding: 0 15px 15px;
      clear: both;
      background: $BLACK;
    }

    &--inner {
      -webkit-overflow-scrolling: touch;
      max-height: 180px;
      padding: 15px;
      overflow-x: hidden;
      overflow-y: scroll;
      background-color: $WHITE;
      border-top-color: $BLACK;
      border-bottom-color: $BLACK;
      border-radius: 4px;

      ::-webkit-scrollbar {
        background: transparent;
        height: 10px;
        overflow: visible;
        width: 10px;
      }

      ::-webkit-scrollbar-thumb {
        background-color: rgba($BLACK, 0.2);
        -webkit-border-radius: 5px;
      }

      ::-webkit-scrollbar-thumb:hover {
        background-color: rgba($BLACK, 0.6);
      }

      ::-webkit-scrollbar-corner {
        background: transparent;
      }
    }
  }

  .collapse-toggle:hover {
    text-decoration: none;

    span {
      text-decoration: underline;
    }
  }

  .collapse-toggle:not(.collapsed) {
    position: relative;
    top: 1px;


    &::before {
      @include chevron;
      padding-right: 5px;
      font-size: initial;
      text-decoration: none;
      content: $icon-chevron-up;
    }

    span::after {
      content: "Hide Transcript";
    }

    span:focus {
      text-decoration: underline;
    }
  }

  .collapsed {
    position: relative;
    top: 1px;

    &::before {
      @include chevron;
      padding-right: 5px;
      font-size: initial;
      text-decoration: none;
      content: $icon-chevron-down;
    }

    span::after {
      content: "View Transcript";
    }
  }
}




