/* ── Speaker Carousel block ──────────────────────────────────────────────── */

.speaker-carousel {
  overflow: hidden;
  width: 100%;
}

.speaker-carousel__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 2rem;
  width: max-content;
}

/* Scrolling state: added by JS when track overflows the container */
.speaker-carousel.is-scrolling {
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

.speaker-carousel.is-scrolling .speaker-carousel__track {
  animation: speaker-carousel-scroll linear infinite;
  /* animation-duration is set inline by JS based on content width */
}

.speaker-carousel.is-scrolling:hover .speaker-carousel__track {
  animation-play-state: paused;
}

@keyframes speaker-carousel-scroll {
  from {
    transform: translateX(0);
  }
  to {
    /* −50% because JS appends one clone set, making total width 2× original */
    transform: translateX(-50%);
  }
}

/* ── Individual speaker item ─────────────────────────────────────────────── */

.speaker-carousel__item {
  display: flex;
  flex-direction: column; 
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.speaker-carousel__image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid #18a854;
}

.speaker-carousel__text-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 165px;
}

.speaker-carousel__image-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #e5e5e5;
  flex-shrink: 0;
}

.speaker-carousel__name,
.speaker-carousel__job-title,
.speaker-carousel__sub-heading {
  letter-spacing: 0.04em;
}

.speaker-carousel__name,
.speaker-carousel__job-title {
  font-weight: 600;
}

.speaker-carousel__name {
  font-size: 0.85rem;
  color: #18a854;
}

.speaker-carousel__job-title,
.speaker-carousel__sub-heading {
  font-size: 0.75rem;
  color: #0a0a0a;
}

/* ── Editor-only styles ──────────────────────────────────────────────────── */

.speaker-carousel-empty {
  padding: 1rem;
  color: #999;
  font-style: italic;
}

.speaker-carousel-inspector-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.speaker-carousel-inspector-item:last-of-type {
  border-bottom: none;
}

.speaker-carousel-inspector-label {
  margin: 0 0 0.25rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #555;
}

.speaker-carousel-inspector-thumb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.speaker-carousel-image-btn {
  margin-bottom: 0.5rem !important;
}

.speaker-carousel-remove-btn {
  align-self: flex-start;
}

.speaker-carousel-add-btn {
  margin-top: 0.75rem !important;
  width: 100%;
  justify-content: center;
}
