/* CSS per l'anteprima recensioni compatta */
.reviews-compact-preview {
    background: white;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reviews-compact-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.reviews-compact-content {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
}

.reviews-compact-stars {
    display: flex;
    gap: 2px;
}

.reviews-compact-stars .fas.fa-star,
.reviews-compact-stars .fas.fa-star-half-alt {
    color: #ffc107;
    font-size: 14px;
}

.reviews-compact-stars .far.fa-star {
    color: #ddd;
    font-size: 14px;
}

.reviews-compact-rating {
    font-weight: 600;
    font-size: 16px;
}

.reviews-compact-count {
    font-size: 14px;
    opacity: 0.7;
}

.reviews-compact-arrow {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.6;
}

/* Pulsante per aggiungere recensione */
.add-review-button {
    margin-top: 10px;
    text-align: center;
}

.add-review-button .btn {
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.add-review-button .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

/* Stili per il form recensioni prodotto */
.product-info-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.product-info-card h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.product-preview {
    display: flex;
    align-items: center;
    gap: 15px;
}

.product-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.product-details h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.product-details p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

/* Modal per le recensioni */
.reviews-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.reviews-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.reviews-modal-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reviews-modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.reviews-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.reviews-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.reviews-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.reviews-modal-summary {
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.reviews-modal-rating {
    font-size: 48px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 10px;
}

.reviews-modal-stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 10px;
}

.reviews-modal-stars .fas.fa-star,
.reviews-modal-stars .fas.fa-star-half-alt {
    color: #ffc107;
    font-size: 20px;
}

.reviews-modal-stars .far.fa-star {
    color: #ddd;
    font-size: 20px;
}

.reviews-modal-count {
    color: #666;
    font-size: 16px;
}

/* CSS per la sezione anteprima recensioni (mantenuto per compatibilità) */
.reviews-preview-section {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.reviews-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.reviews-preview-header > div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reviews-preview-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.reviews-preview-header .fas.fa-star {
    color: #ffc107;
    font-size: 20px;
}

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

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars .fas.fa-star,
.rating-stars .fas.fa-star-half-alt {
    color: #ffc107;
    font-size: 14px;
}

.rating-stars .far.fa-star {
    color: #ddd;
    font-size: 14px;
}

.rating-summary > span:first-of-type {
    font-weight: 600;
    color: #333;
}

.rating-summary > span:last-of-type {
    color: #666;
    font-size: 14px;
}

.review-preview-item {
    padding: 12px 0;
}

.review-preview-item.has-border {
    border-bottom: 1px solid #e9ecef;
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.review-header > div:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reviewer-avatar {
    width: 32px;
    height: 32px;
    background-color: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.reviewer-info > div:first-child {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.reviewer-info > div:last-child {
    font-size: 12px;
    color: #666;
}

.review-rating {
    display: flex;
    gap: 1px;
}

.review-rating .fas.fa-star {
    color: #ffc107;
    font-size: 12px;
}

.review-rating .far.fa-star {
    color: #ddd;
    font-size: 12px;
}

.review-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.review-content {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.verified-badge {
    margin-top: 8px;
}

.verified-badge span {
    background-color: #28a745;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.verified-badge .fas.fa-check-circle {
    margin-right: 3px;
}

.reviews-preview-footer {
    margin-top: 15px;
    text-align: center;
}

.reviews-preview-footer a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.reviews-preview-footer .fas.fa-arrow-right {
    font-size: 12px;
}