/* Review System Styles */

.reviews-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #e5e7eb;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.reviews-header h2 {
    margin: 0;
    color: #1f2937;
}

.write-review-btn {
    background: #3b82f6;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.write-review-btn:hover {
    background: #2563eb;
}

/* Review Stats */
.review-stats {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    background: #f9fafb;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.rating-summary {
    text-align: center;
}

.avg-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.rating-number {
    font-size: 4em;
    font-weight: bold;
    color: #1f2937;
}

.stars {
    font-size: 1.5em;
}

.review-count {
    color: #6b7280;
    font-size: 0.95em;
}

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.rating-label {
    min-width: 50px;
    font-size: 0.9em;
    color: #4b5563;
}

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

.rating-bar-fill {
    height: 100%;
    background: #fbbf24;
    transition: width 0.3s;
}

.rating-count {
    min-width: 30px;
    text-align: right;
    font-size: 0.9em;
    color: #6b7280;
}

/* Review Controls */
.review-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.review-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-sort label {
    font-weight: 500;
    color: #4b5563;
}

.review-sort select {
    padding: 8px 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    cursor: pointer;
}

/* Review Cards */
.review-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    transition: box-shadow 0.3s;
}

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

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

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

.review-author strong {
    color: #1f2937;
    font-size: 1.05em;
}

.verified-badge {
    background: #10b981;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
}

.review-rating {
    font-size: 1.2em;
}

.review-date {
    color: #6b7280;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.review-title {
    color: #1f2937;
    margin: 10px 0;
    font-size: 1.1em;
}

.review-text {
    color: #4b5563;
    line-height: 1.6;
    margin: 15px 0;
}

.research-tag {
    background: #eff6ff;
    color: #3b82f6;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.9em;
    margin: 15px 0;
    display: inline-block;
}

.review-footer {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f3f4f6;
}

.helpful-btn {
    background: #f3f4f6;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    color: #4b5563;
    transition: all 0.3s;
}

.helpful-btn:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.no-reviews {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 1.1em;
}

/* Review Form */
.review-form-container {
    background: #f9fafb;
    padding: 40px;
    border-radius: 12px;
    margin-top: 40px;
    display: none;
}

.review-form-container.active {
    display: block;
}

.review-form-container h3 {
    margin-top: 0;
    color: #1f2937;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.rating-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.rating-input input[type="radio"] {
    width: auto;
    margin: 0;
}

.rating-input label {
    margin: 0;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 15px;
}

.submit-review-btn {
    background: #3b82f6;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-review-btn:hover {
    background: #2563eb;
}

.cancel-review-btn {
    background: #e5e7eb;
    color: #4b5563;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.cancel-review-btn:hover {
    background: #d1d5db;
}

/* Responsive */
@media (max-width: 768px) {
    .review-stats {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .reviews-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .review-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .review-header {
        flex-direction: column;
        gap: 10px;
    }

    .review-form-container {
        padding: 25px;
    }

    .form-actions {
        flex-direction: column;
    }

    .submit-review-btn,
    .cancel-review-btn {
        width: 100%;
    }
}