/* ==========================================================================
   GSReviews - Google Reviews Widget Styles v1.2.6
   ========================================================================== */

/* --- Main widget container --- */
.gs-reviews-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans,
                 Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #000;
    color: #fff;
    padding: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    border-radius: 12px;
}

/* --- Header with average rating --- */
.gs-reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #333;
}

.gs-reviews-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.gs-reviews-avg {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gs-avg-stars .gs-star {
    color: #444;
    font-size: 1.3rem;
}

.gs-avg-stars .gs-star.active {
    color: #FFD700;
}

.gs-avg-value {
    font-weight: 600;
    color: #4CAF50;
    font-size: 1.1rem;
}

/* --- Slider container (wrapper for track) --- */
.gs-slider-container {
    position: relative;
    overflow: hidden; /* clip the track */
}

/* --- Slider track (horizontal row of cards) --- */
/* Auto-scroll is handled by JavaScript via requestAnimationFrame.
   No CSS animation here — JS sets transform directly for smooth dynamic control. */
.gs-slider-track {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    will-change: transform;
    box-sizing: border-box;
}

/* --- Individual review card --- */
.gs-review-card {
    flex-shrink: 0;
    width: 300px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.gs-review-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

/* --- Reviewer info row --- */
.gs-reviewer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.gs-reviewer-name {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

/* --- Star rating inside card --- */
.gs-review-rating .gs-star {
    color: #444;
    font-size: 1rem;
}

.gs-review-rating .gs-star.active {
    color: #FFD700;
}

/* --- Timestamp --- */
.gs-review-time {
    display: block;
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
}

/* --- Review text --- */
.gs-review-text {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* --- Total count footer --- */
.gs-total-count {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* --- No reviews message --- */
.gs-no-reviews {
    width: 100%;
    text-align: center;
    padding: 2rem;
    color: #888;
    font-style: italic;
}

/* --- Fade-in animation on load (per card) --- */
/* Only apply to original cards, NOT to duplicated clones (.gs-review-clone). */
.gs-review-card:not(.gs-review-clone) {
    animation: gsFadeIn 0.4s ease-out both;
}

@keyframes gsFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for each original card only */
.gs-review-card:not(.gs-review-clone):nth-child(1)  { animation-delay: 0.05s; }
.gs-review-card:not(.gs-review-clone):nth-child(2)  { animation-delay: 0.10s; }
.gs-review-card:not(.gs-review-clone):nth-child(3)  { animation-delay: 0.15s; }
.gs-review-card:not(.gs-review-clone):nth-child(4)  { animation-delay: 0.20s; }
.gs-review-card:not(.gs-review-clone):nth-child(5)  { animation-delay: 0.25s; }
.gs-review-card:not(.gs-review-clone):nth-child(6)  { animation-delay: 0.30s; }
.gs-review-card:not(.gs-review-clone):nth-child(7)  { animation-delay: 0.35s; }
.gs-review-card:not(.gs-review-clone):nth-child(8)  { animation-delay: 0.40s; }
.gs-review-card:not(.gs-review-clone):nth-child(9)  { animation-delay: 0.45s; }
.gs-review-card:not(.gs-review-clone):nth-child(10) { animation-delay: 0.50s; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .gs-reviews-widget {
        padding: 1.25rem;
        margin: 1rem auto;
    }

    .gs-reviews-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .gs-review-card {
        width: 260px;
    }

}

@media (max-width: 480px) {
    .gs-review-card {
        width: 230px;
        padding: 1rem;
    }
}

/* --- Dark mode (system preference) --- */
@media (prefers-color-scheme: dark) {
    .gs-reviews-widget {
        background: #111;
    }
}
