/* Base wrapper */
.dm-tc-wrapper{
  position:relative;
}

/* Gradient side fades */
.dm-tc-fade{
  position:absolute;
  top:0;
  bottom:0;
  z-index:2;
  pointer-events:none;
}
.dm-tc-fade--left{ left:0; }
.dm-tc-fade--right{ right:0; }

/* Swiper sizing */
.dm-tc-wrapper .swiper{
  overflow:visible; /* so fades/arrows can be seen */
}

/* Arrows style (simple, inherit theme) */
.dm-tc-button-prev, .dm-tc-button-next{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:36px; height:36px;
  border-radius:999px;
  background:rgba(0,0,0,.05);
  backdrop-filter:saturate(120%) blur(2px);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  z-index:3;
  cursor:pointer;
}
.dm-tc-button-prev{ left:8px; }
.dm-tc-button-next{ right:8px; }

.dm-tc-button-prev::before, .dm-tc-button-next::before{
  content:'';
  position:absolute;
  inset:0;
  margin:auto;
  width:0; height:0;
  border-style:solid;
}
.dm-tc-button-prev::before{
  border-width:6px 8px 6px 0;
  border-color:transparent rgba(0,0,0,.6) transparent transparent;
}
.dm-tc-button-next::before{
  border-width:6px 0 6px 8px;
  border-color:transparent transparent transparent rgba(0,0,0,.6);
}

/* Pagination dots wrapper if enabled */
.dm-tc-pagination{
  position:relative;
  margin-top:12px;
}

/* Card */
.dm-tc-card{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:16px;
  background:#fff;
  border:1px solid rgba(0,0,0,.06);
  border-radius:16px;
  padding:24px;
  height:100%; /* allow equalize to set same height */
  box-sizing:border-box;
}

/* Comment text area */
.dm-tc-comment{
  line-height:1.6;
  max-height:var(--dm-comment-max, 120px);
  overflow:hidden;
  scrollbar-gutter: stable both-edges;  /* reserve space to avoid layout shift when scrollbar appears */
}
.dm-tc-card:hover .dm-tc-comment{
  overflow:auto; /* show scroll on hover only */
}

/* Custom scrollbar */
.dm-tc-comment::-webkit-scrollbar{
  width:var(--dm-scrollbar-width, 6px);
}
.dm-tc-comment::-webkit-scrollbar-thumb{
  background:var(--dm-scrollbar-thumb, #c5d3e5);
  border-radius:999px;
}
.dm-tc-comment::-webkit-scrollbar-track{
  background:var(--dm-scrollbar-track, rgba(0,0,0,.08));
}
/* Firefox */
.dm-tc-comment{
  scrollbar-width:thin;
  scrollbar-color: var(--dm-scrollbar-thumb, #c5d3e5) var(--dm-scrollbar-track, rgba(0,0,0,.08));
}

/* Author section */
.dm-tc-author{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px;
  border-radius:12px;
  background:#f8fafc; /* can be overridden in Style tab */
}
.dm-tc-avatar{
  width:48px; height:48px;
  border-radius:999px;
  object-fit:cover;
  flex-shrink:0;
}
.dm-tc-name{
  font-weight:600;
}
.dm-tc-role{
  opacity:.8;
  font-size:.9em;
}

/* Make slides stretch to equal height when set */
.dm-tc-wrapper .swiper-slide{
  height:auto;
  display:flex;
}
.dm-tc-wrapper .swiper-slide > *{
  flex:1 1 auto;
}

/* Ensure inner content doesn’t jump when scrollbar shows */
.dm-tc-comment{
  padding-right: max(8px, var(--dm-scrollbar-width, 6px));
  box-sizing:border-box;
}


/* Boxed vs Full */
.dm-tc-wrapper.dm-tc--boxed{
  max-width: var(--dm-boxed, 1140px);
  margin-left:auto;
  margin-right:auto;
}
.dm-tc-wrapper.dm-tc--full{
  width:100%;
}

/* If custom icons provided, center them */
.dm-tc-button-prev svg, .dm-tc-button-next svg{
  width:18px; height:18px;
  display:block;
  margin:auto;
  position:relative;
  top:50%; transform:translateY(-50%);
}
/* Hide triangle pseudo-elements when SVG icons exist */
.dm-tc-button-prev:has(svg)::before, .dm-tc-button-next:has(svg)::before{
  content:none;
}


/* Hide overflow outside boxed container */
.dm-tc-wrapper.dm-tc--boxed{
  overflow:hidden;
  position:relative;
}
.dm-tc-wrapper.dm-tc--boxed .swiper{
  overflow:hidden; /* ensure extra slides clipped */
}

/* Boxed mode should clip slides exactly to container width */
.dm-tc-wrapper.dm-tc--boxed{
  overflow:hidden;
}
.dm-tc-wrapper.dm-tc--boxed .swiper{
  overflow:hidden; /* no peeking outside container */
}

/* Full width keeps previous behavior (can peek/gradient) */
.dm-tc-wrapper.dm-tc--full .swiper{
  overflow:visible;
}

/* Arrow styling improvements */
.dm-tc-button-prev, .dm-tc-button-next{
  z-index:9; /* ensure above gradient/shadow */
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  background:rgba(0,0,0,0.05);
}
.dm-tc-button-prev svg, .dm-tc-button-next svg{
  fill:currentColor;
  stroke:currentColor;
}

/* Ensure arrow SVG uses currentColor */
.dm-tc-button-prev, .dm-tc-button-next{ color: rgba(0,0,0,.7); }
.dm-tc-button-prev svg, .dm-tc-button-next svg{ fill: currentColor; }
