/* reviews-api.css */
.reviews-v2 {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(320px,1fr));
  gap:16px;
}
.rv2-card{
  background:#fff;border-radius:14px;box-shadow:0 4px 20px rgba(0,0,0,.06);
  padding:16px;display:flex;flex-direction:column;cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease;
}
.rv2-card:hover{ transform:translateY(-2px); box-shadow:0 8px 28px rgba(0,0,0,.1); }
.rv2-head{ display:flex; gap:12px; align-items:center; margin-bottom:10px; }
.rv2-ava{ width:44px;height:44px;border-radius:50%;object-fit:cover;background:#f2f2f2; }
.rv2-name{ font-weight:600; line-height:1.2; }
.rv2-date{ color:#777; font-size:.9rem; }

.rv2-stars { 
    color:#f5a623; letter-spacing:1px; font-size:0.95rem; 
    display: block; /* Makes the text appear above the name */
}

.rv2-text{ color:#222; margin-top:8px; white-space:pre-line; }
.rv2-more{ color:#0b66ff; font-weight:600; margin-top:10px; }

.rv2-overlay { position:fixed; inset:0; display:grid; place-items:center; z-index:9999; }

.rv2-overlay__backdrop { position:absolute; inset:0; background:rgba(0,0,0,.45); }

.rv2-overlay__card {
  position:relative; background:#fff; max-width:min(820px, 92vw); max-height:85vh;
  overflow:auto; padding:24px; border-radius:16px; box-shadow:0 12px 44px rgba(0,0,0,.3);
}
.rv2-overlay__close{
  position:absolute; top:8px; right:10px; background:transparent; border:0;
  font-size:28px; line-height:1; cursor:pointer; color:#555;
}

/* avatar + date inline */
.review-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  /* margin-right: 6px; */
}
.review-date { color: #777; margin-left: 8px; font-size: 0.95em; }

/* “pill” look per item, non-destructive */
#reviewTicker .review-item {
  display: inline-block;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 6px 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
#reviewTicker .review-item:hover { box-shadow: 0 4px 18px rgba(0,0,0,.1); }

/* Read-more button */
#reviewTicker .read-more-btn {
  /* margin-left: 4px; */
  border: 0; 
  background: transparent;
  color: #0b66ff;
  font-weight: 600;
  cursor: pointer;
}
#reviewTicker .read-more-btn:focus { outline: 2px solid #0b66ff55; outline-offset: 2px; }

#reviewTicker .review-item:focus {
  outline: 2px solid #0b66ff55;
  outline-offset: 3px;
}


/* OVERRIDES */

/* make every pill the same width and align from the top */
#reviewTicker .review-item{
  width: 360px;          /* pick 340–380px to taste */
  max-width: none;       /* overrides earlier max-width:320px */
  box-sizing: border-box;
  vertical-align: top;   /* was bottom; prevents staggered baseline */
}

/* clamp preview to a fixed number of lines so heights match */
.review-text {
  display: -webkit-box;
  -webkit-line-clamp: 4;      /* 3–5 lines as you like */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  min-height: calc(1.5em * 4); /* reserve space for exactly 4 lines */

    /* migrated */
    /* border-bottom: 1px solid #ccc; /1* Horizontal line below the review text *1/ */
    margin-bottom: 5px; /* Space between the text and the line */
    padding-bottom: 5px; /* Space between the text and the line */
}

#reviewTicker .review-divider {
  height: 1px;
  background-color: #e6e6e6; /* tweak color as needed */
  margin-top: 8px;
  margin-bottom: 8px;
  border-radius: 1px;
}

#reviewTicker .review-meta { 
    white-space: nowrap; 

    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    line-height: 1.2;
}

/* OVERLAY CONTROL */
/* lock page scroll while overlay is open */
body.no-scroll { overflow: hidden; }
html { scrollbar-gutter: stable; }  /* Chrome/Edge/Firefox/Safari 17+ */
/* avoid jumpiness? */

/* allow scrolling inside the overlay and prevent scroll chaining to body */
.review-overlay {
  overflow: auto;                 /* overlay itself can scroll if needed */
  overscroll-behavior: contain;   /* stops iOS/Chrome from scrolling the page underneath */
  padding: 24px;                  /* some breathing room around the card */
}

/* make the card scroll inside the overlay */
.review-overlay-content {
  max-height: 85vh;               /* don't exceed viewport height */
  overflow: auto;                 /* <-- the key bit */
  -webkit-overflow-scrolling: touch; /* smooth iOS scrolling */
  width: min(600px, 92vw);        /* keep your current width behavior */
}

/* TABS, inside OVERLAY */
.rv-tabs {
  display:flex; 
  gap:8px;
  /* border-bottom:1px solid #e6e6e6; */
  margin-bottom: 10px;
}

.rv-tab {
  appearance:none; border:0; 
  background:transparent;
  cursor:pointer;
  padding:8px 10px;
  border-radius:8px 8px 0 0;
  font-weight:600;
  color:#555;
}

.rv-tab.active {
  background:#fff; color:#111; box-shadow:0 -1px 0 #fff, 0 2px 0 #fff;
}

/* panels just stack; we use [hidden] to toggle */
.rv-panel { white-space:pre-wrap; }

/* STICKY HEADER EXPERIMENT */
.rv2-overlay-header {
  position: sticky;
  top: 0;                          /* sticks to top of the card's scroll area */
  z-index: 2;
  background: #333;                /* same as the card, so text under doesn't bleed through */
  /* padding-top: 4px; */
  padding-top: 20px; /* consistent with overlay-content */
  padding-bottom: 8px;
}

.rv2-overlay-header .rv-tabs { 
  /* border-bottom: 1px solid rgba(255,255,255,0.06); */
  margin-bottom: 0; 
}

.rv-divider{
  height:1px;
  background: rgba(255,255,255,0.08);
  margin-top: 2px;
}

/* .rv2-overlay-header .rv-tab { color: #ddd; } */
/* .rv2-overlay-header .rv-tab.active { color: #333; } */
