/* Enhanced Comments and Reviews Section Styles */
.rating-summary-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #f1f3f4;
    height: fit-content;
}

.rating-summary-header h5 {
    margin: 0;
    font-weight: 700;
    color: var(--dark);
}

.overall-rating-display {
    text-align: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid #f1f3f4;
    margin-bottom: 1.5rem;
}

.rating-score-large {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.rating-stars-large {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    font-size: 1.5rem;
}

.rating-count-text {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.rating-breakdown-section,
.category-ratings-section {
    margin-bottom: 1.5rem;
}

.rating-breakdown-section h6,
.category-ratings-section h6 {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rating-breakdown-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.breakdown-label {
    width: 60px;
    color: var(--secondary);
    font-weight: 600;
}

.breakdown-bar-container {
    flex: 1;
    margin: 0 0.75rem;
}

.breakdown-bar {
    height: 6px;
    background: #f1f3f4;
    border-radius: 3px;
    overflow: hidden;
}

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

.breakdown-count {
    width: 25px;
    text-align: right;
    color: var(--secondary);
    font-weight: 600;
}

.category-rating-row {
    margin-bottom: 1rem;
}

.category-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.category-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.85rem;
}

.category-score {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
}

.category-bar-container {
    width: 100%;
}

.category-bar {
    height: 8px;
    background: #f1f3f4;
    border-radius: 4px;
    overflow: hidden;
}

.category-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width 0.3s ease;
}

/* Modern Review Form */
.review-form-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #f1f3f4;
    overflow: hidden;
}

.review-form-header {
    padding: 2rem 2rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e9ecef 100%);
    border-bottom: 1px solid #f1f3f4;
}

.review-form-header h5 {
    margin: 0 0 0.5rem;
    font-weight: 700;
    color: var(--dark);
}

.review-form-body {
    padding: 2rem;
}

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

.form-label-modern {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.required {
    color: var(--danger);
}

.form-control-modern,
.form-select-modern,
.form-textarea-modern {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control-modern:focus,
.form-select-modern:focus,
.form-textarea-modern:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.rating-input-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-stars-input-modern {
    display: flex;
    gap: 0.25rem;
}

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

.rating-star-modern:hover {
    color: #ffc107;
    transform: scale(1.1);
}

.rating-text {
    font-size: 0.8rem;
    color: var(--secondary);
    font-style: italic;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--secondary);
    margin-top: 0.5rem;
}

.btn-submit-modern {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.3);
}

.btn-submit-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
}

/* Modern Comments Section */
.comments-section-modern {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #f1f3f4;
}

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

.comments-title {
    margin: 0;
    font-weight: 700;
    color: var(--dark);
}

.comments-count {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.comment-item-modern {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.comment-item-modern:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.comment-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

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

.author-avatar-modern {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.author-info-modern {
    flex: 1;
}

.author-name-modern {
    margin: 0 0 0.25rem;
    font-weight: 700;
    color: var(--dark);
    font-size: 1rem;
}

.author-meta-modern {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-type-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

.comment-date-modern {
    color: var(--secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

.comment-rating-modern {
    text-align: right;
}

.rating-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.rating-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.rating-stars-small {
    display: flex;
    gap: 0.125rem;
    font-size: 0.8rem;
}

.comment-content-modern {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--dark);
}

.comment-content-modern p {
    margin: 0;
}

/* Enhanced detailed ratings styles */
.detailed-ratings {
    background: white;
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-top: 1rem;
}

.rating-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
}

.rating-item:last-child {
    margin-bottom: 0;
}

.rating-label {
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 600;
    min-width: 120px;
}

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

.rating-stars-display {
    display: flex;
    gap: 0.125rem;
}

.rating-stars-display.small {
    font-size: 0.8rem;
}

.rating-number {
    font-size: 0.75rem;
    color: var(--secondary);
    font-weight: 600;
    background: #f1f3f4;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.comment-actions-modern {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.action-btn-modern {
    background: none;
    border: 1px solid #e9ecef;
    color: var(--secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.action-btn-modern:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Reply Form Modern */
.reply-form-modern {
    margin-top: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 1rem;
}

.reply-form-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-reply-submit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-reply-cancel {
    background: none;
    border: 1px solid #e9ecef;
    color: var(--secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

/* Replies Section */
.replies-section-modern {
    margin-left: 3rem;
    margin-top: 1rem;
    border-left: 3px solid #e9ecef;
    padding-left: 1rem;
}

.reply-item-modern {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #f1f3f4;
}

.reply-header-modern {
    margin-bottom: 0.75rem;
}

.reply-author-modern {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reply-avatar-modern {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), #6b7280);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.reply-name-modern {
    margin: 0;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.reply-date-modern {
    color: var(--secondary);
    font-size: 0.75rem;
}

.reply-content-modern p {
    margin: 0;
    color: var(--dark);
    font-size: 0.9rem;
    line-height: 1.5;
}

.empty-reviews {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--secondary);
}

.empty-reviews-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-reviews h5 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .rating-summary-card,
    .review-form-card,
    .comments-section-modern {
        padding: 1.5rem;
    }
    
    .comment-header-modern {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .comment-rating-modern {
        align-self: flex-start;
    }
    
    .rating-display {
        flex-direction: row;
        align-items: center;
    }
    
    .comment-actions-modern {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .replies-section-modern {
        margin-left: 1rem;
        padding-left: 0.75rem;
    }
    
    .rating-score-large {
        font-size: 3rem;
    }
    
    .rating-stars-large {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .rating-summary-card,
    .review-form-card,
    .comments-section-modern {
        padding: 1rem;
    }
    
    .rating-score-large {
        font-size: 2.5rem;
    }
    
    .rating-stars-input-modern {
        justify-content: center;
    }
    
    .rating-star-modern {
        font-size: 1.5rem;
    }
}
