/* Before/after comparison sliders used in the "Transforming Smiles" section.
   Namespaced as "ts-*" (Transforming Smiles) — the homepage already has an
   unrelated single before/after slider elsewhere using the "ba-*" class names. */
.ts-slider {
  position: relative;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}

.ts-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.ts-slider .ts-after {
  z-index: 1;
}

.ts-slider .ts-before {
  z-index: 2;
  clip-path: inset(0 50% 0 0);
}

.ts-slider .ts-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #ffffff;
  z-index: 3;
  pointer-events: none;
  transform: translateX(-50%);
}

.ts-slider .ts-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(120, 113, 108, 0.55);
  backdrop-filter: blur(4px);
  border: 2px solid rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 16px;
  transform: translate(-50%, -50%);
  z-index: 4;
  pointer-events: none;
}

.ts-slider input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: ew-resize;
  opacity: 0;
  z-index: 5;
  -webkit-appearance: none;
  appearance: none;
}

.ts-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 44px;
  height: 100%;
}

.ts-slider input[type="range"]::-moz-range-thumb {
  width: 44px;
  height: 100%;
  border: none;
  background: transparent;
}

/* Clamp every card description to the same number of lines so cards align
   evenly regardless of how long each treatment's description text is. */
.ts-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.5em * 3);
}

.transformSwiper {
  padding-bottom: 40px;
}

.transformSwiper .swiper-pagination-bullet-active {
  background: #0d9d8a;
}

/* Dark mode: the section has a hardcoded light bg-[#f8faf8] (doesn't adapt),
   and each card uses bg-white which the site's global .dark override turns
   into a solid dark navy rather than the glass look used elsewhere. */
html.dark #transforming-smiles {
  background: #0d0d0d !important;
}

html.dark #transforming-smiles .bg-white {
  background: rgba(255, 255, 255, 0.07) !important;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
