.ytg-wrap {
  position: relative;
  background-color: white;
  transition: opacity 0.2s ease;
  font-family: "Poppins", sans-serif;
}
.ytg-wrap.ytg-loading {
  opacity: 0.35;
  pointer-events: none;
}

/* Swiper base */
.ytg-swiper {
  position: relative;
}

/* Arrows */
.ytg-nav {
  position: absolute;
  top: 41.5%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  padding: 0 !important;
  border-radius: 4px !important;
  background: white !important;
  color: black !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 2;
}
button.ytg-nav:hover {
  background-color: white !important;
}
.ytg-nav i {
  font-size: 22px;
}
.ytg-nav-prev {
  left: -8px;
}
.ytg-nav-next {
  right: -8px;
}
.hide-btn {
  display: none;
}

/* Card */
.ytg-card {
  position: relative;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  background-color: white;
}
.ytg-thumb {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.ytg-play {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 33%;
  left: 40.5%;
}
.ytg-play img {
  width: 64px;
}
.ytg-title {
  font-size: 1rem;
  font-weight: 500;
  color: #342f2f;
}
.ytg-duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  padding: 3px 6px;
  border-radius: 6px;
}

/* Modal */
.ytg-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ytg-modal.open {
  display: flex;
}

.ytg-modal-box {
  position: relative;
  width: min(100%, 1080px);
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}
.ytg-modal iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.ytg-close,
.ytg-prev,
.ytg-next {
  position: absolute;
  top: 12px;
  width: 40px;
  height: 40px;
  font-size: 22px !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: #111 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.ytg-close:hover,
.ytg-prev:hover,
.ytg-next:hover {
  background-color: white !important;
}
.ytg-close {
  right: 95px;
}
.ytg-prev {
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}
.ytg-next {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

/* Filters */
.ytg-filters {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ytg-filters h1 {
  color: #191c1f !important;
  font-size: 1rem !important;
  font-family: "Poppins", sans-serif !important;
  font-weight: 500 !important;
  margin-bottom: 0 !important;
}
.ytg-filters .filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
button.ytg-filter {
  all: unset !important;
  position: relative !important;
  padding-left: 28px !important;
  background: none !important;
  border: 0 !important;
  color: #222 !important;
  cursor: pointer !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: #475156 !important;
  display: flex !important;
  width: fit-content !important;
  font-family: "Poppins", sans-serif !important;
}
button.ytg-filter:hover {
  background: none !important;
}
.ytg-filter::before {
  content: "";
  position: absolute;
  left: 0;
  top: 43%;
  transform: translateY(-45%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #c9cfd2;
  background: #fff;
}
.ytg-filter.is-active::before {
  border: none;
  background-color: #6bc04b;
}
.ytg-filter.is-active::after {
  content: "";
  position: absolute;
  left: 5.5px;
  top: 47%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}
.ytg-static .swiper-slide {
  width: auto !important;
  margin: 0 !important;
}

/* Static layout if items <= slidesPerView */
.ytg-static .ytg-nav {
  display: none;
}
.ytg-static .swiper {
  overflow: visible;
}
.ytg-static .swiper-wrapper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ytg-space, 16px);
}
.swiper-slide.ytg-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Utility */
.custom-mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Responsive */

@media (max-width: 1024px) {
  .ytg-play img {
    width: 40px;
  }
  .ytg-play {
    top: 26%;
  }
}
@media (max-width: 650px) {
  .ytg-nav {
    width: 30px;
    height: 30px;
    top: 32.5%;
  }
  .ytg-play img {
    width: 40px;
  }
  .ytg-play {
    top: 27%;
  }
  .ytg-nav i {
    font-size: 1rem;
  }
}
@media (max-width: 500px) {
  .ytg-nav {
    top: 41.5%;
    width: 40px;
    height: 40px;
  }

  .ytg-play {
    top: 33%;
  }
  .ytg-nav i {
    font-size: 22px;
  }
  .ytg-nav {
    display: none;
  }
  .ytg-title {
    font-size: 0.875rem;
  }
  .ytg-close,
  .ytg-prev,
  .ytg-next {
    width: 20px;
    height: 20px;
    font-size: 1rem;
  }
  .ytp-large-play-button {
    width: 50px;
    height: 50px;
    margin-left: -24px;
  }
}
@media (max-width: 400px) {
  .ytg-play img {
    width: 64px;
  }
  .ytg-close,
  .ytg-prev,
  .ytg-next {
    width: 20px;
    height: 20px;
  }
  .ytg-modal-box button i {
    font-size: 12px;
  }

  .ytmCuedOverlayPlayButton {
    margin-left: -26px !important;
    margin-top: -26px !important;
    width: 50px !important;
    height: 50px !important;
  }
}
