/* Trustindex Google Reviews Widget - Modern Polished Styling */
.ti-widget {
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 16px 30px;
  font-family: inherit;
  box-sizing: border-box;
}

.ti-widget *,
.ti-widget *::before,
.ti-widget *::after {
  box-sizing: border-box;
}

.ti-widget-container {
  width: 100%;
  position: relative;
}

/* Rating Header / Aggregate Summary */
.ti-footer.ti-footer-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  text-align: center;
}

.ti-fade-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 18px;
  background: #f8fafc;
  padding: 12px 24px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ti-rating-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ti-rating.ti-rating-large {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ti-rating-text .nowrap {
  font-size: 0.925rem;
  color: #475569;
}

.ti-rating-text strong {
  color: #0f172a;
  font-weight: 700;
}

/* Stars */
.ti-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
}

.ti-stars img.ti-star {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  display: inline-block !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.ti-stars.star-lg img.ti-star {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
}

/* Google Logo */
.ti-large-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ti-large-logo img.ti-logo-fb {
  height: 22px !important;
  width: auto !important;
  max-height: 22px !important;
  object-fit: contain;
  display: block;
}

/* Reviews Container & Carousel */
.ti-reviews-container {
  position: relative;
  width: 100%;
  padding: 6px 0 16px;
}

.ti-reviews-container-wrapper {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 10px 4px 16px;
  scrollbar-width: none;
}

.ti-reviews-container-wrapper::-webkit-scrollbar {
  display: none;
}

/* Individual Review Card */
.ti-review-item {
  flex: 0 0 310px;
  min-width: 280px;
  max-width: 340px;
  scroll-snap-align: start;
  display: flex !important;
}

@media (min-width: 640px) {
  .ti-review-item {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
}

@media (min-width: 1024px) {
  .ti-review-item {
    flex: 0 0 calc(33.333% - 14px);
    max-width: calc(33.333% - 14px);
  }
}

@media (min-width: 1280px) {
  .ti-review-item {
    flex: 0 0 calc(25% - 15px);
    max-width: calc(25% - 15px);
  }
}

.ti-inner {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 22px 20px;
  width: 100%;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease;
}

.ti-inner:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

/* Review Card Header */
.ti-review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  position: relative;
}

/* Profile Avatar - Strictly Constrained */
.ti-profile-img {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  border-radius: 9999px !important;
  overflow: hidden !important;
  background: #e2e8f0;
  flex-shrink: 0 !important;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.ti-profile-img img {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  border-radius: 9999px !important;
  object-fit: cover !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Reviewer Info */
.ti-profile-details {
  flex: 1;
  min-width: 0;
}

.ti-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.ti-date {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* Google Platform Icon */
.ti-platform-icon {
  margin-left: auto;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ti-platform-icon img {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  border-radius: 0 !important;
  display: block !important;
}

/* Card Stars */
.ti-inner > .ti-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 12px;
  align-items: center;
}

.ti-verified-review {
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
}

/* Review Text */
.ti-review-text-container.ti-review-content {
  font-size: 0.875rem;
  color: #334155;
  line-height: 1.6;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  white-space: normal;
}

.ti-review-text-container.ti-review-content.expanded {
  display: block !important;
  -webkit-line-clamp: unset !important;
  max-height: none !important;
}

.ti-read-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0284c7;
  cursor: pointer;
  user-select: none;
}

.ti-read-more:hover {
  text-decoration: underline;
  color: #0369a1;
}

/* Carousel Controls (Prev / Next Buttons) */
.ti-controls {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 10;
}

.ti-prev,
.ti-next {
  pointer-events: auto;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: #334155;
  outline: none;
}

.ti-prev {
  left: -12px;
}

.ti-next {
  right: -12px;
}

.ti-prev:hover,
.ti-next:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
}

.ti-prev::before {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  border-left: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: 3px;
}

.ti-next::before {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  border-right: 2.5px solid currentColor;
  border-top: 2.5px solid currentColor;
  transform: rotate(45deg);
  margin-right: 3px;
}

/* Pagination Dots */
.ti-controls-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.ti-controls-line .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: all 0.25s ease;
  cursor: pointer;
}

.ti-controls-line .dot.active,
.ti-controls-line .dot:hover {
  background: #0284c7;
  width: 24px;
  border-radius: 9999px;
}

/* Hide unneeded markup */
.ti-hidden-markup,
.ti-tooltip,
.ti-verified-tooltip {
  display: none !important;
}
