/* AI Recipe Generator - Styles pour les avis (Version Sombre et Élégante) */

:root {
    --reviews-bg: #2c3e50;
    --reviews-text: #ffffff;
    --reviews-accent: #f39c12;
    --reviews-secondary: #34495e;
    --reviews-light-bg: #ecf0f1;
    --reviews-border: #bdc3c7;
}

.air-reviews-widget {
    background: var(--reviews-light-bg);
    border: 1px solid var(--reviews-border);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.15);
    font-size: 14px;
    min-font-size: 14px;
}

.air-reviews-stats {
    margin-bottom: 2rem;
}

.air-rating-summary {
    text-align: center;
    margin-bottom: 2rem;
}

.air-average-rating {
    display: inline-block;
}

.air-rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--reviews-accent);
    display: block;
    line-height: 1;
}

.air-stars-display {
    margin: 0.5rem 0;
}

.air-star {
    font-size: 1.5rem;
    color: #d1d5db;
}

.air-star.filled {
    color: var(--reviews-accent);
}

.air-total-reviews {
    display: block;
    color: var(--reviews-bg);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.air-rating-breakdown {
    max-width: 400px;
    margin: 0 auto;
}

.air-rating-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.air-rating-label {
    font-size: 0.9rem;
    color: var(--reviews-bg);
    width: 30px;
    text-align: right;
    font-weight: 600;
}

.air-rating-bar-bg {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.air-rating-bar-fill {
    height: 100%;
    background: var(--reviews-accent);
    transition: width 0.3s ease;
}

.air-rating-count {
    font-size: 0.85rem;
    color: var(--reviews-bg);
    width: 30px;
    font-weight: 500;
}

.air-recent-reviews {
    margin: 2rem 0;
}

.air-recent-reviews h4 {
    color: var(--reviews-bg);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.air-review-item {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.air-review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.air-review-author {
    font-weight: 600;
    color: var(--reviews-bg);
}

.air-review-rating .air-star {
    font-size: 1rem;
}

.air-review-date {
    color: #6b7280;
    font-size: 0.85rem;
    margin-left: auto;
}

.air-review-comment {
    color: var(--reviews-bg);
    line-height: 1.6;
    font-style: italic;
    font-weight: 500;
}

.air-add-review-section {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.air-add-review-btn {
    background: linear-gradient(135deg, var(--reviews-bg), var(--reviews-secondary));
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.3);
}

.air-add-review-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.4);
}

/* Formulaire d'ajout d'avis */
.air-review-form {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: none;
}

.air-review-form.active {
    display: block;
    animation: slideIn 0.3s ease-out;
}

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

.air-form-group {
    margin-bottom: 1.5rem;
}

.air-form-label {
    display: block;
    font-weight: 600;
    color: var(--reviews-bg);
    margin-bottom: 0.5rem;
}

.air-form-input,
.air-form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.air-form-input:focus,
.air-form-textarea:focus {
    outline: none;
    border-color: var(--reviews-accent);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.air-form-textarea {
    min-height: 100px;
    resize: vertical;
}

.air-rating-input {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.air-rating-star {
    font-size: 2rem;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.2s ease;
}

.air-rating-star:hover,
.air-rating-star.selected {
    color: var(--reviews-accent);
}

.air-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.air-form-submit,
.air-form-cancel {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.air-form-submit {
    background: #10b981;
    color: white;
    border: none;
}

.air-form-submit:hover {
    background: #059669;
}

.air-form-cancel {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.air-form-cancel:hover {
    background: #e5e7eb;
}

/* Responsive */
@media (max-width: 768px) {
    .air-reviews-widget {
        padding: 1.5rem;
    }
    
    .air-rating-breakdown {
        max-width: none;
    }
    
    .air-review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .air-review-date {
        margin-left: 0;
        align-self: flex-end;
    }
    
    .air-review-form {
        padding: 1.5rem;
    }
    
    .air-form-actions {
        flex-direction: column;
    }
    
    .air-form-submit,
    .air-form-cancel {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .air-reviews-widget {
        padding: 1rem;
    }
    
    .air-rating-number {
        font-size: 2.5rem;
    }
    
    .air-review-item {
        padding: 1rem;
    }
    
    .air-rating-input {
        justify-content: center;
    }
    
    .air-rating-star {
        font-size: 1.5rem;
    }
}

/* Animations d'entrée */
.air-review-item {
    animation: fadeInUp 0.3s ease-out forwards;
}

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

/* État de chargement */
.air-reviews-loading {
    text-align: center;
    color: #6b7280;
    padding: 2rem;
}

.air-reviews-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

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

/* Messages d'état */
.air-reviews-message {
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    text-align: center;
}

.air-reviews-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.air-reviews-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}