/**
 * Simplified Reviews - Frontend CSS
 */

/* Basis-Styles */
.sf-reviews-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
}

.sf-reviews-wrapper * {
    box-sizing: border-box;
}

/* Allgemeine Review-Item Styles */
.sf-review-item {
    position: relative;
}

/* Bewertungssterne */
.sf-rating {
    display: inline-block;
    letter-spacing: 2px;
}

.sf-star {
    display: inline-block;
}

.sf-star-filled {
    color: #ffb900;
}

.sf-star-empty {
    color: #ddd;
}

/* Quelle */
.sf-source {
    font-size: 14px;
}

.sf-source-name {
    font-weight: 500;
}

/* Tags */
.sf-tag {
    display: inline-block;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s ease;
}

.sf-tag:hover {
    background-color: #e0e0e1;
}

/* Read More */
.sf-read-more {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.sf-read-more:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 1024px) {
    .sf-reviews-grid[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sf-reviews-grid[data-columns="3"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .sf-reviews-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Animationen */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sf-review-item {
    animation: fadeIn 0.5s ease;
}

/* Custom Template Support */
.sf-reviews-cards .sf-review-item {
    background: #f9f9f9;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sf-reviews-cards .sf-review-item:hover {
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

/* Masonry Layout Support */
.sf-reviews-masonry {
    column-gap: 20px;
}

.sf-reviews-masonry .sf-review-item {
    break-inside: avoid;
    margin-bottom: 20px;
}

/* Loading State */
.sf-reviews-loading {
    opacity: 0.5;
    pointer-events: none;
}

.sf-reviews-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Reviews Message */
.sf-no-reviews {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}