/* The Google reviews carousel.

   It replaces a Trustindex embed whose loader fetched but never rendered,
   leaving an empty block the width of its column. Everything here is contained:
   the carousel never grows past whatever box it is placed in. */

.bam-reviews {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #e6e4ee;
  border-radius: 12px;
  padding: 18px;
  font-family: inherit;
  color: #2f2a5a;
  overflow: hidden;
}

.bam-reviews__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0eef7;
}
.bam-reviews__head strong { display: block; font-size: 15px; line-height: 1.3; }
.bam-reviews__g { width: 26px; height: 26px; flex: 0 0 26px; }

.bam-reviews__write {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 13px;
  color: #2f2a5a;
  text-decoration: none;
  border: 1px solid #d9d5e8;
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
}
.bam-reviews__write:hover { background: #f6f4fd; }

.bam-reviews__stars { display: inline-flex; gap: 2px; }
.bam-reviews__stars svg { width: 15px; height: 15px; fill: #dcdce4; }
.bam-reviews__stars svg.is-on { fill: #fbbc05; }

.bam-reviews__stage { display: flex; align-items: center; gap: 6px; padding-top: 14px; }

/* A set of reviews side by side. The column count is set inline from the
   measured width, so this only needs to lay them out and keep them equal. */
.bam-reviews__track {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 14px;
  align-items: stretch;
}

/* The key on each card makes React remount it, so the fade runs on every change. */
.bam-reviews__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px;
  border: 1px solid #efedf6;
  border-radius: 10px;
  background: #fcfbff;
  animation: bam-review-in 0.4s ease both;
}
.bam-reviews__card header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }

.bam-reviews__avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: #2f2a5a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bam-reviews__name { font-weight: 600; font-size: 15px; }

.bam-reviews__text {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: #4a4a63;
  /* Reviews run from one line to a paragraph. The clamp stops a long one
     dominating, and the floor keeps the three cards level so the row does not
     jump as it advances. */
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 7.4em;
}

/* The theme styles bare `button` elements, and those rules would otherwise win
   over a single class. Scoping to the carousel raises specificity enough to
   take the arrows and dots back without resorting to !important. */
.bam-reviews .bam-reviews__arrow {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #d9d5e8;
  border-radius: 50%;
  background: #fff;
  background-image: none;
  color: #2f2a5a;
  font-size: 19px;
  font-family: inherit;
  line-height: 1;
  box-shadow: none;
  text-shadow: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bam-reviews .bam-reviews__arrow:hover,
.bam-reviews .bam-reviews__arrow:focus {
  background: #f6f4fd;
  color: #2f2a5a;
}

.bam-reviews__dots { display: flex; justify-content: center; gap: 6px; padding-top: 12px; }
.bam-reviews .bam-reviews__dots button {
  width: 7px;
  height: 7px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d9d5e8;
  background-image: none;
  box-shadow: none;
  cursor: pointer;
}
.bam-reviews .bam-reviews__dots button.is-on {
  background: #2f2a5a;
  width: 18px;
  border-radius: 4px;
}

@keyframes bam-review-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bam-reviews__card { animation: none; }
}

@media (max-width: 767px) {
  .bam-reviews { padding: 14px; }
  .bam-reviews__write { display: none; }
  /* One card on a phone, so there is nothing to keep level. */
  .bam-reviews__text { -webkit-line-clamp: 9; min-height: 0; }
  .bam-reviews__card { padding: 12px; }
}
