.yt-lazy {
  position: relative;
  inline-size: min(100%, var(--yt-max, 100%));
  max-inline-size: var(--yt-max, none);
  margin-inline: auto;
  justify-self: center;
  background: #000;
  overflow: hidden;
  --yt-ratio: 56.25%;
  border: solid 1px;
  border-color: #000;
  margin-bottom: 1rem;
}

.yt-lazy::before {
  content: "";
  display: block;
  padding-top: var(--yt-ratio);
}

.yt-thumb {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: filter .2s ease;
}

.yt-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.85);
  font-family: var(--text-sans);
  font-size: 0.9rem;
}

.yt-text-container {
  color: #000;
  overflow-y: auto;
  padding: 1rem;
  flex-grow: 1;
  margin-bottom: 4rem;
}

.yt-overlay h4 {
  color: #000;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  margin-top: 0.75rem;
}

.yt-text {
  color: #000;
  font-family: var(--font-sans);
  margin-bottom: 1rem;
}

.yt-btn-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  padding: 1rem 0;
  text-align: center;
  z-index: 2;
}

.yt-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 0;
  border-radius: .5rem;
  padding: .65rem 1rem;
  background: var(--accent-color);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  transition: transform .05s ease, filter .15s ease;
}

.yt-btn:hover {
  filter: brightness(1.0);
}

.yt-btn:active {
  transform: translateY(1px);
}

.yt-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.yt-loaded .yt-overlay,
.yt-loaded .yt-thumb {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .yt-thumb,
  .yt-btn {
    transition: none !important;
  }
}

@media screen and (max-width: 736px) {

  .yt-overlay h4 {    
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    margin-top: 0.15rem;
  }

  .yt-overlay {
    font-size: 0.9rem;
    line-height: 1.3rem;
  }

  .yt-btn-wrapper { 
    padding: 0.7rem 0; 
  }
}

@media screen and (max-width: 480px) {

  .yt-overlay h4 {    
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 0.3rem;
    margin-top: 0.15rem;
  }

  .yt-overlay {
    font-size: 0.8rem;
    line-height: 1.1rem;
  }

  .yt-btn-wrapper { 
    padding: 0.5rem 0; 
  }

  .yt-btn { 
    gap: 0.4rem;
    font-size: 0.7rem;
    padding: 0.45rem;
    border-radius: 0.2rem;
  }
}
