video::-internal-media-controls-overlay-cast-button {
  display: none;
}
video::-webkit-media-controls-panel {
  background-image: none !important;
}


.trendio {
  --trendio-spacer: 8px;
  --trendio-osd-button-size: 32px;
  --product-thumbnail-size: 32px;
}

.trendio-videos {
  display: none;
}
.trendio-videos h4 {
  font-family: var(--trendio-heading-font-family);
  font-weight: var(--trendio-heading-font-weight);
}

video-tile-list {
  display: block;
  overflow-x: auto;
}
.video-tile-list-mask-right {
  -webkit-mask-image: var(--trendio-gradient-r);
  -webkit-mask-size: 4000px 20px;
  -webkit-mask-repeat: repeat-y;
  -webkit-mask-position: right;
  mask-image: var(--trendio-gradient-r);
  mask-size: 4000px 20px;
  mask-repeat: repeat-y;
  mask-position: right;
}
.video-tile-wrapper {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: var(--trendio-spacer);
}
.video-tile {
  position: relative;
  display: inline-block;
  border: solid 2px black;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  cursor: pointer;
}
.video-tile video {
  pointer-events: none;
}
.video-tile img.video-thumbnail, .video-tile video {
  position: absolute;
  border-radius: 50%;
  width: 72px;
  height: 72px;
  top: 2px;
  left: 2px;
  object-fit: cover;
}
.video-tile .ic-play {
  display: block;
  position: absolute;
  z-index: 1;
  width: 40px;
  height: 40px;
  top: 17px;
  left: 17px;
  filter: brightness(5);
  background-size: contain;
  background-image: var(--trendio-ic-play);
}
.video-tile:hover .ic-play {
  display: none;
}

video-overlay {
  display: none;
}
video-overlay.video-overlay-detached {
  position: fixed;
  z-index: 1000;
  height: 50vh;
  bottom: 2em;
  left: 2em;
}
video-overlay.video-overlay-embedded {
  position: absolute;
  inset: 0;
  width: auto;
  --webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
video-overlay.video-overlay-fullscreen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: auto;
}

video-overlay .video-wrapper {
  font-family: var(--trendio-video-overlay-font-family);
  font-weight: var(--trendio-video-overlay-font-weight);
  font-size: 14px;
  box-sizing: border-box;
  inset: 0;
  width: auto;
  aspect-ratio: 11/16;
  margin: 0 auto;
  border-radius: 22px;
  overflow: hidden;
  background-color: gray;
  /* -webkit-transform: translateZ(0); */
}
video-overlay.video-overlay-detached .video-wrapper {
  position: absolute;
  height: 50vh;
  margin: 0 auto;
  background-color: #808080;
}
video-overlay.video-overlay-embedded .video-wrapper {
  position: absolute;
  top: 10px;
  height: 60vh;
  min-height: 600px;
  box-shadow: 0 0 30px 10px rgba(0,0,0,.4);
}
video-overlay.video-overlay-fullscreen .video-wrapper {
  width: 100%;
  height: 100%;
  aspect-ratio: inherit;
  border-radius: 0;
}

video-overlay video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  pointer-events: none;
}

video-overlay .video-osd {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: calc(var(--trendio-spacer)*2);
  color: white;
}
video-overlay .video-osd a {
  color: white;
  text-decoration: none;
}

video-overlay .video-osd-top {
  display: flex;
  justify-content: space-between;
}
video-overlay .video-osd-creator {
  display: flex;
  gap: var(--trendio-spacer);
  flex-direction: row-reverse;
  align-items: center;
}
video-overlay .video-osd-creator-handle {
  display: inherit;
  font-size: 0.9em;
  font-weight: bold;
  letter-spacing: -0.02em;
}
video-overlay .video-osd-avatar {
  display: inherit;
  top: 1em;
  right: 1em;
}
video-overlay .video-osd-avatar img {
  width: 2em;
  height: 2em;
  border-radius: 50%;
  object-fit: cover;
}

video-overlay .video-osd-actions {
  display: flex;
  flex-direction: column;
  gap: var(--trendio-spacer);
  justify-content: flex-end;
  align-items: flex-end;
}

video-overlay .video-osd-button {
  cursor: pointer;
  display: inherit;
  width: var(--trendio-osd-button-size);
  height: var(--trendio-osd-button-size);
  border-radius: 20%;
  background: center no-repeat;
  background-color: #00000038;
  backdrop-filter: blur(1px);
  background-size: 24px auto;
}
video-overlay .video-osd-button.video-osd-close {
  top: 1em;
  left: 1em;
  background-size: 16px auto;
  background-image: var(--trendio-ic-close);
}
video-overlay .video-osd-button.video-osd-volume {
  bottom: 70px;
  right: 1em;
  background-image: var(--trendio-ic-volume);
}
video-overlay .video-osd-button.video-osd-mute {
  background-image: var(--trendio-ic-mute);
}
video-overlay .video-osd-button.video-osd-previous {
  top: calc(50% - 40px);
  right: 1em;
  background-size: 10px auto;
  background-image: var(--trendio-ic-up);
}
video-overlay .video-osd-button.video-osd-next {
  top: 50%;
  right: 1em;
  background-size: 10px auto;
  background-image: var(--trendio-ic-down);
}

video-overlay .video-osd-products {
  text-wrap: nowrap;
  white-space: nowrap;
  overflow: scroll;
}
video-overlay .trendio-product-tile {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--trendio-spacer);
  width: 80%;
  margin-right: var(--trendio-spacer);
  border-radius: calc(var(--trendio-spacer) * 3/4);
  background-color: #00000033;
}
video-overlay .trendio-product-tile:last-child {
  margin-right: 0;
}
video-overlay .trendio-product-tile:first-child:last-child {
  width: 100%;
}
video-overlay .trendio-product-tile > a {
  cursor: inherit;
  display: flex;
  width: 100%;
  padding: var(--trendio-spacer);
  gap: var(--trendio-spacer);
}
video-overlay .trendio-product-tile > a[href] {
  cursor: pointer;
}
video-overlay .trendio-product-tile .trendio-product-tile-image {
  flex: 0 0 var(--product-thumbnail-size);
}
video-overlay .trendio-product-tile .trendio-product-tile-info {
  flex-basis: 100%;
  max-width: calc(100% - var(--trendio-osd-button-size) - var(--trendio-spacer));
  /* line-height: 1.2em; */
}
video-overlay .trendio-product-tile img {
  width: var(--product-thumbnail-size);
  height: var(--product-thumbnail-size);
  border-radius: 20%;
  object-fit: cover;
}
video-overlay .trendio-product-tile-name {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  margin-top: calc(var(--trendio-spacer) / 2);
}
