/**
 * AO Customer Stories — widget.css
 * Responsive across all breakpoints.
 * Card height is driven by JS (measures content) not hardcoded.
 */

.ao-customer-stories {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --ao-cs-glow: #F05A28;
  width: 100%;
}

/* ── Deck: height set by JS via --ao-cs-deck-h custom property ── */
.ao-customer-stories .ao-cs__deck {
  position: relative;
  height: var(--ao-cs-deck-h, 220px);
  min-height: 180px;
}

/* ── Card ── */
.ao-customer-stories .ao-cs__card {
  position: absolute;
  top: 0; left: 0; right: 0;
  border-radius: 16px;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  overflow: hidden;
  border: 0.5px solid rgba(0,0,0,0.06);
  box-sizing: border-box;
  touch-action: pan-y;
  /* Height also driven by JS */
  height: var(--ao-cs-card-h, 206px);
}
.ao-customer-stories .ao-cs__card:active { cursor: grabbing; }

/* ── Author zone ── */
.ao-customer-stories .ao-cs__author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 0.5px solid rgba(0,0,0,0.07);
  flex-shrink: 0;
}

/* ── Avatar wrap ── */
.ao-customer-stories .ao-cs__avatar-wrap {
  position: relative;
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  overflow: visible;
}

/* ── Avatar initials ── */
.ao-customer-stories .ao-cs__avatar {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  transform: rotate(-10deg);
  transform-origin: center center;
  position: absolute;
  top: 7px;
  left: 7px;
  box-sizing: border-box;
}

/* ── Avatar image ── */
.ao-customer-stories .ao-cs__avatar-img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  transform: rotate(-10deg);
  transform-origin: center center;
  position: absolute;
  top: 7px;
  left: 7px;
  display: block;
  box-sizing: border-box;
}

/* ── Author text ── */
.ao-customer-stories .ao-cs__name {
  font-size: 13px;
  font-weight: 500;
  color: #0D0D0D;
  margin: 0 0 2px;
  line-height: 1.4;
}
.ao-customer-stories .ao-cs__role {
  font-size: 10px;
  color: #6B6B6B;
  line-height: 1.4;
  margin: 0;
}

/* ── Body — two-col desktop, single-col mobile ── */
.ao-customer-stories .ao-cs__body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 16px;
  flex: 1;
  align-items: start;
  min-height: 0;
}

/* Horizontal body: quote stacks above stat col (single column) */
.ao-customer-stories .ao-cs__body--row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ao-customer-stories .ao-cs__body--row .ao-cs__stat-col {
  flex-direction: row;
  align-items: center;
  height: auto;
  gap: 12px;
}
.ao-customer-stories .ao-cs__body--row .ao-cs__stat-text {
  flex: 1;
  min-width: 0;
}
.ao-customer-stories .ao-cs__body--row .ao-cs__cta {
  margin-top: 0;
  flex-shrink: 0;
}

/* ── Quote ── */
.ao-customer-stories .ao-cs__quote {
  font-size: 11.5px;
  line-height: 1.75;
  color: #0D0D0D;
  margin: 0;
  font-weight: 400;
  font-style: normal;
}

/* ── Stat column ── */
.ao-customer-stories .ao-cs__stat-col {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ao-customer-stories .ao-cs__stat-text {
  display: flex;
  flex-direction: column;
}
.ao-customer-stories .ao-cs__stat-num {
  font-size: 28px;
  font-weight: 500;
  color: #0D0D0D;
  line-height: 1;
  margin: 0 0 3px;
  white-space: nowrap;
}
.ao-customer-stories .ao-cs__stat-label {
  font-size: 10px;
  color: #6B6B6B;
  line-height: 1.5;
  margin: 0 0 10px;
}

/* ── CTA button ── */
.ao-customer-stories .ao-cs__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.75);
  border: 0.5px solid rgba(0,0,0,0.1);
  border-radius: 7px;
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 500;
  color: #0D0D0D;
  text-decoration: none;
  cursor: pointer;
  margin-top: auto;
  transition: box-shadow 0.25s, border-color 0.25s;
  position: relative;
  z-index: 3;
  box-sizing: border-box;
  flex-shrink: 0;
}
.ao-customer-stories .ao-cs__cta:hover,
.ao-customer-stories .ao-cs__cta:focus-visible {
  border-color: rgba(240,90,40,0.5);
  box-shadow: 0 0 0 2px rgba(240,90,40,0.10), 0 0 10px rgba(240,90,40,0.22);
  outline: none;
  color: #0D0D0D;
  text-decoration: none;
}
.ao-customer-stories .ao-cs__cta:active { transform: translateY(1px); }

/* ── Below deck ── */
.ao-customer-stories .ao-cs__below {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Swipe hint ── */
.ao-customer-stories .ao-cs__hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #B4B2A9;
  margin: 0;
}
.ao-customer-stories .ao-cs__hint-arrow {
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 5px solid #D0CFC9;
  flex-shrink: 0;
}

/* ── Dots ── */
.ao-customer-stories .ao-cs__dots {
  display: flex;
  gap: 5px;
  align-items: center;
  margin-left: auto;
}
.ao-customer-stories .ao-cs__dot {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  padding: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #D0CFC9;
  cursor: pointer;
  transition: background 0.2s, width 0.2s, border-radius 0.2s;
  flex-shrink: 0;
}
.ao-customer-stories .ao-cs__dot.is-active {
  background: #F05A28;
  width: 14px;
  border-radius: 3px;
}

/* ── Mobile: stack body, auto card height ── */
@media (max-width: 600px) {
  .ao-customer-stories .ao-cs__body {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ao-customer-stories .ao-cs__stat-col {
    height: auto;
  }
  .ao-customer-stories .ao-cs__stat-num { font-size: 24px; }
  .ao-customer-stories .ao-cs__stat-label { margin-bottom: 0; }
  .ao-customer-stories .ao-cs__cta { margin-top: 12px; }
  .ao-customer-stories .ao-cs__body--row .ao-cs__cta { margin-top: 0; }
  .ao-customer-stories .ao-cs__avatar-wrap { width: 62px; height: 62px; }
  .ao-customer-stories .ao-cs__avatar,
  .ao-customer-stories .ao-cs__avatar-img { width: 48px; height: 48px; }
}

/* ── Tablet ── */
@media (min-width: 601px) and (max-width: 900px) {
  .ao-customer-stories .ao-cs__quote { font-size: 11px; }
  .ao-customer-stories .ao-cs__stat-num { font-size: 24px; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .ao-customer-stories .ao-cs__card,
  .ao-customer-stories .ao-cs__cta,
  .ao-customer-stories .ao-cs__dot { transition: none !important; }
}