/* Embeddable Google Reviews Widget - Isolated & Responsive Stylesheet */

.grw-container {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  border-radius: 20px;
  padding: 24px;
  transition: all 0.3s ease;
}

/* Theme Variations */
.grw-theme-light {
  background-color: #ffffff;
  color: #1e293b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.grw-theme-mint {
  background-color: #e6f4ea;
  color: #1e293b;
}

.grw-theme-dark {
  background-color: #1e293b;
  color: #f8fafc;
  border: 1px solid #334155;
}

.grw-theme-glass {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #0f172a;
}

/* Combo Layout (Badge Left + Carousel Right) */
.grw-layout-combo {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

/* Summary Badge */
.grw-badge {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  min-width: 200px;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grw-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.grw-theme-dark .grw-badge {
  background: #0f172a;
  border-color: #334155;
}

.grw-badge-g-logo {
  width: 40px;
  height: 40px;
  margin-bottom: 6px;
}

.grw-badge-score {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  margin-bottom: 4px;
}
.grw-theme-dark .grw-badge-score { color: #fff; }

.grw-stars {
  display: flex;
  gap: 2px;
  margin-bottom: 8px;
}

.grw-star {
  font-size: 1.15rem;
  color: #FFB800;
}

.grw-badge-count {
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}
.grw-theme-dark .grw-badge-count { color: #cbd5e1; }

.grw-badge-footer {
  font-size: 0.72rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
  width: 100%;
  justify-content: center;
}
.grw-theme-dark .grw-badge-footer { border-color: #334155; color: #94a3b8; }

.grw-verified-icon {
  width: 14px;
  height: 14px;
  color: #0F9D58;
}

/* Right Side Review Carousel Frame */
.grw-carousel-frame {
  background: #ffffff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  flex: 1;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.grw-theme-dark .grw-carousel-frame {
  background: #0f172a;
  border-color: #334155;
}

/* Carousel Header Strip */
.grw-carousel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}
.grw-theme-dark .grw-carousel-header { border-color: #1e293b; }

.grw-google-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.grw-biz-title-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}
.grw-theme-dark .grw-biz-title-text { color: #fff; }

.grw-header-rating {
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #475569;
}
.grw-theme-dark .grw-header-rating { color: #94a3b8; }

.grw-verified-tag {
  background: #137333;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* Carousel Slider track */
.grw-slider-viewport {
  overflow: hidden;
  position: relative;
  width: 100%;
  flex: 1;
}

.grw-slider-track {
  display: flex;
  gap: 14px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

/* Review Cards */
.grw-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  flex: 0 0 calc(50% - 7px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  border: 1px solid #f1f5f9;
}

.grw-theme-dark .grw-card {
  background: #1e293b;
  border-color: #334155;
}

.grw-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grw-user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.grw-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  overflow: hidden;
  flex-shrink: 0;
}

.grw-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grw-user-details {
  display: flex;
  flex-direction: column;
}

.grw-user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}
.grw-theme-dark .grw-user-name { color: #f8fafc; }

.grw-review-date {
  font-size: 0.72rem;
  color: #94a3b8;
}

.grw-g-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.grw-card-stars {
  display: flex;
  align-items: center;
  gap: 4px;
}

.grw-verified-check {
  color: #1a73e8;
  font-size: 0.8rem;
}

.grw-card-text {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #334155;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.grw-theme-dark .grw-card-text { color: #cbd5e1; }

/* Nav Controls */
.grw-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s;
  color: #334155;
  font-size: 1.2rem;
  line-height: 1;
}

.grw-theme-dark .grw-nav-btn {
  background: #334155;
  border-color: #475569;
  color: #fff;
}

.grw-nav-btn:hover {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.grw-nav-prev { left: 4px; }
.grw-nav-next { right: 4px; }

/* 📱 MOBILE RESPONSIVE DESIGN IMPROVEMENTS */
@media (max-width: 768px) {
  .grw-container {
    padding: 16px;
    border-radius: 16px;
  }

  .grw-layout-combo {
    flex-direction: column;
    gap: 14px;
  }

  /* Compact Horizontal Badge Header on Mobile */
  .grw-badge {
    min-width: 100%;
    padding: 14px 16px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    row-gap: 6px;
    column-gap: 8px;
  }

  .grw-badge-g-logo {
    width: 28px;
    height: 28px;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .grw-badge-score {
    font-size: 1.25rem;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .grw-stars {
    margin-bottom: 0;
    gap: 1px;
    flex-shrink: 0;
  }

  .grw-badge .grw-star {
    font-size: 0.85rem;
  }

  .grw-badge-count {
    font-size: 0.78rem;
    margin-bottom: 0;
    flex-basis: 100%;
  }

  .grw-badge-footer {
    border-top: none;
    padding-top: 0;
    width: auto;
    font-size: 0.68rem;
    flex-basis: 100%;
    justify-content: flex-start;
  }

  /* Single Review Card per slide on Mobile screens */
  .grw-card {
    flex: 0 0 100%;
    padding: 14px;
  }

  .grw-carousel-frame {
    padding: 14px;
  }

  .grw-nav-btn {
    width: 30px;
    height: 30px;
    font-size: 1rem;
  }
}

/* Grid Layout Mode */
.grw-layout-grid .grw-grid-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  width: 100%;
}

/* Floating Corner Mode */
.grw-layout-floating {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: auto;
  max-width: 320px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}
