/* Review System Styles - Enhanced Mobile Responsive */

/* Star Rating Styles */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 2px;
    margin: 10px 0;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating label {
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease-in-out;
    padding: 2px;
}

.star-rating label:before {
    content: '★';
}

.star-rating input[type="radio"]:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #ffc107;
}

.star-rating input[type="radio"]:checked ~ label {
    color: #ffc107;
}

/* Review Display Styles */
.review-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.review-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}

.review-rating .stars {
    color: #ffc107;
    font-size: 1.1rem;
}

.review-rating .rating-text {
    font-size: 0.9rem;
    color: #6c757d;
    margin-left: 5px;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.review-author-name {
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
}

.review-date {
    color: #6c757d;
    font-size: 0.85rem;
}

.review-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.review-text {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 10px;
}

.review-images {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.review-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

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

.admin-response {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 15px;
    margin-top: 15px;
    border-radius: 0 8px 8px 0;
}

.admin-response-title {
    font-weight: 600;
    color: #007bff;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.admin-response-text {
    color: #495057;
    line-height: 1.5;
    margin: 0;
}

/* Review Modal Enhancements */
.review-modal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.review-modal .modal-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
}

.review-modal .modal-title {
    font-weight: 600;
}

.review-modal .btn-close {
    filter: invert(1);
}

.image-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.2s ease;
    cursor: pointer;
}

.image-upload-area:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.image-upload-area.dragover {
    border-color: #007bff;
    background: #e3f2fd;
}

.image-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.image-preview img {
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .star-rating {
        justify-content: center;
    }
    
    .star-rating label {
        font-size: 1.8rem;
        padding: 5px;
    }
    
    .review-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .review-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .review-author {
        width: 100%;
    }
    
    .review-images {
        justify-content: center;
    }
    
    .review-image {
        width: 60px;
        height: 60px;
    }
    
    .image-upload-area {
        padding: 15px;
    }
    
    .admin-response {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .star-rating label {
        font-size: 2rem;
        padding: 8px;
    }
    
    .review-card {
        padding: 0.75rem;
        border-radius: 8px;
    }
    
    .review-title {
        font-size: 1rem;
    }
    
    .review-text {
        font-size: 0.9rem;
    }
    
    .review-image {
        width: 50px;
        height: 50px;
    }
    
    .image-preview img {
        width: 60px !important;
        height: 60px !important;
    }
}

/* Loading States */
.review-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: #6c757d;
}

.review-loading .spinner-border {
    margin-right: 0.5rem;
}

/* Empty State */
.no-reviews {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.no-reviews i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

.no-reviews h5 {
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Button Enhancements */
.btn-review {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-review:hover {
    background: linear-gradient(135deg, #20c997, #28a745);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    color: white;
}

.btn-review:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Animation for new reviews */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-card.new-review {
    animation: slideInUp 0.5s ease-out;
}

/* Improved form styling */
.form-floating label {
    color: #6c757d;
}

.form-floating .form-control:focus ~ label {
    color: #007bff;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Success states */
.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 1px solid #b8dacc;
    border-radius: 8px;
}

/* Error states */
.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f1aeb5);
    border: 1px solid #f1aeb5;
    border-radius: 8px;
}
