/**
 * REVIEWS & RATINGS SYSTEM - COMPLETE STYLES
 * Comprehensive styling for all review components
 */

/* ============================================================================
   STAR RATING DISPLAY
   ============================================================================ */

.stars-large {
    font-size: 1.5rem;
    color: #ffc107;
}

.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.star-rating i {
    color: #ffc107;
}

.star-rating.star-sm {
    font-size: 0.9rem;
}

.star-rating.star-md {
    font-size: 1.1rem;
}

.star-rating.star-lg {
    font-size: 1.5rem;
}

.star-rating .rating-value {
    color: #333;
    font-weight: 500;
    margin-left: 8px;
}

/* ============================================================================
   RATING SUMMARY CARD
   ============================================================================ */

.rating-summary-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

.rating-summary-card h2 {
    color: #333;
    font-weight: bold;
}

/* ============================================================================
   RATING BREAKDOWN
   ============================================================================ */

.rating-breakdown {
    padding: 20px;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rating-label {
    min-width: 60px;
    font-weight: 500;
}

.rating-bar {
    flex: 1;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%);
    transition: width 0.5s ease;
    border-radius: 10px;
}

.rating-count {
    min-width: 40px;
    text-align: right;
    font-weight: 500;
    color: #666;
}

/* ============================================================================
   REVIEWS FILTERS
   ============================================================================ */

.reviews-filters {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.reviews-filters .btn-group .btn {
    border-color: #dee2e6;
}

.reviews-filters .btn-group .btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* ============================================================================
   REVIEW CARD
   ============================================================================ */

.review-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.review-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.review-header {
    margin-bottom: 15px;
}

.review-stars {
    color: #ffc107;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.review-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.review-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.reviewer-name {
    font-weight: 500;
}

.verified-badge {
    background: #007bff;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.review-date {
    color: #999;
}

.review-content {
    margin-bottom: 15px;
    line-height: 1.6;
}

.review-content p {
    margin: 0;
    color: #555;
}

/* ============================================================================
   REVIEW ACTIONS (Helpful/Not Helpful Buttons)
   ============================================================================ */

.review-actions {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.btn-helpful,
.btn-not-helpful {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #495057;
}

.btn-helpful:hover:not(:disabled) {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.btn-not-helpful:hover:not(:disabled) {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.btn-helpful:disabled,
.btn-not-helpful:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-helpful.voted,
.btn-not-helpful.voted {
    background: #e0e0e0;
    cursor: not-allowed;
}

/* ============================================================================
   STORE RESPONSE
   ============================================================================ */

.store-response {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px;
    margin-top: 15px;
    border-radius: 6px;
}

.response-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 10px;
}

.response-header strong {
    color: #1976d2;
}

.store-response p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

/* ============================================================================
   NO REVIEWS STATE
   ============================================================================ */

.no-reviews {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 60px 20px;
}

.no-reviews i {
    display: block;
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.no-reviews h4 {
    color: #666;
    margin-bottom: 10px;
}

/* ============================================================================
   REVIEW FORM
   ============================================================================ */

.review-form-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.star-rating-selector {
    display: flex;
    gap: 10px;
    font-size: 2.5rem;
    margin: 20px 0;
}

.star-rating-selector i {
    cursor: pointer;
    transition: all 0.2s;
    color: #ddd;
}

.star-rating-selector i:hover,
.star-rating-selector i.active {
    color: #ffc107;
    transform: scale(1.1);
}

.char-counter {
    font-size: 0.85rem;
    color: #666;
    text-align: right;
    margin-top: 5px;
}

.guidelines-box {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.guidelines-box h6 {
    color: #1976d2;
    margin-bottom: 10px;
}

.guidelines-box ul {
    margin: 0;
    padding-left: 20px;
}

/* ============================================================================
   MY REVIEWS PAGE
   ============================================================================ */

.my-review-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #e0e0e0;
    transition: all 0.3s;
}

.my-review-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.my-review-card.pending {
    border-left-color: #ffc107;
}

.my-review-card.approved {
    border-left-color: #28a745;
}

.my-review-card.rejected {
    border-left-color: #dc3545;
}

.product-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.review-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #666;
    font-size: 0.9rem;
}

.store-response-box {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
    margin-top: 15px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

/* ============================================================================
   ADMIN REVIEWS DASHBOARD
   ============================================================================ */

.stats-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    text-align: center;
    transition: transform 0.2s;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stats-card h3 {
    font-size: 2rem;
    margin: 10px 0;
    color: #333;
}

.stats-card p {
    margin: 0;
    color: #666;
}

.filter-box {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

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

@media (max-width: 768px) {
    .rating-summary-card h2 {
        font-size: 2rem;
    }
    
    .stars-large {
        font-size: 1.2rem;
    }
    
    .review-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .review-actions {
        flex-direction: column;
    }
    
    .btn-helpful,
    .btn-not-helpful {
        width: 100%;
    }
    
    .star-rating-selector {
        font-size: 2rem;
    }
    
    .reviews-filters .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .reviews-filters .btn-group .btn {
        width: 100%;
    }
    
    .product-thumb {
        width: 60px;
        height: 60px;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .review-actions,
    .reviews-filters,
    .btn,
    button {
        display: none !important;
    }
    
    .review-card {
        page-break-inside: avoid;
    }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

.star-rating-selector i:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.btn-helpful:focus,
.btn-not-helpful:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .review-card {
        border: 2px solid #000;
    }
    
    .rating-bar {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .review-card,
    .stats-card,
    .btn-helpful,
    .btn-not-helpful,
    .star-rating-selector i {
        transition: none;
    }
}
