:host {
  display: block;
}

.hb-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--hb-border-radius-base, 4px);
  background-color: var(--hb-color-fill-tertiary, #fafafa);
}

.hb-carousel__container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hb-carousel__track {
  display: flex;
  width: 100%;
  transition: transform var(--hb-transition-duration, 0.3s) var(--hb-transition-function, ease);
  will-change: transform;
}

/* slot 投影进来的每一张幻灯片占满一屏 */
::slotted(*) {
  flex: 0 0 100%;
  min-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.hb-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background-color: rgba(31, 45, 61, 0.5);
  color: var(--hb-color-text-inverse, #ffffff);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background-color var(--hb-transition-duration, 0.2s) ease;
}

.hb-carousel__arrow:hover {
  background-color: rgba(31, 45, 61, 0.7);
}

.hb-carousel__arrow--prev {
  left: 16px;
}

.hb-carousel__arrow--next {
  right: 16px;
}

.hb-carousel__indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.hb-carousel__indicator {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all var(--hb-transition-duration, 0.2s) ease;
}

.hb-carousel__indicator:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.hb-carousel__indicator--active {
  width: 24px;
  border-radius: 5px;
  background-color: var(--hb-color-primary, #1677ff);
}
