/* Trustpilot Reviews Scraper - CSS Styles */

/* Container principale */
.trs-reviews-container {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Stili comuni per le recensioni */
.trs-review-content {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.trs-review-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Rating stars */
.trs-rating {
    margin-bottom: 15px;
}

.trs-star {
    color: #ddd;
    font-size: 18px;
    margin-right: 2px;
}

.trs-star.filled {
    color: #ffd700;
}

/* Titolo recensione */
.trs-review-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #333;
    line-height: 1.3;
}

/* Testo recensione */
.trs-review-text {
    flex: 1;
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
}

/* Meta informazioni */
.trs-review-meta {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #888;
}

.trs-author {
    font-weight: 500;
    color: #555;
}

.trs-date {
    margin-left: 10px;
}

/* ===== CAROSELLO ===== */
.trs-carousel {
    position: relative;
    overflow: hidden;
    padding: 0 40px;
}

.trs-carousel-wrapper {
    display: flex;
    transition: transform 0.3s ease;
    gap: 20px;
}

.trs-carousel .trs-review-item {
    flex: 0 0 calc(33.333% - 14px);
    min-width: 300px;
}

.trs-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.trs-carousel-nav:hover {
    background: #f8f9fa;
    border-color: #007cba;
    color: #007cba;
}

.trs-carousel-nav.trs-prev {
    left: 0;
}

.trs-carousel-nav.trs-next {
    right: 0;
}

/* ===== GALLERIA ===== */
.trs-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.trs-gallery-item {
    min-height: 200px;
}

/* ===== MASONRY ===== */
.trs-masonry {
    column-count: 3;
    column-gap: 20px;
}

.trs-masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    min-height: 200px;
}

/* Responsive per masonry */
@media (max-width: 768px) {
    .trs-masonry {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .trs-masonry {
        column-count: 1;
    }
}

/* ===== GRID ===== */
.trs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.trs-grid-item {
    min-height: 250px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .trs-carousel .trs-review-item {
        flex: 0 0 calc(50% - 10px);
        min-width: 250px;
    }
    
    .trs-gallery {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .trs-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .trs-carousel-nav {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .trs-carousel .trs-review-item {
        flex: 0 0 100%;
        min-width: 200px;
    }
    
    .trs-gallery {
        grid-template-columns: 1fr;
    }
    
    .trs-grid {
        grid-template-columns: 1fr;
    }
    
    .trs-review-content {
        padding: 15px;
    }
    
    .trs-review-title {
        font-size: 16px;
    }
    
    .trs-star {
        font-size: 16px;
    }
}

/* ===== ANIMAZIONI ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.trs-review-item,
.trs-gallery-item,
.trs-masonry-item,
.trs-grid-item {
    animation: fadeIn 0.6s ease-out;
}

/* ===== LOADING STATE ===== */
.trs-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.trs-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    border-top-color: #007cba;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== ERROR STATE ===== */
.trs-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
}

/* ===== EMPTY STATE ===== */
.trs-empty {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* ===== CUSTOM THEMES ===== */
/* Tema scuro */
.trs-theme-dark .trs-review-content {
    background: #2d3748;
    color: #e2e8f0;
}

.trs-theme-dark .trs-review-title {
    color: #f7fafc;
}

.trs-theme-dark .trs-review-text {
    color: #cbd5e0;
}

.trs-theme-dark .trs-review-meta {
    border-top-color: #4a5568;
    color: #a0aec0;
}

/* Tema minimal */
.trs-theme-minimal .trs-review-content {
    background: transparent;
    border: 1px solid #e2e8f0;
    box-shadow: none;
}

.trs-theme-minimal .trs-review-content:hover {
    border-color: #cbd5e0;
    transform: none;
}

/* Tema colorato */
.trs-theme-colored .trs-review-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.trs-theme-colored .trs-review-title {
    color: white;
}

.trs-theme-colored .trs-review-text {
    color: rgba(255, 255, 255, 0.9);
}

.trs-theme-colored .trs-review-meta {
    border-top-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.trs-theme-colored .trs-star.filled {
    color: #ffd700;
} 