/**
 * Google Reviews Widget - Stili
 * Version: 1.0.0
 */

/* Container principale */
.grw-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header con nome azienda e rating generale */
.grw-header {
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 30px;
}

.grw-business-name {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 15px 0;
}

.grw-overall-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.grw-rating-number {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.grw-total-reviews {
    font-size: 16px;
    color: #666;
}

/* Stelle */
.grw-stars {
    display: inline-flex;
    gap: 2px;
}

.grw-star {
    font-size: 20px;
    line-height: 1;
}

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

.grw-star-half {
    color: #fbbc04;
    opacity: 0.5;
}

.grw-star-empty {
    color: #e0e0e0;
}

/* Container recensioni */
.grw-reviews {
    display: grid;
    gap: 20px;
}

/* Singola recensione */
.grw-review {
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
}

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

/* Header della recensione */
.grw-review-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.grw-author-image {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.grw-review-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.grw-author-name {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
}

.grw-review-meta .grw-stars {
    margin: 2px 0;
}

.grw-review-meta .grw-star {
    font-size: 16px;
}

.grw-review-date {
    font-size: 13px;
    color: #999;
}

/* Testo della recensione */
.grw-review-text {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    padding: 0;
}

/* Footer con link */
.grw-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #f0f0f0;
}

.grw-google-link {
    display: inline-block;
    padding: 12px 30px;
    background: #4285f4;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.grw-google-link:hover {
    background: #357ae8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

/* Messaggio di errore */
.grw-error {
    padding: 15px 20px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 6px;
    color: #c33;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .grw-container {
        padding: 20px;
        margin: 20px 10px;
    }

    .grw-business-name {
        font-size: 22px;
    }

    .grw-rating-number {
        font-size: 20px;
    }

    .grw-review {
        padding: 15px;
    }

    .grw-review-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .grw-author-image {
        margin-bottom: 10px;
    }

    .grw-review-meta {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .grw-container {
        padding: 15px;
        margin: 15px 5px;
    }

    .grw-business-name {
        font-size: 20px;
    }

    .grw-overall-rating {
        flex-direction: column;
        gap: 8px;
    }

    .grw-google-link {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Layout a griglia per desktop (opzionale) */
@media (min-width: 992px) {
    .grw-reviews.grw-grid-layout {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Animazioni */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grw-review {
    animation: fadeIn 0.5s ease-out;
}

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

/* Stile alternativo: Layout compatto */
.grw-container.grw-compact .grw-review {
    padding: 12px 15px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #e8e8e8;
    border-radius: 0;
}

.grw-container.grw-compact .grw-review:last-child {
    border-bottom: none;
}

.grw-container.grw-compact .grw-review:hover {
    background: #fafafa;
    transform: none;
}

/* Print styles */
@media print {
    .grw-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .grw-google-link {
        display: none;
    }

    .grw-review {
        page-break-inside: avoid;
    }
}
