.youtube-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.youtube-popup-content {
  position: relative;
  background: #000;
  padding: 20px;
  border-radius: 10px;
  max-width: 90%;
  max-height: 80%;
  z-index: 1010;
}

.youtube-iframe-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
  height: 100%;
  overflow: hidden;
  z-index: 1050;
}

.youtube-iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: none;
  z-index: 9999;
}

.close-popup {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #fff;
  padding: 3px;
  color: #000;
  border: none;
  font-size: 24px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  z-index: 10000;
}


.unmute-button {
  display: none;
  position: absolute;
  bottom: 50%;
  right: 20px;
  /* Đặt về bên phải */
  background: #fff;
  border: none;
  padding: 10px;
  border-radius: 50px;
  cursor: pointer;
  z-index: 10001;
  transition: opacity 0.3s ease;
}


.unmute-button:hover {
  opacity: 0.8;
}

.replay-button {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  padding: 10px 20px;
  font-size: 16px;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}

/* Container bao quanh để không ảnh hưởng các lớp khác */
/*.htz-youtube-container {
  position: relative;
  width: 100%;
  height: 100vh; 
  overflow: hidden;
  z-index: 1;
}*/

/* Lớp iframe nằm tuyệt đối, không chặn tương tác mặc định */
.htz-youtube-iframe-wrapper {
  position: absolute;
  top: 45%;
  left: 50%;
  width: 177.78vh;
  height: 100vh;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  pointer-events: none;
  /* để không cản các lớp phía trên */
  z-index: inherit;
  opacity: 0.2;
  /*transition: opacity 0.4s ease;*/
}

/* Khi bật video */
.htz-youtube-iframe-wrapper.is-visible {
  opacity: 1;
  pointer-events: auto;
  z-index: 9999;
}

/* Đảm bảo iframe hoặc div chiếm toàn bộ */
.htz-youtube-iframe-wrapper iframe,
#htzyoutubeIframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  margin-left: auto;
  margin-right: auto;
}