#my-unlv-player {
  --toolbar-height: 2rem;
  --caption-bottom-offset: 8%;
  --caption-font-size: clamp(0.8rem, 4cqw, 3rem);
  /* old background color */
  /* --caption-background: rgba(7, 7, 7, 0.75); */
  --caption-background: rgba(60, 0, 0, 0.8);

  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.video-wrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: min(100%, calc((100dvh - var(--toolbar-height)) * 16 / 9));
  container-type: inline-size;
}

.video-frame iframe {
  display: block;
  border: 0;
  width: 100%;
  height: 100%;
}

.caption-overlay {
  position: absolute;
  left: 50%;
  bottom: var(--caption-bottom-offset);
  transform: translateX(-50%);
  max-width: 100%;
  text-align: center;
  pointer-events: none;
  z-index: 1;
}

#caption-text {
  display: none;
  margin: 0;
  color: #fff;
  background: var(--caption-background);
  font-family: "YouTube Noto", Roboto, Arial, sans-serif;
  font-size: var(--caption-font-size);
  line-height: 1.4;
  white-space: pre-line;
  padding: .2rem 0.4rem;
  border-radius: 2px;
  text-shadow: 0 0 2px var(--caption-background), 0 1px 3px var(--caption-background);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

#caption-text.is-active {
  display: inline;
}

.player-error {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-family: "YouTube Noto", Roboto, Arial, sans-serif;
  font-size: 1rem;
  z-index: 2;
}

.player-error:not([hidden]) {
  display: flex;
}

#my-unlv-player.is-loading .caption-toolbar {
  opacity: .5;
  pointer-events: none;
}

.caption-toolbar {
  flex: 0 0 var(--toolbar-height);
  height: var(--toolbar-height);
  box-sizing: border-box;
  /* overflow: hidden; */
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  color: #444;
  background-color: rgb(27, 28, 29);

    p {
      color: #cbd5e1;
      font-size: .75rem;
    }

    .caption-toolbar-left {
      display: flex;
      flex-direction: row;
      align-items: center;
    }

    svg.brand {
      height: calc(var(--toolbar-height) - .8rem);
      fill: currentColor;
      padding: 0 .25rem 0 .5rem;
    }

    button.toolbar-btn {
      margin: 0;
      padding: 0 .5rem;
      cursor: pointer;
      border: 0;
      background: transparent;
      color: #94a3b8;
      font-size: 1rem;
      line-height: 0;

      & > svg {
        height: 2rem;
        fill: currentColor;
      }

      & > svg.icon-pressed {
        display: none;
      }

      &[aria-pressed="true"] > svg.icon-pressed,
      &[aria-expanded="true"] > svg.icon-pressed {
        display: block;
      }

      &[aria-pressed="true"] > svg.icon-unpressed,
      &[aria-expanded="true"] > svg.icon-unpressed {
        display: none;
      }

      &:hover {
        border-color: #475569;
        color: #cbd5e1;
      }

      &[aria-pressed="true"] {
        color: #cbd5e1;
      }

    }

    .cc-track-wrapper {
      position: relative;

      .cc-track-select {
        display: flex;
        flex-direction: row;
        align-items: center;
        font-size: .9rem;
        white-space: nowrap;
      }

      .cc-track-options {
        display: none;
        position: absolute;
        top: calc(-1 * var(--toolbar-height));
        left: 0;
        min-height: var(--toolbar-height);
        z-index: 1;
        flex-direction: column;
        background-color: rgb(27, 28, 29);
        border: 1px solid #3a3b3c;
        border-radius: 4px;
        overflow: hidden;

        &.is-open {
          display: flex;
        }

        button {
          margin: 0;
          padding: .5rem 1rem;
          border: 0;
          background: transparent;
          color: #94a3b8;
          font-size: .9rem;
          text-align: left;
          white-space: nowrap;
          cursor: pointer;

          &:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #cbd5e1;
          }

          &.selected {
            color: #fff;
          }
        }
      }

    }

}

.cc-disable-yt-cc-instructions {
  position: relative;
}

.cc-instructions-full {
  display: none;
}

.cc-instructions-toggle {
  background: transparent;
  border: 0;
  padding: 0;
  color: #cbd5e1;
  font-size: .75rem;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  cursor: pointer;
}

.cc-instructions-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: .5rem;
  max-width: 240px;
  padding: .5rem .75rem;
  background: rgb(27, 28, 29);
  border: 1px solid #3a3b3c;
  border-radius: 4px;
  color: #cbd5e1;
  font-size: .75rem;
  text-align: center;
  z-index: 1;
}

.cc-instructions-tooltip.is-open {
  display: block;
}

@media (min-width: 576px) {
  .cc-instructions-full {
    display: block;
  }

  .cc-instructions-compact {
    display: none;
  }
}