/**
 * Google Reviews Widget Pro v3.2.1
 * Stars horizontal below author info
 * Badge layout + Historical storage
 */

/* ========== BADGE LAYOUT ========== */
.grwp-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.grwp-scheme-dark .grwp-badge {
    background: #1e1e1e;
}

.grwp-badge-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.grwp-google-icon svg {
    width: 32px;
    height: 32px;
}

.grwp-badge-rating {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.grwp-badge-score {
    font-size: 24px;
    font-weight: 700;
    color: #202124;
    line-height: 1;
}

.grwp-scheme-dark .grwp-badge-score {
    color: #ffffff;
}

.grwp-badge-stars {
    display: flex;
    gap: 0px;
    font-size: 18px;
    color: #fbbc04;
    letter-spacing: -3px;
    line-height: 1;
    width: fit-content;
}

.grwp-badge-stars span {
    font-weight: 900;
    color: #fbbc04;
}

.grwp-badge-stars .empty {
    color: #ddd;
}

.grwp-scheme-dark .grwp-badge-stars .empty {
    color: rgba(255, 255, 255, 0.25);
}

.grwp-badge-count {
    font-size: 12px;
    color: #5f6368;
}

.grwp-scheme-dark .grwp-badge-count {
    color: rgba(255, 255, 255, 0.6);
}

/* ========== CONTAINER ========== */
.grwp-widget {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 20px 0;
}

/* ========== HEADER ========== */
.grwp-header {
    text-align: center;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.grwp-business-name {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    color: #202124;
}

.grwp-scheme-dark .grwp-business-name {
    color: #ffffff;
}

.grwp-rating-summary {
    display: flex;
    align-items: center;
    gap: 10px;
}

.grwp-stars-large {
    display: flex;
    gap: 0px;
    font-size: 22px;
    color: #fbbc04;
    letter-spacing: -3px;
    width: fit-content;
}

.grwp-stars-large span {
    font-weight: 900;
    color: #fbbc04;
}

.grwp-stars-large .empty {
    color: #ddd;
}

.grwp-scheme-dark .grwp-stars-large .empty {
    color: rgba(255, 255, 255, 0.25);
}

.grwp-rating-text {
    font-size: 15px;
    color: #5f6368;
    font-weight: 500;
}

.grwp-scheme-dark .grwp-rating-text {
    color: rgba(255, 255, 255, 0.7);
}

.grwp-cta-button {
    display: inline-block;
    padding: 10px 24px;
    background-color: var(--grwp-accent, #4285f4);
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.grwp-cta-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ========== CAROUSEL CONTAINER ========== */
.grwp-carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

/* No navigation needed */
.grwp-carousel-container.grwp-no-nav {
    padding: 0;
}

.grwp-carousel {
    flex: 1;
    overflow: hidden;
}

.grwp-track {
    display: flex;
    gap: 16px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== CARDS - CLICKABLE ========== */
.grwp-card {
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 0 8px;
    text-decoration: none;
    color: inherit;
    display: block;
}

.grwp-card-inner {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    height: 100%;
    transition: all 0.3s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.grwp-card:hover .grwp-card-inner {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.grwp-scheme-dark .grwp-card-inner {
    background: #1e1e1e;
    border-color: #333;
}

.grwp-card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ========== AUTHOR SECTION ========== */
.grwp-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.grwp-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.grwp-avatar-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--grwp-accent, #4285f4);
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.grwp-author-info {
    flex: 1;
    min-width: 0;
}

.grwp-author-name {
    font-weight: 600;
    font-size: 14px;
    color: #202124;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
}

.grwp-scheme-dark .grwp-author-name {
    color: #ffffff;
}

.grwp-review-date {
    font-size: 12px;
    color: #5f6368;
}

.grwp-scheme-dark .grwp-review-date {
    color: rgba(255, 255, 255, 0.6);
}

.grwp-google-logo {
    font-weight: 600;
    background: linear-gradient(90deg, #4285f4, #ea4335, #fbbc04, #34a853);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== STARS - HORIZONTAL ROW BELOW AUTHOR ========== */
.grwp-stars {
    display: flex;
    gap: 0px;
    font-size: 14px;
    color: #fbbc04;
    letter-spacing: -4px;
    width: fit-content;
}

.grwp-stars span {
    font-weight: 900;
    color: #fbbc04;
}

.grwp-stars .full {
    color: #fbbc04;
}

.grwp-stars .empty {
    color: #ddd;
}

.grwp-scheme-dark .grwp-stars .empty {
    color: rgba(255, 255, 255, 0.25);
}

/* ========== REVIEW TEXT ========== */
.grwp-text {
    font-size: 14px;
    line-height: 1.5;
    color: #3c4043;
    margin: 0;
}

.grwp-scheme-dark .grwp-text {
    color: rgba(255, 255, 255, 0.85);
}

.grwp-read-more {
    display: inline-block;
    color: var(--grwp-accent, #4285f4);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-top: 0;
    padding-top: 0;
}

.grwp-card:hover .grwp-read-more {
    text-decoration: underline;
}

/* ========== NAVIGATION BUTTONS ========== */
.grwp-nav {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #ffffff;
    flex-shrink: 0;
    padding: 4px;
    gap: 2px;
}

.grwp-nav:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.05);
}

.grwp-nav:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.grwp-nav span {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.grwp-scheme-dark .grwp-nav {
    background: rgba(255, 255, 255, 0.15);
}

.grwp-scheme-dark .grwp-nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
}

/* ========== PAGINATION DOTS ========== */
.grwp-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.grwp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dadce0;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.grwp-dot:hover {
    background: #bdc1c6;
    transform: scale(1.2);
}

.grwp-dot.active {
    background: var(--grwp-accent, #4285f4);
    width: 24px;
    border-radius: 4px;
}

.grwp-scheme-dark .grwp-dot {
    background: rgba(255, 255, 255, 0.3);
}

.grwp-scheme-dark .grwp-dot:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .grwp-card {
        flex: 0 0 50% !important;
    }
}

@media (max-width: 768px) {
    .grwp-nav {
        width: 36px;
        height: 36px;
    }
    
    .grwp-nav svg {
        width: 16px;
        height: 16px;
    }
    
    .grwp-nav span {
        font-size: 9px;
    }
    
    .grwp-card {
        flex: 0 0 100% !important;
    }
    
    .grwp-business-name {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .grwp-carousel-container {
        gap: 8px;
    }
    
    .grwp-nav {
        width: 32px;
        height: 32px;
    }
}

/* ========== DARK MODE ========== */
.grwp-scheme-dark {
    background: #121212;
    padding: 20px;
    border-radius: 8px;
}


/* === BAKED: unify card stars (.grwp-stars) to header style (.grwp-stars-large) === */
/* Container: identical layout, spacing, alignment */
.grwp-stars,
.grwp-stars-large{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:2px !important;                 /* Trustindex spacing */
  line-height:1 !important;
  margin:0 !important;
  padding:0 !important;
}

/* Text-star fallback (header + cards) */
.grwp-stars > span,
.grwp-stars-large > span{
  display:inline-block !important;
  width:14px !important;
  height:14px !important;
  font-size:14px !important;          /* Trustindex size */
  line-height:1 !important;
  margin:0 !important;
  padding:0 !important;
  color:#fbbc04 !important;           /* Google yellow */
}
.grwp-stars > span.empty,
.grwp-stars-large > span.empty{
  color:#e0e0e0 !important;           /* empty = light gray */
}

/* SVG fallback (if stars are inline SVGs) */
.grwp-stars .grwp-star,
.grwp-stars-large .grwp-star{
  width:14px !important;
  height:14px !important;
  flex:0 0 14px !important;
  display:block !important;
}
.grwp-stars .grwp-star path[fill="#e0e0e0"],
.grwp-stars-large .grwp-star path[fill="#e0e0e0"]{
  fill:#e0e0e0 !important;
}

/* Card rhythm */
.grwp-card .grwp-stars{ margin-top:4px !important; margin-bottom:6px !important; }


/* === Add Google verified badge after stars via CSS pseudo-element (safe, no markup changes) === */
.grwp-stars::after,
.grwp-stars-large::after{
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  vertical-align: middle;
  /* Blue circle with white check */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='12' fill='%231a73e8'/><path fill='%23fff' d='M10.2 14.6l-2.1-2.1-1.1 1.1 3.2 3.2 6-6-1.1-1.1z'/></svg>");
}

