/* ===================================
   GWP Reviews - Complete CSS Styles
   ================================== */

/* Main Carousel Wrapper */
.gwp-reviews-carousel-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reviews Wrapper */
.greview-wrapper {
    width: 100%;
    padding: 20px;
}

/* Google Logo Section */
.home_bande_ends {
    text-align: center;
    margin-bottom: 20px;
}

.home_bande_ends img {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Business Header */
.business-header {
    text-align: center;
    margin-bottom: 30px;
}

.business-name {
    font-size: 24px;
    color: #FFF;
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.business-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.business-rating .g-stars {
    margin: 0;
}

.business-rating .g-stars .fa-star {
    font-size: 18px;
}

.rating-details {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #5f6368;
}

.rating-score {
    font-weight: 600;
    /*color: #333;*/
    font-size: 18px;
}

.rating-count {
    font-weight: 400;
    /*color: #666;*/
    font-size: 14px;
}

/* Carousel Container */
.gwp-carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    width: 100%;
    padding: 0 50px; /* Space for navigation buttons */
}

/* Carousel Track */
.gwp-carousel-track {
    display: flex;
    gap: 20px;
    width: 100%;
    padding: 10px 0;
    /* Transition handled by JavaScript */
}

/* Hide cloned items from screen readers */
.gwp-clone {
    aria-hidden: true;
}

/* Individual Carousel Items */
.gwp-carousel-item {
    flex: 0 0 350px; /* Fixed width for each item */
    min-height: 280px;
    max-height: 320px;
    overflow: hidden;
}

/* Navigation Buttons */
.gwp-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gwp-carousel-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #3367d6, #2d7d32);
}

.gwp-carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.gwp-carousel-prev {
    left: 10px;
}

.gwp-carousel-next {
    right: 10px;
}

/* Review Container */
.review-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 24px;
    width: 100%;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.review-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Author Section */
.g-author {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.author-pix {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    margin-right: 16px;
    flex-shrink: 0;
    object-fit: cover;
    border: 2px solid #f0f0f0;
    transition: border-color 0.3s ease;
}

.author-pix:hover {
    border-color: #4285f4;
}

.author-id {
    flex-grow: 1;
}

.author-id h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
    line-height: 1.3;
}

.author-id span {
    font-size: 13px;
    color: #666;
    font-weight: 400;
}

/* Star Rating - Simple Half Stars */
.g-stars {
    display: flex;
    gap: 3px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.g-stars .fa-star,
.g-stars .fa-star-half-stroke {
    font-size: 16px;
    transition: color 0.2s ease;
}

/* Étoiles pleines */
.g-stars .star-full {
    color: #fbbc04;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Demi-étoiles */
.g-stars .star-half {
    color: #fbbc04;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Étoiles vides */
.g-stars .star-empty {
    color: #e8eaed;
}

/* Rétrocompatibilité avec l'ancien système */
.g-stars .checked-rate {
    color: #fbbc04;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Review Text */
.review-container p {
    font-size: 14px;
    line-height: 1.6;
    color: #5f6368;
    margin: 0;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5; /* Limit to 5 lines */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    font-weight: 400;
}

/* Error Message */
.g-review-error {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    font-style: italic;
    font-size: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

/* Legacy Section Support */
#section_reviews {
    padding: 50px 0;
    background-color: #fff;
}

#section_reviews .container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 15px;
}

#section_reviews .greview-wrapper {
    padding: 0;
}

/* Responsive Design - Tablet */
@media (max-width: 1024px) {
    .gwp-carousel-container {
        padding: 0 40px;
    }
    
    .gwp-carousel-item {
        flex: 0 0 320px;
    }
    
    .gwp-carousel-btn {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
    
    .business-name {
        font-size: 22px;
        flex-direction: column;
        gap: 10px;
    }
}

/* Responsive Design - Mobile Large */
@media (max-width: 768px) {
    .gwp-reviews-carousel-wrapper {
        padding: 15px 0;
    }
    
    .greview-wrapper {
        padding: 15px;
    }
    
    .gwp-carousel-container {
        padding: 0 35px;
    }
    
    .gwp-carousel-item {
        flex: 0 0 280px;
        min-height: 240px;
        max-height: 280px;
    }
    
    .gwp-carousel-btn {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
    
    .gwp-carousel-prev {
        left: 5px;
    }
    
    .gwp-carousel-next {
        right: 5px;
    }
    
    .review-container {
        padding: 20px;
        min-height: 220px;
    }
    
    .review-container p {
        -webkit-line-clamp: 4;
        font-size: 13px;
        line-height: 1.5;
    }
    
    .author-pix {
        width: 48px;
        height: 48px;
        margin-right: 14px;
    }
    
    .author-id h4 {
        font-size: 15px;
    }
    
    .author-id span {
        font-size: 12px;
    }
    
    .g-stars .fa-star {
        font-size: 15px;
    }
    
    .home_bande_ends img {
        max-width: 180px;
    }
    
    .business-name {
        font-size: 20px;
        flex-direction: column;
        gap: 8px;
    }
    
    .business-rating .g-stars .fa-star {
        font-size: 16px;
    }
    
    #section_reviews {
        padding: 30px 0;
    }
    
    #section_reviews .container {
        padding: 0 10px;
    }
}

/* Responsive Design - Mobile Small */
@media (max-width: 480px) {
    .gwp-reviews-carousel-wrapper {
        padding: 10px 0;
    }
    
    .greview-wrapper {
        padding: 10px;
    }
    
    .gwp-carousel-container {
        padding: 0 30px;
    }
    
    .gwp-carousel-item {
        flex: 0 0 250px;
        min-height: 220px;
        max-height: 260px;
    }
    
    .gwp-carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .gwp-carousel-prev {
        left: 2px;
    }
    
    .gwp-carousel-next {
        right: 2px;
    }
    
    .review-container {
        padding: 16px;
        min-height: 200px;
        border-radius: 10px;
    }
    
    .review-container p {
        -webkit-line-clamp: 3;
        font-size: 13px;
    }
    
    .author-pix {
        width: 44px;
        height: 44px;
        margin-right: 12px;
    }
    
    .author-id h4 {
        font-size: 14px;
    }
    
    .author-id span {
        font-size: 11px;
    }
    
    .g-stars {
        gap: 2px;
        margin-bottom: 10px;
    }
    
    .g-stars .fa-star {
        font-size: 14px;
    }
    
    .home_bande_ends {
        margin-bottom: 15px;
    }
    
    .home_bande_ends img {
        max-width: 160px;
    }
    
    .business-header {
        margin-bottom: 20px;
    }
    
    .business-name {
        font-size: 18px;
        flex-direction: column;
        gap: 6px;
    }
    
    .business-rating .g-stars .fa-star {
        font-size: 15px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .gwp-carousel-btn {
        box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    }
    
    .review-container {
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .gwp-carousel-track {
        transition: none;
    }
    
    .gwp-carousel-btn {
        transition: none;
    }
    
    .review-container {
        transition: none;
    }
    
    .author-pix {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .gwp-carousel-btn {
        display: none;
    }
    
    .gwp-carousel-track {
        transform: none !important;
        display: block;
    }
    
    .gwp-carousel-item {
        break-inside: avoid;
        margin-bottom: 20px;
        flex: none;
        width: 100%;
    }
}