/**
 * Google Reviews Carousel Styles
 * Version: 1.0.0
 */

/* Container */
.grc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border-radius: 16px;
}

/* Header Section */
.grc-header {
    text-align: center;
    margin-bottom: 40px;
}

.grc-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 24px 0;
    font-style: italic;
}

.grc-rating-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.grc-google-logo {
    height: 30px;
    width: auto;
}

.grc-stars-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.grc-rating-text {
    font-size: 1rem;
    color: #555;
}

.grc-rating-text strong {
    color: #1a1a2e;
    font-weight: 600;
}

/* Stars */
.grc-stars {
    display: inline-flex;
    gap: 2px;
}

.grc-star {
    font-size: 1.5rem;
    line-height: 1;
}

.grc-star-full {
    color: #fbbc04;
}

.grc-star-half {
    color: #fbbc04;
    position: relative;
}

.grc-star-empty {
    color: #dadce0;
}

/* Carousel Wrapper */
.grc-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
}

.grc-carousel-track-container {
    overflow: hidden;
    flex: 1;
    border-radius: 12px;
}

.grc-carousel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 4px;
}

/* Review Cards */
.grc-review-card {
    flex: 0 0 calc(33.333% - 16px);
    min-width: 280px;
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grc-review-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Review Header */
.grc-review-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.grc-author-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.grc-author-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grc-author-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
}

.grc-author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grc-author-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a2e;
}

.grc-review-stars .grc-star {
    font-size: 1.25rem;
}

/* Review Text */
.grc-review-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

/* Navigation Buttons */
.grc-nav {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    color: #333;
}

.grc-nav:hover {
    background: #4285f4;
    color: #fff;
    transform: scale(1.1);
}

.grc-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.grc-nav svg {
    width: 24px;
    height: 24px;
}

/* Carousel Dots */
.grc-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

.grc-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e0;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.grc-dot:hover {
    background: #a0aec0;
}

.grc-dot.active {
    background: #4285f4;
    transform: scale(1.2);
}

/* Error and No Reviews Messages */
.grc-error,
.grc-no-reviews {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1rem;
}

.grc-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    color: #856404;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .grc-review-card {
        flex: 0 0 calc(50% - 12px);
    }
    
    .grc-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .grc-container {
        padding: 30px 15px;
    }
    
    .grc-review-card {
        flex: 0 0 calc(100% - 8px);
        min-width: 260px;
    }
    
    .grc-title {
        font-size: 1.75rem;
    }
    
    .grc-nav {
        width: 40px;
        height: 40px;
    }
    
    .grc-carousel-wrapper {
        gap: 8px;
    }
    
    .grc-carousel-track {
        gap: 16px;
    }
    
    .grc-review-card {
        padding: 20px;
    }
    
    .grc-author-photo {
        width: 48px;
        height: 48px;
    }
    
    .grc-author-name {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .grc-nav {
        display: none;
    }
    
    .grc-carousel-track-container {
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    .grc-title {
        font-size: 1.5rem;
    }
    
    .grc-rating-summary {
        flex-direction: column;
        gap: 12px;
    }
}

/* Animation for cards entering view */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grc-review-card {
    animation: fadeInUp 0.5s ease forwards;
}

.grc-review-card:nth-child(1) { animation-delay: 0.1s; }
.grc-review-card:nth-child(2) { animation-delay: 0.2s; }
.grc-review-card:nth-child(3) { animation-delay: 0.3s; }
.grc-review-card:nth-child(4) { animation-delay: 0.4s; }
.grc-review-card:nth-child(5) { animation-delay: 0.5s; }

/* Smooth scrolling for touch devices */
@media (hover: none) and (pointer: coarse) {
    .grc-carousel-track-container {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .grc-carousel-track-container::-webkit-scrollbar {
        display: none;
    }
    
    .grc-review-card {
        scroll-snap-align: start;
    }
    
    .grc-carousel-track {
        transition: none;
    }
}

/* Print styles */
@media print {
    .grc-nav,
    .grc-carousel-dots {
        display: none;
    }
    
    .grc-carousel-track {
        flex-wrap: wrap;
    }
    
    .grc-review-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
