/*
 * DS Custom Coaches — coach-widget.css
 * Design tokens from AVGS Experten (selbststaendigkeit.de)
 */

:root {
  --dsc-primary:        #005a8b;
  --dsc-primary-light:  #008ac4;
  --dsc-blue:           #47a1e1;
  --dsc-blue-light:     #e6f3fb;
  --dsc-dark:           #233345;
  --dsc-text:           rgba(35, 51, 69, 0.85);
  --dsc-white:          #ffffff;
  --dsc-green:          #4ab25d;
  --dsc-green-bg:       rgba(74, 178, 93, 0.12);
  --dsc-blue-badge-bg:  rgba(71, 161, 225, 0.12);
  --dsc-shadow:         rgba(0, 0, 0, 0.06) 0px 3px 18px -2px;
  --dsc-shadow-hover:   rgba(0, 0, 0, 0.13) 0px 8px 24px -4px;
  --dsc-radius-card:    10px;
  --dsc-radius-pill:    9999px;
  --dsc-gap:            12px;
  --dsc-font:           'Mulish', sans-serif;
}

/* ── Widget wrapper ────────────────────────────────────────────────────── */

.ds-coach-widget {
  width: 100%;
  font-family: var(--dsc-font);
}

.ds-coach-widget__empty {
  color: var(--dsc-text);
  padding: 1.5rem 0;
  margin: 0;
  font-size: 1rem;
}

/* ── Slider shell ──────────────────────────────────────────────────────── */

.ds-coach-slider {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ds-coach-slider__viewport {
  flex: 1 1 0%;
  overflow: hidden;
  min-width: 0;
}

.ds-coach-slider__track {
  display: flex;
  gap: var(--dsc-gap);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* Item width is set by JS; this is just a safe default */
.ds-coach-slider__item {
  flex: 0 0 auto;
  min-width: 0;
}

/* ── Coach card ────────────────────────────────────────────────────────── */

.ds-coach-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: var(--dsc-radius-card);
  overflow: hidden;
  background: var(--dsc-white);
  box-shadow: var(--dsc-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ds-coach-card:hover,
.ds-coach-card:focus-visible {
  transform: scale(1.025);
  box-shadow: var(--dsc-shadow-hover);
  text-decoration: none;
  color: inherit;
  outline: none;
}

/* Photo */
.ds-coach-card__photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--dsc-blue-light);
  overflow: hidden;
  flex-shrink: 0;
}

/* aspect-ratio fallback for older browsers */
@supports not (aspect-ratio: 4 / 5) {
  .ds-coach-card__photo-wrap {
    padding-top: 125%;
    height: 0;
  }
  .ds-coach-card__photo,
  .ds-coach-card__photo--placeholder {
    position: absolute;
    inset: 0;
  }
}

.ds-coach-card__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.ds-coach-card__photo--placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    150deg,
    var(--dsc-blue-light) 0%,
    rgba(0, 90, 139, 0.08) 100%
  );
}

/* Badge */
.ds-coach-card__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--dsc-font);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  padding: 3px 9px;
  border-radius: var(--dsc-radius-pill);
  white-space: nowrap;
  pointer-events: none;
}

.ds-coach-card__badge--local {
  background: #e5af43;
  color: #ffffff;
  border: none;
}

.ds-coach-card__badge--online {
  background: #47a1e1;
  color: #ffffff;
  border: none;
}

/* Name pill */
.ds-coach-card__name-pill {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dsc-primary);
  color: var(--dsc-white);
  font-family: var(--dsc-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  padding: 8px 14px;
  min-height: 36px;
  /* No border-radius here; it inherits from the card's overflow:hidden */
}

.ds-coach-card__name-pill span {
  display: block;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
}

/* ── Arrow buttons ─────────────────────────────────────────────────────── */

.ds-coach-slider__arrow {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--dsc-blue-light);
  background: var(--dsc-white);
  color: var(--dsc-primary);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  box-shadow: var(--dsc-shadow);
  line-height: 0;
}

.ds-coach-slider__arrow:hover {
  background: var(--dsc-blue);
  border-color: var(--dsc-blue);
  color: var(--dsc-white);
}

.ds-coach-slider__arrow:focus-visible {
  outline: 2px solid var(--dsc-blue);
  outline-offset: 2px;
}

/* ── Footer button ─────────────────────────────────────────────────────── */

.ds-coach-widget__footer {
  margin-top: 24px;
  text-align: center;
}

.ds-coach-widget__all-btn {
  display: inline-block;
  font-family: var(--dsc-font);
  font-size: 15px;
  font-weight: 700 !important;
  color: #ffffff !important;
  background: #47a1e1;
  border: none;
  border-radius: var(--dsc-radius-pill);
  padding: 11px 28px;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.ds-coach-widget__all-btn:hover,
.ds-coach-widget__all-btn:focus-visible {
  text-decoration: none;
  color: #ffffff;
  outline: none;
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
  .ds-coach-slider__arrow {
    width: 32px;
    height: 32px;
  }

  .ds-coach-card__name-pill {
    font-size: 13px;
    padding: 6px 10px;
  }

  .ds-coach-widget__all-btn {
    font-size: 14px;
    padding: 10px 22px;
  }
}
