/* carousel.css */

/* ai edit [2026-11-18] P1-03 A1-4：占位行在 JS 初始化前即具备与 $.fn.carousel 写入的内联样式完全一致的高度
   （height:0 + padding-top:11.58%），占位阶段与初始化后高度不变 → 0 位移。
   百分比按容器宽度自适应，不写死任何 px 常量。 */
.carouselBox {
  overflow: hidden;
  position: relative;
  margin-bottom: .5rem;
  border-radius: 0.22rem;
  width: 100%;
  height: 0;
  padding-top: 11.58%;
}

.carousel-wrapper {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}

.carousel-item {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  object-fit:cover;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.carousel-btn svg {
  width: 11.6px;
  height: 10.7px;
  fill: #fff;
  flex-shrink: 0;
}

.prev-btn { left: 0.56rem; }
.next-btn { right: 0.56rem; }

.carousel.single .carousel-btn {
  display: none !important;
}
/* ai edit [2026-11-18] P1-03 A3：DPlayer 外框未带内联 aspect-ratio 时的兜底（默认 16:9），
   与插件输出保持一致，保证初始化前后外框高度不变。 */
.post-content .dplayer {
  aspect-ratio: 16 / 9;
  background: #000;
}
