/* Modern Minimalist Reviews Section */
.reviews-section {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
.reviews-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.reviews-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.reviews-count {
    background: #f5f5f5;
    color: #666;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Rating Statistics */
.reviews-stats {
    background: #fafafa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.rating-distribution {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rating-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rating-icon {
    width: 32px;
    height: 32px;
    position: relative;
    flex-shrink: 0;
}

.rating-icon svg {
    width: 100%;
    height: 100%;
}

.rating-icon.skeptical svg {
    fill: #ffb9b9;
}

.rating-icon.liked svg {
    fill: #f5ce2a;
}

.rating-icon.recommended svg {
    fill: #4ad145;
}

.rating-icon .thumbs-up {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    padding: 2px;
}

.rating-label {
    font-weight: 500;
    color: #333;
    min-width: 100px;
}

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

.rating-fill {
    height: 100%;
    background: #78c499;
    transition: width 0.3s ease;
}

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

/* Review Form */
.review-form {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.review-form h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 1.5rem 0;
}

/* Rating Selection */
.rating-selection {
    margin-bottom: 1.5rem;
}

.rating-selection label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 1rem;
}

.rating-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Wide screens: horizontal layout */
@media (min-width: 768px) {
    .rating-options {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        justify-content: space-between;
    }

    .rating-option {
        flex: 1;
        min-width: 0;
        justify-content: flex-start;
        text-align: left;
        flex-direction: row;
        align-items: center;
    }

    .rating-option .rating-icon {
        order: 1;
        margin-right: 0.75rem;
    }

    .rating-option span {
        order: 2;
        text-align: left;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Adjust padding for horizontal layout */
    .rating-option {
        padding: 1rem;
        gap: 0.75rem;
    }
}

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

.rating-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    flex-direction: row;
}

.rating-option .rating-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    float: left;
}

.rating-option span {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    flex: 1;
    order: 2;
    margin-left: 0.5rem;
}

.rating-options input[type="radio"]:checked + .rating-option {
    border-color: #667eea;
    background: #f8f9ff;
}

.rating-options input[type="radio"]:checked + .rating-option.skeptical {
    border-color: #ffb9a4;
    background: #fff5f56e;
}

.rating-options input[type="radio"]:checked + .rating-option.liked {
    border-color: #ffce59;
    background: #fffdf0;
}

.rating-options input[type="radio"]:checked + .rating-option.recommended {
    border-color: #66b364;
    background: #fcfffa;
}

/* Comment Field */
.comment-field {
    margin-bottom: 1.5rem;
}

.comment-field label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.comment-field textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.comment-field textarea:focus {
    outline: none;
    border-color: #a8a8a8;
    box-shadow: 0 5px 11px 9px rgba(130, 130, 130, 0.1);
}

.comment-field textarea::placeholder {
    color: #999;
}

/* Submit Button */
.submit-btn {
    background: #fafff6;
    color: #111827;
    border: 2px solid #729574;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.submit-btn:hover {
    background: #efffe4;
    border-color: #5e7360;
    color: #111827;
}

.submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Already Reviewed */
.already-reviewed {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #feffff;
    border: 1px solid #b6b6b6;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.already-reviewed .icon {
    width: 24px;
    height: 24px;
    background: #0caa1d;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.already-reviewed p {
    margin: 0;
    color: #404040;
    font-weight: 500;
}

/* Auth Prompt */
.auth-prompt {
    text-align: center;
    padding: 3rem 2rem;
    background: #fafafa;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.auth-prompt .icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    opacity: 0.3;
}

.auth-prompt h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
}

.auth-prompt p {
    color: #666;
    margin: 0 0 1.5rem 0;
}

/* Reviews List */
.reviews-list {
    margin-top: 2rem;
}

.review-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}



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

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
    border: 2px solid black;
}

.user-details h5 {
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}

.review-date {
    color: #666;
    font-size: 0.875rem;
}

.review-rating .rating-badge {
    width: 32px;
    height: 32px;
    position: relative;
}

/* Rating positioned to the right */
.rating-right {
    margin-left: auto;
    flex-shrink: 0;
}

.rating-badge svg {
    width: 100%;
    height: 100%;
}

.rating-badge.skeptical svg {
    color: #ff6b6b;
}

.rating-badge.liked svg {
    color: #4ecdc4;
}

.rating-badge.recommended svg {
    color: #45b7d1;
}

.rating-badge .thumbs-up {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    padding: 2px;
}

.review-content p {
    color: #333;
    line-height: 1.6;
    margin: 0;
    font-size: 1rem;
}

/* No Reviews */
.no-reviews {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-reviews .icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    opacity: 0.3;
}

.no-reviews h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
}

.no-reviews p {
    margin: 0;
}

/* Error Messages */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Responsive Design */
@media (max-width: 767px) {
    .reviews-section {
        margin: 2rem auto;
        padding: 0 0.5rem;
    }

    .rating-options {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem;
    }

    .rating-option {
        padding: 0.875rem 1rem;
    }

    .rating-option .rating-icon {
        width: 28px;
        height: 28px;
    }

    .rating-option span {
        font-size: 0.9rem;
        margin-left: 0.5rem;
    }

    .rating-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .rating-label {
        min-width: auto;
    }

    .review-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 1rem;
    }

    .rating-right {
        margin-left: auto;
        flex-shrink: 0;
        align-self: flex-start;
    }

    .review-form,
    .auth-prompt {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .rating-options {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem;
    }

    .rating-option {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .rating-option .rating-icon {
        width: 24px;
        height: 24px;
    }

    .rating-option span {
        font-size: 0.875rem;
        margin-left: 0.5rem;
    }
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.load-more-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.load-more-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.load-more-btn .btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.load-more-btn .spinner {
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Review Item Animation */
.review-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth appearance for new reviews */
.reviews-list .review-item:nth-child(n+6) {
    animation-delay: 0.1s;
}

.reviews-list .review-item:nth-child(n+7) {
    animation-delay: 0.2s;
}

.reviews-list .review-item:nth-child(n+8) {
    animation-delay: 0.3s;
}

.reviews-list .review-item:nth-child(n+9) {
    animation-delay: 0.4s;
}

.reviews-list .review-item:nth-child(n+10) {
    animation-delay: 0.5s;
}

@media (max-width: 480px) {
    .reviews-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .rating-distribution {
        gap: 0.75rem;
    }

    .rating-item {
        font-size: 0.875rem;
    }

    .review-header {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
    }

    .rating-right {
        margin-left: auto !important;
        flex-shrink: 0 !important;
    }
}
