/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Customer Reviews Section */
.customer-reviews {
    margin: 48px 0;
}

/* Reviews Header */
.reviews-header {
    margin-bottom: 24px;
}

.reviews-header h2 {
    font-size: 32px;
    font-weight: bold;
    color: #374151;
    font-family: 'Times New Roman', serif;
}

/* Rating Summary */
.rating-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    border-bottom: 1px solid #374151;
    padding-bottom: 24px;
    margin-bottom: 24px;
}

/* Rating Breakdown */
.rating-breakdown h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 16px;
    color: #374151;
}

.snapshot-note {
    font-size: 14px;
    margin-bottom: 16px;
    color: #666;
}

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: none;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.rating-filter:hover {
    background-color: #f9fafb;
}

.star-label {
    font-size: 14px;
    white-space: nowrap;
    min-width: 50px;
    color: #374151;
}

.bar-container {
    flex: 1;
    background-color: #e5e7eb;
    height: 16px;
    border-radius: 8px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background-color: #374151;
    transition: width 0.3s ease;
}

.bar-fill.full {
    width: 100%;
}

.bar-fill.empty {
    width: 0%;
}

.count {
    font-size: 14px;
    min-width: 24px;
    text-align: right;
    color: #374151;
}

/* Overall Rating */
.overall-rating h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 16px;
    color: #374151;
}

.rating-display {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.rating-score {
    font-size: 48px;
    font-weight: bold;
    color: #374151;
    line-height: 1;
}

.rating-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #fbbf24;
    font-size: 16px;
    line-height: 1;
}

.review-count {
    font-size: 14px;
    color: #374151;
}

/* Review Filters */
.review-filters {
    margin-bottom: 24px;
}

.review-filters h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 16px;
    color: #374151;
}

/* Search Reviews */
.search-reviews {
    margin-bottom: 16px;
}

.search-box {
    position: relative;
    max-width: 400px;
}

#review-search {
    width: 100%;
    padding: 8px 40px 8px 16px;
    border: 1px solid rgba(107, 114, 128, 0.6);
    border-radius: 4px;
    font-size: 14px;
}

#review-search:focus {
    outline: none;
    border-color: #374151;
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.search-icon {
    font-size: 16px;
    color: #666;
}

/* Filter Options */
.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-dropdown {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-dropdown label {
    font-size: 12px;
    color: #666;
    display: none;
}

.filter-dropdown select {
    padding: 8px 16px;
    border: 1px solid rgba(107, 114, 128, 0.6);
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

.filter-dropdown select:focus {
    outline: none;
    border-color: #374151;
}

/* Review List */
.review-list {
    width: 100%;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.review-range {
    font-size: 14px;
    color: #374151;
}

.sort-dropdown label {
    display: none;
}

#review-sort {
    padding: 8px 16px;
    border: 1px solid #737373;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

#review-sort:focus {
    outline: none;
    border-color: #374151;
}

/* Review Item */
.review-item {
    border-bottom: 1px solid #d6d3d1;
    padding: 24px 0;
}

.review-header-info {
    margin-bottom: 16px;
}

.review-header-info .stars {
    margin-bottom: 8px;
}

.review-header-info .stars .star {
    font-size: 16px;
    color: #fbbf24;
}

.review-location {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 4px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.reviewer-name {
    font-weight: bold;
    color: #374151;
}

.review-date {
    color: #6b7280;
}

/* Review Content */
.review-content {
    margin-bottom: 16px;
}

.review-content p {
    font-size: 16px;
    line-height: 1.5;
    color: #374151;
}

/* Review Actions */
.review-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.helpful-label {
    font-size: 14px;
    color: #374151;
}

.helpful-btn,
.not-helpful-btn,
.report-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    padding: 0;
    transition: color 0.3s ease;
}

.helpful-btn:hover,
.not-helpful-btn:hover,
.report-btn:hover {
    color: #111827;
}

.thumbs-up,
.thumbs-down {
    font-size: 16px;
}

.action-count {
    font-size: 14px;
}

.report-btn {
    margin-left: 16px;
}

/* Responsive Design */
@media (min-width: 768px) {
    .rating-summary {
        grid-template-columns: 2fr 1fr;
        gap: 48px;
    }
    
    .review-filters h3 {
        margin-bottom: 24px;
    }
    
    .filter-options {
        gap: 24px;
    }
    
    .review-item {
        padding: 24px 0;
    }
}

@media (max-width: 767px) {
    .customer-reviews {
        margin: 32px 0;
        padding: 0 16px;
    }
    
    .reviews-header h2 {
        font-size: 24px;
    }
    
    .rating-summary {
        gap: 24px;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    
    .rating-score {
        font-size: 36px;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .review-actions {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .report-btn {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .customer-reviews {
        margin: 24px 0;
    }
    
    .reviews-header h2 {
        font-size: 20px;
    }
    
    .rating-breakdown h3,
    .overall-rating h3,
    .review-filters h3 {
        font-size: 16px;
    }
    
    .rating-filter {
        padding: 6px;
        gap: 8px;
    }
    
    .star-label {
        font-size: 12px;
        min-width: 40px;
    }
    
    .count {
        font-size: 12px;
        min-width: 20px;
    }
    
    .rating-score {
        font-size: 32px;
    }
    
    .star {
        font-size: 14px;
    }
    
    .filter-options {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-dropdown select {
        width: 100%;
    }
    
    .review-content p {
        font-size: 14px;
    }
    
    .helpful-label,
    .helpful-btn,
    .not-helpful-btn,
    .report-btn {
        font-size: 13px;
    }
}

/* For extra large screens */
@media (min-width: 1200px) {
    .customer-reviews {
        max-width: 1200px;
        margin: 48px auto;
    }
}

/* Rating filter hover effects */
.rating-filter:hover .bar-fill {
    background-color: #4b5563;
}

.rating-filter:hover .star-label,
.rating-filter:hover .count {
    color: #111827;
}

/* Focus states for accessibility */
button:focus,
select:focus,
input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Active states */
.rating-filter:active {
    background-color: #e5e7eb;
}

.helpful-btn:active,
.not-helpful-btn:active {
    transform: scale(0.95);
}