/* Testimonial horizontal slider — shared component (Phase 1: digital product page) */
.ts-section{
  width: 100%;
  box-sizing: border-box;
  padding: 0 1rem;
  margin: 0 0 10px;
}
/* Calls (scheduling) page renders the slider inside #box1 — keep a top gap there. */
#box1 .ts-section{ margin-top: 30px; }
.ts-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.ts-heading{
  font-family: semibold;
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0;
}
.ts-nav{ display: flex; gap: 6px; flex: none; }
.ts-slider{
  position: relative;
  display: flex;
  align-items: center;
}
.ts-track{
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 2px 12px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.ts-track::-webkit-scrollbar{ display: none; }

.ts-card{
  flex: 0 0 auto;
  width: 300px;
  max-width: 80vw;
  height: 240px;
  box-sizing: border-box;
  background-color: #fbfbfb;
  border: 2px solid #f1f1f1;
  border-radius: 15px;
  padding: 1rem;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}
.ts-quote{ color: #d8d8d8; height: 30px; width: 30px; flex: none; }
.ts-msg{
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
  margin: 6px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.ts-bottom{ margin-top: auto; padding-top: 10px; }
.ts-stars{
  color: #f5a623;
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.ts-stars svg{ width: 1em; height: 1em; vertical-align: -2px; margin-right: 2px; }
.ts-foot{ display: flex; align-items: baseline; flex-wrap: wrap; }
.ts-name{
  font-family: semibold;
  font-weight: 600;
  font-size: 1.05rem;
  color: #222;
}
.ts-product{
  font-size: 0.9rem;
  color: #999797;
  margin-left: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.ts-arrow{
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #333;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  border: 1px solid lightgray;
  justify-content: center;
}
.ts-arrow:hover{ background: #f1f1f1; }
.ts-arrow[disabled]{ opacity: 0.3; cursor: default; }

@media (max-width: 600px){
  .ts-card{ width: 84%; max-width: 300px; }
}

.ts-card{ cursor: pointer; }

/* Full testimonial list modal */
.ts-modal{
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.ts-modal.active{ display: flex; }
.ts-modal-box{
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: min(620px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ts-modal-close{
    position: absolute;
    top: 12px;
    right: 16px;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    color: #999;
    z-index: 2;
    width: 30px;
    /* background-color: lightgray; */
    text-align: center;
    border-radius: 8px;
    border: 1px solid lightgray;
}
.ts-modal-close:hover{ color: #222; }
.ts-modal-profile{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 20px 16px;
}
.ts-modal-avatar{
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.ts-modal-avatar-fb{
  display: flex;
  align-items: center;
  justify-content: center;
  background: #534AB7;
  color: #fff;
  font-weight: 600;
  font-size: 22px;
}
.ts-modal-pinfo{ min-width: 0; flex: 1; }
.ts-modal-name{ font-family: semibold; font-weight: 600; font-size: 1.1rem; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;    width: calc(100% - 20px); }
.ts-modal-rating{ font-size: 1rem; color: #333; margin-top: 4px; }
.ts-modal-star{ color: #111; }
.ts-modal-star svg{ vertical-align: -2px; }
.ts-modal-service{
  font-size: 0.95rem;
  color: #777;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.ts-modal-divider{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px 14px;
  color: #333;
}
.ts-modal-divider::before,
.ts-modal-divider::after{
  content: "";
  flex: 1;
  height: 1px;
  background: #ececec;
}
.ts-modal-divider span{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 500;
  white-space: nowrap;
}
.ts-modal-list{
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ts-modal-card{
  background: #fbfbfb;
  border: 2px solid #f1f1f1;
  border-radius: 15px;
  padding: 1rem;
}
.ts-modal-msg{
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
  margin: 6px 0 12px;
  word-break: break-word;
  white-space: pre-wrap;
}

/* Loading spinner shown while testimonials fetch */
.ts-loader{ display: flex; align-items: center; justify-content: center; width: 100%; padding: 30px 0; }
.ts-spinner{
  width: 28px;
  height: 28px;
  border: 3px solid #eee;
  border-top-color: #534AB7;
  border-radius: 50%;
  animation: ts-spin 0.8s linear infinite;
}
@keyframes ts-spin{ to { transform: rotate(360deg); } }
