/* ============================================
   STOREROOM RACK — Google Reviews Widget
   Matches storeroomrack.com design language
   Font: Raleway | Brand: #02AED6 | Text: #333
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700;800&display=swap');

/* ---- Scoped Variables ---- */
.srr-widget {
  --srr-cyan: #02AED6;
  --srr-cyan-hover: #019fc2;
  --srr-teal: #65B5D0;
  --srr-star: #FFB400;
  --srr-text: #333333;
  --srr-text-light: #777777;
  --srr-text-muted: #999999;
  --srr-bg: #ffffff;
  --srr-card-bg: #ffffff;
  --srr-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --srr-card-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.18);
  --srr-card-radius: 3px;
  --srr-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
.srr-widget *,
.srr-widget *::before,
.srr-widget *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ---- Widget Base ---- */
.srr-widget {
  font-family: 'Raleway', sans-serif;
  color: var(--srr-text);
  background: var(--srr-bg);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ============================================
   HEADER
   ============================================ */

.srr-header {
  text-align: center;
  padding: 0 0 28px;
}

.srr-header h2 {
  font-family: 'Raleway', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--srr-text);
  line-height: 1.2;
  margin: 0;
}

/* Subtle Google attribution inline with heading */
.srr-google-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--srr-text-muted);
  letter-spacing: 0.2px;
}

.srr-google-badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.srr-intro {
  max-width: 800px;
  margin: 16px auto 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--srr-text-light);
  line-height: 1.7;
}

.srr-subheading {
  font-family: 'Raleway', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--srr-text);
  margin-top: 28px;
}

/* ============================================
   REVIEW CARDS
   ============================================ */

.srr-card {
  background: var(--srr-card-bg);
  border-radius: var(--srr-card-radius);
  box-shadow: var(--srr-card-shadow);
  padding: 24px 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: box-shadow var(--srr-transition), transform var(--srr-transition);
  position: relative;
}

.srr-card:hover {
  box-shadow: var(--srr-card-shadow-hover);
  transform: translateY(-2px);
}

/* ---- Quote Mark ---- */
.srr-card-quote {
  width: 28px;
  height: 28px;
  color: var(--srr-teal);
  opacity: 0.3;
  margin-bottom: 6px;
  flex-shrink: 0;
}

/* ---- Avatar ---- */
.srr-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 14px;
  flex-shrink: 0;
  border: 2px solid #f0f0f0;
}

.srr-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.srr-avatar-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Raleway', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  border-radius: 50%;
}

/* ---- Review Text ---- */
.srr-card-text {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--srr-text);
  margin-bottom: 14px;
  flex-grow: 1;
  word-break: break-word;
}

/* ---- Author ---- */
.srr-card-author {
  font-size: 13px;
  font-weight: 700;
  color: var(--srr-text);
  margin-bottom: 6px;
}

/* ---- Star Rating ---- */
.srr-card-rating {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 2px;
}

.srr-star {
  width: 14px;
  height: 14px;
  color: var(--srr-star);
  flex-shrink: 0;
}

/* ---- Date ---- */
.srr-card-date {
  font-size: 12px;
  font-weight: 400;
  color: var(--srr-text-muted);
}

/* ============================================
   COMPACT MODE — 3-card row for product pages
   ============================================ */

.srr-compact .srr-reviews-row {
  display: flex;
  gap: 20px;
  padding: 0 0 30px;
}

.srr-compact .srr-card {
  flex: 1;
  min-width: 0;
}

/* Truncate review text to ~3 lines in compact mode */
.srr-compact .srr-card-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   FULL MODE — grid for /customer-reviews page
   ============================================ */

.srr-full .srr-reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 0 30px;
}

/* Read-more toggle for long reviews */
.srr-full .srr-card-text {
  position: relative;
}

.srr-full .srr-card-text.srr-truncated {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.srr-read-more {
  display: inline;
  background: none;
  border: none;
  color: var(--srr-cyan);
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0 0;
  transition: color 0.2s;
}

.srr-read-more:hover {
  color: var(--srr-cyan-hover);
}

/* Scroll-reveal animation */
.srr-full .srr-card {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}

.srr-full .srr-card.srr-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays (set via inline style from JS) */

/* ============================================
   CTA SECTION
   ============================================ */

.srr-cta {
  text-align: center;
  padding: 8px 0 40px;
}

.srr-cta p {
  font-size: 15px;
  font-weight: 400;
  color: var(--srr-text);
  margin-bottom: 16px;
  line-height: 1.5;
}

.srr-btn {
  display: inline-block;
  background: var(--srr-cyan);
  color: #ffffff;
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 9px 26px;
  border-radius: 25px;
  border: none;
  cursor: pointer;
  transition: background var(--srr-transition), transform 0.15s ease;
  letter-spacing: 0.3px;
}

.srr-btn:hover {
  background: var(--srr-cyan-hover);
  transform: translateY(-1px);
  text-decoration: none;
  color: #ffffff;
}

.srr-btn:active {
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 900px) {
  .srr-full .srr-reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .srr-header h2 {
    font-size: 28px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .srr-widget {
    padding: 0 12px;
  }

  .srr-header {
    padding: 28px 0 20px;
  }

  .srr-header h2 {
    font-size: 22px;
  }

  .srr-subheading {
    font-size: 17px;
  }

  .srr-intro {
    font-size: 14px;
  }

  /* Compact: stack cards */
  .srr-compact .srr-reviews-row {
    flex-direction: column;
    gap: 14px;
  }

  /* Full: single column */
  .srr-full .srr-reviews-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .srr-card {
    padding: 20px 16px 14px;
  }

  .srr-cta {
    padding: 4px 0 30px;
  }

  .srr-cta p {
    font-size: 14px;
  }
}
