.hidden {
  display: none !important;
}

.youtube-link-btn.active {
  display: block;
}

.youtube-link-close.active {
  display: block;
  z-index: 10;
  position: absolute;
  left: 40rem;
}

.paragraph--type--youtube-link-thumbnail.active {
  width: 100%;
  height: 100% !important;
  top: 0;
  z-index: 2;
}

.youtube-image:before {
  display: block;
  content: '';
  position: absolute;
  top: calc(50% - 2em);
  left: calc(50% - 2em);
  width: 4em;
  height: 4em;
  border-radius: 50%;
  background-color: var(--color-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='25' height='29' viewBox='0 0 25 29'%3E%3Cpath id='Polygon_8' data-name='Polygon 8' d='M12.77,2.983a2,2,0,0,1,3.46,0L27.258,22a2,2,0,0,1-1.73,3H3.472a2,2,0,0,1-1.73-3Z' transform='translate(25) rotate(90)' fill='%23fff'/%3E%3C/svg%3E%0A");
  background-repeat: no-repeat;
  background-position: left 60% center;
  background-size: 1.5em;
  pointer-events: none;
  z-index: 2;
}

.youtube-image :before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.3) 100%);
}

.youtube-image img {
  aspect-ratio: 16/9;
  width: 100%;
  height: auto !important;
  object-fit: cover;
}

/* Video Slider */
.slider .layout-overlay .paragraph.paragraph--type--youtube-link-thumbnail.paragraph--view-mode--default {
  position: fixed;
}

/* Video Default */
.youtube_link.layout-default .paragraph--type--youtube-link-thumbnail.paragraph--view-mode--default {
  position: relative;
}

.youtube-element.active {
  overflow: hidden;
  top: 0;
  left: -50vw;
  height: auto;
  width: 100%;
}

.youtube_link .youtube-element:after {
  width: 0;
  height: 0;
  background-image: none;
  background-size: 0;
}

.youtube-link {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2;
}

.youtube-link a {
  display: inline-block;
  background-color: rgb(0 0 0 / 80%);
  color: #fff;
  line-height: inherit;
  padding: .375em .75em;
  border-radius: 3em;
  text-decoration: none;
  font-size: var(--font-size-text);
}

.link-info {
  position: absolute;
  bottom: 20px;
  right: 20px;
  float: left;
  display: inline-block;
  background-color: rgb(0 0 0 / 50%);
  color: #fff;
  line-height: inherit;
  padding: .375em .75em;
  border-radius: 3em;
  left: inherit;
}

.youtube-link-btn, .youtube-link-close {
  display: none;
  width: max-content;
  display: inline-block;
}

.youtube-link-close {
  position: fixed;
  bottom: 30rem;
  right: 30px;
  float: left;
  background-image: var(--icon-close);
  background-size: contain;
  background-repeat: no-repeat;
  font-size: 0;
  height: 2rem;
  width: 2rem;
  z-index: 10;
  cursor: pointer;
}

.slider.layout-images .slider-item-wrapper.yt-overlay-open .youtube-element {
    background: var(--color-primary);
  }

@media (max-width: 1400px) {
  .slider-item-wrapper.yt-overlay-open .youtube-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
  }

  .slider-item-wrapper.yt-overlay-open .youtube-image img {
    height: 100%; 
    width: 100%; 
  }

  .slider-item-wrapper.yt-overlay-open .slider-content {
    display: none;
  }
}

@media (max-width: 991px) {
  .youtube-element.active {
    left: 0;
  }
  .slider.layout-images .youtube-element.active {
    height: 100%;
  }
  .slider.layout-images .youtube-image :before {
    background: radial-gradient(circle, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.3) 100%);
  }

 .slider.layout-images .slider-item-wrapper.yt-overlay-open .slider-content {
        padding: 0;
    }
}


.slider-item-wrapper.yt-overlay-open {
  position: absolute;
}

.slider-item-wrapper.yt-overlay-open .paragraph:not(.youtube_link, .paragraph--type--youtube-link-thumbnail) {
  display: none;
}

/*.youtube_link .youtube-element {
  position: unset !important;
}*/

.youtube-link-close.active {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  left: unset;
}

/*.youtube_link .container {
  container-type: inline-size;
}*/