/**
 * Kidzup Reviews Styles
 * Design moderne et responsive
 * 
 * @package Kidzup
 * @subpackage Reviews
 */

/* ============================================
   REVIEW SUMMARY (Bloc note moyenne)
============================================ */

.kidzup-review-summary {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.review-summary-header {
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
}

.summary-rating .rating-number {
    font-size: 4rem;
    font-weight: 700;
    color: #0cc0df;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.summary-rating .kidzup-stars {
    font-size: 1.5rem;
    color: #FFD700;
    margin-bottom: 0.5rem;
}

.summary-rating .rating-text {
    font-size: 1.1rem;
    color: #666;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.summary-rating .rating-count {
    color: #999;
    font-size: 0.9rem;
}

/* Distribution des notes */
.review-summary-distribution {
    margin-bottom: 2rem;
}

.distribution-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.distribution-label {
    font-weight: 600;
    color: #666;
    min-width: 40px;
}

.distribution-bar {
    flex: 1;
    height: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
}

.distribution-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    transition: width 0.3s ease;
}

.distribution-count {
    font-size: 0.85rem;
    color: #999;
    min-width: 80px;
    text-align: right;
}

/* Pas d'avis encore */
.no-reviews-yet {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.no-reviews-yet i {
    color: #ddd;
    margin-bottom: 1rem;
}

.review-summary-cta {
    margin-top: 2rem;
}

/* ============================================
   REVIEW LIST (Liste des avis)
============================================ */

.reviews-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.reviews-count {
    font-size: 1.1rem;
}

.reviews-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reviews-sort label {
    margin: 0;
    font-weight: 600;
    color: #666;
}

/* Single Review Item */
.kidzup-review-item {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.kidzup-review-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.review-author {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.review-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.review-author-info .author-name {
    display: block;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.review-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #999;
}

.review-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.review-rating .kidzup-stars {
    font-size: 1.25rem;
    color: #FFD700;
}

/* Contenu de l'avis */
.review-content {
    margin-bottom: 1.5rem;
}

.review-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.review-text {
    color: #666;
    line-height: 1.7;
    font-size: 1rem;
}

/* Photos de l'avis */
.review-photos {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.review-photo-link {
    display: block;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.review-photo-link:hover {
    transform: scale(1.05);
}

.review-photo-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Footer de l'avis */
.review-footer {
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.review-actions {
    display: flex;
    gap: 1rem;
}

.btn-helpful,
.btn-report {
    background: transparent;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-helpful:hover {
    background: #0cc0df;
    border-color: #0cc0df;
    color: white;
}

.btn-report:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-helpful i,
.btn-report i {
    margin-right: 0.25rem;
}

/* Réponse propriétaire */
.review-response {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-left: 4px solid #0cc0df;
    border-radius: 8px;
}

.response-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #0cc0df;
}

.response-date {
    font-size: 0.85rem;
    color: #999;
    font-weight: normal;
    margin-left: auto;
}

.response-content {
    color: #666;
    line-height: 1.6;
}

/* No reviews message */
.no-reviews-message {
    text-align: center;
    padding: 4rem 2rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.no-reviews-message i {
    color: #ddd;
    margin-bottom: 1rem;
}

/* Pending reviews */
.pending-review {
    position: relative;
    opacity: 0.8;
}

.pending-review::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px dashed #ffc107;
    border-radius: 12px;
    pointer-events: none;
}

.pending-review .alert {
    border-radius: 8px;
    font-size: 0.9rem;
}

/* ============================================
   LAZY LOADING
============================================ */

.lazy-loader, .lazy-loader-list {
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.lazy-loader .spinner-border {
    width: 2rem;
    height: 2rem;
}

.no-more-posts {
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   REVIEW FORM (Formulaire)
============================================ */

.kidzup-review-form-wrapper {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.review-form-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.review-form-title i {
    color: #0cc0df;
    margin-right: 0.5rem;
}

/* Messages */
.review-message-success,
.review-message-error {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.review-message-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    font-weight: 600;
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.review-message-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Star rating input */
.star-rating-input {
    font-size: 2.5rem;
    color: #ddd;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.star-rating-input i {
    transition: all 0.2s ease;
}

.star-rating-input i:hover,
.star-rating-input i.fas {
    color: #FFD700;
}

/* Form groups */
.kidzup-review-form .form-group {
    margin-bottom: 1.5rem;
}

.kidzup-review-form label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    display: block;
}

.kidzup-review-form label.required::after {
    content: ' *';
    color: #dc3545;
}

.optional-label {
    font-weight: normal;
    color: #999;
    font-size: 0.9rem;
}

.kidzup-review-form .form-control,
.kidzup-review-form .form-control-file {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.kidzup-review-form .form-control:focus {
    border-color: #0cc0df;
    box-shadow: 0 0 0 3px rgba(12, 192, 223, 0.1);
    outline: none;
}

.kidzup-review-form textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.character-count {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.min-char-warning {
    color: #dc3545;
    font-weight: 600;
}

/* Submit button */
.kidzup-review-form button[type="submit"] {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: #0cc0df;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.kidzup-review-form button[type="submit"]:hover {
    background: #0aa8c4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(12, 192, 223, 0.3);
}

.kidzup-review-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-note {
    text-align: center;
    color: #999;
}

/* ============================================
   RESPONSIVE
============================================ */

@media (max-width: 991px) {
    .kidzup-review-summary {
        position: static;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .review-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .review-author {
        width: 100%;
    }
    
    .reviews-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .review-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .star-rating-input {
        font-size: 2rem;
    }
    
    .summary-rating .rating-number {
        font-size: 3rem;
    }
}
