/* GIF badge — markazda aylanada */
.carousel-slide-wrap {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}
.carousel-slide-wrap .carousel-slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gif-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  backdrop-filter: blur(4px);
}

/* Lightbox loading for GIF */
.lb-gif-load {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  z-index: 5;
  width: 44px; height: 44px;
  border: 3px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lbSpin .7s linear infinite;
  display: none;
}
.lb-gif-load.show { display: block; }
@keyframes lbSpin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* YouTube in post */
.post-youtube {
  margin: 8px 0 8px;
}
.yt-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}
.yt-thumb {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.yt-play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: 64px; height: 64px;
  border: none; border-radius: 50%;
  background: rgba(255,0,0,.9);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.yt-play:active { transform: translate(-50%,-50%) scale(.96); }
.yt-wrap iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* Compose YouTube UI */
.pm-yt-box {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border, #e5e9ef);
  border-radius: 12px;
  display: none;
}
.pm-yt-box.show { display: block; }
.pm-yt-box input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border, #e5e9ef);
  font: inherit;
  box-sizing: border-box;
}
.pm-yt-preview {
  margin-top: 10px;
  display: none;
}
.pm-yt-preview.show { display: block; }
.pm-yt-preview img {
  width: 100%;
  border-radius: 10px;
  max-height: 160px;
  object-fit: cover;
}
.pm-yt-clear {
  margin-top: 6px;
  border: none;
  background: transparent;
  color: #e11d48;
  font-size: 13px;
  cursor: pointer;
}
.pm-yt-results {
  max-height: 200px;
  overflow-y: auto;
  margin: 8px 0;
}
.pm-yt-item {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px;
  border-radius: 10px;
  cursor: pointer;
}
.pm-yt-item:hover, .pm-yt-item:active { background: var(--bg, #f3f4f6); }
.pm-yt-item img {
  width: 64px; height: 40px; object-fit: cover; border-radius: 6px;
}
.pm-yt-item div { font-size: 12px; line-height: 1.3; }
.pm-yt-item small { color: var(--text-muted); }

/* modal ichida YouTube box aniq ochilsin */
.post-modal .pm-yt-box {
  margin: 8px 18px 12px !important;
  padding: 12px !important;
  display: none;
}
.post-modal .pm-yt-box.show {
  display: block !important;
}
.post-modal .pm-yt-box input {
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 0 8px !important;
}

.post-modal .pm-yt-box.show,
.pm-yt-box.show {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
