.review-progress-container {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
    width: 100%;
}

.review-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
    min-height: 24px;
    flex-wrap: nowrap;
}

.review-stars {
    display: flex;
    gap: 3px;
    font-size: 1.2rem;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.progress-light.review-progress {
    height: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    width: 100%;
}

.progress-light.review-progress .progress-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s ease;
    background-color: #ffc107;
}

.review-percentage {
    font-weight: 500;
    font-size: 1rem;
    padding-left: 8px;
    min-width: 40px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    white-space: nowrap;
}

.stars-col {
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    min-height: 24px;
    z-index: 2;
    flex-wrap: nowrap;
}

.review-progress-col .progress {
    margin: 0;
    height: 10px;
}

.progress.progress-light.review-progress {
    margin: 0;
}

.review-row.row.text-light {
    height: auto;
    margin-bottom: 15px;
    padding: 5px 0;
}

.col-2.percentage-col {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 2;
    flex-wrap: nowrap;
}

.col-3.stars-col,
.col-2.percentage-col {
    margin-top: 0;
}

/* Reviews Container Styles */
#reviewsContainer {
    margin-top: 30px;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Review Stats Container */
.review-stats-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.average-rating {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    text-align: center;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.average-rating .h6 {
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.average-rating .h6 .bi-star-fill {
    font-size: 1.1rem;
}

.reviews-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
    margin-top: 20px;
}

.reviews-list::-webkit-scrollbar {
    width: 6px;
    background-color: rgba(255, 255, 255, 0.05);
}

.reviews-list::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.reviews-list::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.review-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.review-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.review-item .stars {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    gap: 4px;
}

/* User profile image and icon styles */
.user-profile-img {
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    aspect-ratio: 1/1;
    background-color: #333;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.user-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #495057;
    color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.user-icon-fallback {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: #495057;
    color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
}

.user-icon i,
.user-icon-fallback i {
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-item:hover .user-profile-img,
.review-item:hover .user-icon,
.review-item:hover .user-icon-fallback {
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

.review-item p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* New specific styling for review content */
.review-content {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-top: 0.75rem;
    border-left: 3px solid rgba(255, 255, 255, 0.15);
    font-style: italic;
    position: relative;
    max-width: calc(100% - 70px); /* Leave space for side-by-side buttons */
    min-height: 32px; /* Match edit button height for alignment */
    display: flex;
    align-items: center;
}

/* Full width review content when no edit/delete buttons are present */
.review-content.full-width {
    max-width: 100%;
    width: 100%;
    margin-right: 0;
}

.review-content::before {
    content: '"';
    position: absolute;
    top: 0.25rem;
    left: 0.5rem;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.2);
    font-family: serif;
}

.review-content::after {
    content: '"';
    position: absolute;
    bottom: 0;
    right: 0.5rem;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.2);
    font-family: serif;
}

/* Review date styling */
.review-date {
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    max-width: 110px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    line-height: 1;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7) !important; /* Light color that overrides text-muted */
}

/* Review comment container with edit button */
.review-comment-container {
    position: relative;
    width: 100%;
}

/* Review actions container */
.review-actions {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 2px;
    margin-left: 4px;
    position: relative;
    align-self: flex-end;
    margin-bottom: 2px;
}

/* Vertical divider between buttons */
.review-actions::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-50%);
}

.review-edit-btn {
    position: relative;
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0 8px;
    margin-bottom: 2px;
}

.review-edit-btn:hover {
    color: #0d6efd;
    transform: translateY(-2px);
}

.review-edit-btn:active {
    transform: scale(0.95);
}

/* Delete button styling */
.review-delete-btn {
    position: relative;
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0 8px;
    margin-bottom: 2px;
}

.review-delete-btn i {
    font-size: 1rem;
}

.review-delete-btn:hover {
    color: #dc3545;
    transform: translateY(-2px);
}

.review-delete-btn:active {
    transform: scale(0.95);
}

/* Edit form styles */
.review-edit-form {
    width: 100%;
    padding: 0.5rem 0;
    margin-top: 0.75rem;
}

.review-edit-textarea {
    width: 100%;
    min-height: 100px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    padding: 12px;
    font-size: 0.95rem;
    resize: vertical;
    transition: all 0.2s ease;
    margin-bottom: 10px;
}

.review-edit-textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.review-edit-actions {
    display: flex;
    gap: 8px;
    position: absolute;
    bottom: 8px;
    right: 8px;
}

.review-save-btn,
.review-cancel-btn {
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.review-save-btn {
    background: rgba(25, 135, 84, 0.7);
    color: white;
}

.review-save-btn:hover {
    background: rgba(25, 135, 84, 0.9);
    transform: translateY(-2px);
}

.review-save-btn:active {
    transform: translateY(0) scale(0.95);
}

.review-cancel-btn {
    background: rgba(220, 53, 69, 0.7);
    color: white;
}

.review-cancel-btn:hover {
    background: rgba(220, 53, 69, 0.9);
    transform: translateY(-2px);
}

.review-cancel-btn:active {
    transform: translateY(0) scale(0.95);
}

.review-save-btn:disabled,
.review-cancel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Improved empty state styling */
#reviewsContainer .text-muted {
    text-align: center;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 1.1rem;
    border: 1px dashed rgba(255, 255, 255, 0.15);
}

/* Clear section divider */
.review-section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 30px 0;
    width: 100%;
}

/* Responsive behavior */
@media (max-width: 768px) {
    .review-row {
        display: flex;
        flex-wrap: wrap;
        margin-bottom: 15px;
        position: relative;
        min-height: auto;
        gap: 8px;
    }

    .review-stars {
        padding-top: 0;
        font-size: 0.85rem;
    }

    .review-percentage {
        padding-top: 0;
        font-size: 0.85rem;
        padding-left: 10px;
        min-width: 45px;
        text-align: right;
    }

    .review-row .col-3 {
        width: auto !important;
        flex: 0 0 auto !important;
        max-width: fit-content !important;
        padding-right: 0;
        order: 1;
    }

    .review-row .col-7 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 0;
        order: 3;
        margin-top: 8px;
    }

    .review-row .col-2 {
        width: auto !important;
        flex: 0 0 auto !important;
        max-width: fit-content !important;
        padding-left: 10px;
        order: 2;
        margin-left: auto;
    }

    .stars-col {
        width: auto !important;
        min-height: 20px;
        justify-content: flex-start;
        padding-right: 0;
    }

    .percentage-col {
        width: auto !important;
        min-height: 20px;
        justify-content: flex-end;
        padding-left: 0;
        margin-left: auto;
    }

    .review-progress-col {
        display: block !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .progress-light.review-progress {
        height: 8px;
        width: 100% !important;
    }

    /* Hide rating distribution on mobile for seller profile page */
    .rating-distribution-container .review-row .stars-col,
    .rating-distribution-container .review-row .review-progress-col,
    .rating-distribution-container .review-row .percentage-col {
        display: none !important;
    }

    /* Collapse the rating distribution container to remove empty space */
    .rating-distribution-container {
        height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        visibility: hidden !important;
        position: absolute !important;
    }

    /* Adjust the review stats container to be more compact */
    .review-stats-container {
        padding: 0 !important;
        margin-bottom: 0 !important;
        border: none !important;
        min-height: auto !important;
        height: auto !important;
    }

    /* Adjust carousel item height to match only the visible content */
    .carousel-item.active.rating-distribution-slide {
        min-height: auto !important;
        height: auto !important;
    }
}

    /* Improved mobile styling */
    #reviewsContainer {
        padding: 0.75rem;
        margin-top: 20px;
    }

    .average-rating {
        padding: 0.5rem;
    }

    .average-rating .h6 {
        font-size: 0.9rem;
    }

    .average-rating .h6 .bi-star-fill {
        font-size: 0.95rem;
    }

    .review-item {
        padding: 1rem;
    }

    .review-content {
        padding: 0.75rem;
        margin-top: 0.5rem;
        font-size: 0.9rem;
        max-width: calc(100% - 60px); /* Adjusted for side-by-side buttons on mobile */
        min-height: 24px; /* Match smaller button height on mobile */
    }

    .review-content.full-width {
        max-width: 100%;
        width: 100%;
    }

    .review-content::before,
    .review-content::after {
        font-size: 1.2rem;
    }

    .review-date {
        font-size: 0.65rem;
        padding: 0.1rem 0.35rem;
        max-width: 90px;
        height: 16px;
    }

    .review-edit-btn {
        width: 24px;
        height: 24px;
    }

    .review-edit-btn i {
        font-size: 0.85rem;
    }

    .review-edit-textarea {
        min-height: 80px;
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    .review-edit-actions {
        bottom: 6px;
        right: 6px;
    }

    .review-save-btn,
    .review-cancel-btn {
        width: 28px;
        height: 28px;
    }

    .review-delete-btn {
        width: 24px;
        height: 24px;
    }

    .review-delete-btn i {
        font-size: 0.85rem;
    }

    .review-actions {
        gap: 0;
        margin-bottom: 1px;
    }

    .review-actions::before {
        height: 50%;
    }

    .review-edit-btn,
    .review-delete-btn {
        padding: 0 4px;
    }
}

/* Deleting state for review items */
.review-item.deleting {
    transition: all 0.3s ease;
}

/* Animation for remove button */
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Add a container for profile image to handle the fallback better */
.profile-image-container {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Update the review item to use the container */
.review-item .d-flex.align-items-center .profile-image-container + div {
    margin-left: 0;
}

/* Review interaction buttons */
.review-interaction-buttons {
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.review-like-btn,
.review-dislike-btn,
.review-comment-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
}

.review-like-btn {
    background-color: rgba(25, 135, 84, 0.1);
    border-color: rgba(25, 135, 84, 0.3);
}

.review-like-btn:hover {
    background-color: rgba(25, 135, 84, 0.3);
    transform: translateY(-2px);
}

.review-like-btn.active {
    background-color: rgba(25, 135, 84, 0.4);
    color: #fff;
    border-color: rgba(25, 135, 84, 0.6);
}

.review-dislike-btn {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.3);
}

.review-dislike-btn:hover {
    background-color: rgba(220, 53, 69, 0.3);
    transform: translateY(-2px);
}

.review-dislike-btn.active {
    background-color: rgba(220, 53, 69, 0.4);
    color: #fff;
    border-color: rgba(220, 53, 69, 0.6);
}

.review-comment-btn {
    background-color: rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.3);
}

.review-comment-btn:hover {
    background-color: rgba(13, 110, 253, 0.3);
    transform: translateY(-2px);
}

.review-like-btn i,
.review-dislike-btn i,
.review-comment-btn i {
    font-size: 1rem;
}

.review-like-count,
.review-dislike-count,
.review-comment-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #212529;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.review-like-btn.active .review-like-count {
    background-color: #198754;
    color: white;
}

.review-dislike-btn.active .review-dislike-count {
    background-color: #dc3545;
    color: white;
}

.review-comment-btn.active .review-comment-count {
    background-color: #0d6efd;
    color: white;
}

/* Hide interaction buttons during edit mode */
.review-item.editing .review-interaction-buttons {
    display: none;
}

/* Responsive design for interaction buttons */
@media (max-width: 768px) {
    .review-like-btn,
    .review-dislike-btn,
    .review-comment-btn {
        width: 32px;
        height: 32px;
    }

    .review-like-btn i,
    .review-dislike-btn i,
    .review-comment-btn i {
        font-size: 0.9rem;
    }

    .review-like-count,
    .review-dislike-count,
    .review-comment-count {
        min-width: 16px;
        height: 16px;
        font-size: 0.65rem;
    }
}

/* Comment modal styles */
.comments-container.conversation-style {
    transition: all 0.3s ease;
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.2);
    padding: 1rem !important;
}

.comment-bubble {
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    display: inline-block;
    width: auto;
    max-width: 90%;
}

.my-bubble {
    color: rgba(255, 255, 255, 0.95);
    transform-origin: right bottom;
    background-color: rgba(13, 110, 253, 0.15) !important;
    border: 1px solid rgba(13, 110, 253, 0.3) !important;
    border-radius: 18px 18px 4px 18px !important;
    padding: 0.6rem 1rem !important;
    margin-left: auto;
}

.other-bubble {
    color: rgba(255, 255, 255, 0.9);
    transform-origin: left bottom;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 18px 18px 18px 4px !important;
    padding: 0.6rem 1rem !important;
}

.comment-author {
    font-weight: 500;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.25rem !important;
}

.comment-avatar {
    margin-right: 8px;
}

.comment-item {
    margin-bottom: 0.75rem !important;
    animation: commentFadeIn 0.3s ease forwards;
}

.comment-item:hover .comment-bubble {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.comment-text {
    margin-bottom: 0.25rem !important;
    line-height: 1.4;
}

.comment-date {
    font-size: 0.65rem !important;
    opacity: 0.7;
}

.comment-delete-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    padding: 2px 5px;
    border-radius: 3px;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
}

.comment-delete-btn:hover {
    color: rgba(220, 53, 69, 0.9);
    background-color: rgba(220, 53, 69, 0.1);
}

/* Comment modal input area */
.comment-input-area {
    margin-top: 1rem !important;
}

.comment-input-area .input-group {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.comment-input-area textarea {
    border: none;
    border-radius: 0;
    resize: none;
    padding: 12px 15px;
    background-color: rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    min-height: 60px;
    max-height: 120px;
}

.comment-input-area .btn {
    border-radius: 0;
    border: none;
    padding-left: 15px;
    padding-right: 15px;
    align-self: stretch;
}

.comment-input-area .form-text {
    font-size: 0.75rem;
    margin-top: 0.25rem !important;
}

/* Original review section */
.original-review {
    margin-bottom: 1.25rem !important;
}

.original-review .review-card {
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.original-review .review-content-display {
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
    padding: 0.75rem !important;
    border-radius: 6px !important;
}

/* Comment modal header styling */
.modal-content.bg-dark {
    background: linear-gradient(to bottom, #1a1a1a, #121212) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-header.border-light {
    border-bottom-color: rgba(255, 255, 255, 0.05) !important;
    padding: 0.75rem 1rem !important;
}

.modal-body {
    padding: 1rem !important;
}

.modal-title {
    font-size: 1.25rem !important;
    display: flex;
    align-items: center;
}

.modal-dialog.modal-lg {
    max-width: 700px;
}

/* Section headings */
.text-light.mb-3.border-bottom {
    font-size: 1rem !important;
    padding-bottom: 0.5rem !important;
    margin-bottom: 0.75rem !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Animation for new comments */
@keyframes commentFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Date separators in comments */
.date-separator {
    position: relative;
    text-align: center;
    padding: 5px 0;
}

.date-separator:before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.date-separator span {
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.7rem;
    z-index: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Improved scrollbar for comments */
.comments-container::-webkit-scrollbar {
    width: 4px;
}

.comments-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

.comments-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.comments-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Reviews Carousel Styles */
#reviewsCarousel {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    margin-top: 15px;
    overflow: hidden;
    position: relative;
}

.carousel-inner {
    border-radius: 8px;
}

.carousel-item {
    min-height: 300px;
    padding: 0.5rem;
}

/* Custom carousel indicators */
.carousel-indicators.review-indicators {
    bottom: -5px;
    margin-bottom: 0;
}

.carousel-indicators.review-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 0 4px;
    opacity: 0.7;
}

.carousel-indicators.review-indicators button.active {
    background-color: #fff;
    transform: scale(1.2);
    opacity: 1;
}

/* Custom carousel controls */
#reviewsCarousel .carousel-control-prev,
#reviewsCarousel .carousel-control-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
}

#reviewsCarousel .carousel-control-prev {
    left: 10px;
}

#reviewsCarousel .carousel-control-next {
    right: 10px;
}

#reviewsCarousel .carousel-control-prev:hover,
#reviewsCarousel .carousel-control-next:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.7);
}

#reviewsCarousel .carousel-control-prev-icon,
#reviewsCarousel .carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

/* Rating distribution slide */
.rating-distribution-slide {
    padding: 0.5rem;
}

/* Reviews slide container */
.reviews-slide {
    max-height: 380px;
    overflow-y: auto;
    padding: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.reviews-slide::-webkit-scrollbar {
    width: 5px;
}

.reviews-slide::-webkit-scrollbar-track {
    background: transparent;
}

.reviews-slide::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.reviews-slide .review-item {
    margin-bottom: 1rem;
}

.reviews-slide .review-item:last-child {
    margin-bottom: 0;
}

/* Counter display */
.carousel-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 5;
}

/* See all reviews button */
#seeAllReviewsLink {
    font-size: 0.9rem;
    padding: 0.375rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

#seeAllReviewsLink:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

#seeAllReviewsLink i {
    transition: transform 0.3s ease;
}

#seeAllReviewsLink:hover i {
    transform: translateX(3px);
}

/* Rating average placeholder */
#ratingAveragePlaceholder {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Tablet-specific responsive adjustments (768px - 992px) */
@media (min-width: 769px) and (max-width: 992px) {
    .review-row {
        display: flex;
        flex-wrap: wrap;
        margin-bottom: 15px;
        position: relative;
        min-height: auto;
        gap: 5px;
    }

    /* First row: stars and percentage */
    .review-row .col-3,
    .review-row .col-2 {
        display: inline-flex;
        align-items: center;
    }

    .review-stars {
        font-size: 0.9rem;
    }

    .review-percentage {
        font-size: 0.9rem;
        min-width: 45px;
        text-align: right;
        padding-left: 10px;
        padding-right: 5px;
    }

    .review-row .col-3 {
        width: auto !important;
        flex: 0 0 auto !important;
        max-width: fit-content !important;
        padding-right: 0;
        padding-left: 0;
        margin-left: 0;
    }

    .review-row .col-7 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 0;
        order: 2;
        margin-top: 8px;
    }

    .review-row .col-2 {
        width: auto !important;
        flex: 0 0 auto !important;
        max-width: fit-content !important;
        padding-left: 0;
        padding-right: 5px;
        margin-left: auto;
    }

    .stars-col {
        width: auto !important;
        min-height: 20px;
        justify-content: flex-start;
        padding-right: 0;
    }

    .percentage-col {
        width: auto !important;
        min-height: 20px;
        justify-content: flex-end;
        padding-left: 0;
        padding-right: 5px;
    }

    .progress-light.review-progress {
        height: 8px;
        width: 100% !important;
    }

    .review-progress-col {
        padding: 0 !important;
        width: 100% !important;
    }
}

/* Additional responsive adjustments for very small screens */
@media (max-width: 576px) {
    .review-row {
        margin-bottom: 20px;
    }

    .review-stars {
        font-size: 0.8rem;
    }

    .review-percentage {
        font-size: 0.8rem;
        min-width: 40px;
        padding-left: 8px;
    }

    .review-row .col-3 {
        padding-right: 0;
    }

    .review-row .col-2 {
        padding-left: 8px;
    }

    .progress-light.review-progress {
        height: 6px;
    }

    .review-stats-container {
        padding: 0.75rem;
    }

    .review-row .col-7 {
        margin-top: 8px;
        padding: 0;
    }

    .review-progress-col {
        padding: 0 !important;
    }

    /* Hide rating distribution on extra small screens for seller profile page */
    .rating-distribution-container .review-row .stars-col,
    .rating-distribution-container .review-row .review-progress-col,
    .rating-distribution-container .review-row .percentage-col {
        display: none !important;
    }

    /* Collapse the rating distribution container to remove empty space */
    .rating-distribution-container {
        height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        visibility: hidden !important;
        position: absolute !important;
    }

    /* Adjust the review stats container to be more compact */
    .review-stats-container {
        padding: 0 !important;
        margin-bottom: 0 !important;
        border: none !important;
        min-height: auto !important;
        height: auto !important;
    }

    /* Adjust carousel item height to match only the visible content */
    .carousel-item.active.rating-distribution-slide {
        min-height: auto !important;
        height: auto !important;
    }

    /* Enhance the average rating display when progress bars are hidden */
    #ratingAveragePlaceholder {
        padding: 1rem !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        background-color: rgba(255, 255, 255, 0.08) !important;
        border-radius: 10px !important;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    }

    /* Ensure the tab content is compact */
    #sellers-reviews.tab-pane {
        padding-bottom: 0 !important;
    }

    /* Ensure the review container is compact */
    #reviewsContainer {
        margin-bottom: 0 !important;
    }

    /* Style for the mobile rating display */
    .mobile-rating-display .h1 {
        font-size: 2.5rem !important;
        font-weight: 700 !important;
    }

    .mobile-rating-display .text-warning {
        font-size: 2rem !important;
    }
}

/* Tablet-specific adjustments for review items */
@media (min-width: 577px) and (max-width: 992px) {
    /* Ensure review items display in two columns */
    .col-md-6, .col-sm-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    /* Reduce spacing between review items */
    .row {
        margin-left: -6px !important;
        margin-right: -6px !important;
    }

    /* Adjust review item padding for better fit */
    .review-item {
        padding: 0.9rem;
        height: 100%;
        margin-bottom: 12px;
    }

    /* Ensure consistent height */
    .review-content-wrapper {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }

    /* Adjust review text for better readability */
    .review-text {
        font-size: 0.9rem;
        line-height: 1.4;
        max-height: 4.2rem; /* 3 lines of text */
        overflow: hidden;
    }

    /* Adjust container padding */
    #reviewsContainer {
        padding: 0.9rem;
    }
}

/* Media queries for responsive carousel */
@media (max-width: 768px) {
    #reviewsCarousel {
        padding: 1rem;
    }

    .carousel-item {
        min-height: auto;
    }

    /* Specifically target the rating distribution slide */
    .carousel-item.rating-distribution-slide {
        min-height: auto !important;
        height: auto !important;
    }

    .reviews-slide {
        max-height: 300px;
    }

    #reviewsCarousel .carousel-control-prev,
    #reviewsCarousel .carousel-control-next {
        width: 30px;
        height: 30px;
    }

    #reviewsCarousel .carousel-control-prev-icon,
    #reviewsCarousel .carousel-control-next-icon {
        width: 15px;
        height: 15px;
    }

    /* Ensure the carousel adjusts its height based on content */
    #reviewsCarousel .carousel-inner {
        height: auto !important;
    }
}

/* Extra small screens */
@media (max-width: 576px) {
    #reviewsCarousel {
        padding: 0.75rem;
        height: auto !important;
        min-height: auto !important;
    }

    .carousel-item {
        min-height: auto !important;
        height: auto !important;
    }

    /* Specifically target the rating distribution slide */
    .carousel-item.rating-distribution-slide {
        min-height: auto !important;
        height: auto !important;
    }

    .reviews-slide {
        max-height: 250px;
    }

    #reviewsCarousel .carousel-control-prev,
    #reviewsCarousel .carousel-control-next {
        width: 25px;
        height: 25px;
    }

    #reviewsCarousel .carousel-control-prev-icon,
    #reviewsCarousel .carousel-control-next-icon {
        width: 12px;
        height: 12px;
    }

    /* Ensure the carousel adjusts its height based on content */
    #reviewsCarousel .carousel-inner {
        height: auto !important;
    }
}

/* My Review badge styling */
.my-review-badge {
    position: absolute;
    top: -8px;
    right: 20px;
    background-color: rgba(13, 110, 253, 0.9);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Seller badge for comments */
.seller-badge {
    background-color: #ffc107;
    color: #000;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 10px;
    margin-left: 5px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Style the seller comment bubble differently */
.comment-bubble.seller-bubble {
    background-color: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #ffc107;
}

/* When the seller comment is from the current user */
.my-bubble.seller-bubble {
    border-right: 3px solid #ffc107;
    border-left: none;
    background-color: rgba(255, 193, 7, 0.15);
}

/* Review Reaction Buttons */
.review-reactions {
    margin-top: 12px;
}

.reaction-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    margin-right: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.reaction-btn.active {
    background: rgba(13, 110, 253, 0.2);
    border-color: #0d6efd;
    color: #0d6efd;
}

.reaction-btn .reaction-count {
    margin-left: 5px;
    font-size: 0.875rem;
}

.like-btn.active i {
    color: #0d6efd;
}

.dislike-btn.active i {
    color: #dc3545;
}

/* Comment Modal Styles */
.comments-list {
    max-height: 400px;
    overflow-y: auto;
}

.comment-item {
    margin-bottom: 15px;
}

.comment-text {
    white-space: pre-wrap;
    word-break: break-word;
}

.delete-comment-btn {
    background: transparent;
    border: none;
    padding: 2px 6px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.delete-comment-btn:hover {
    opacity: 1;
}

/* User Review Container */
.user-review {
    padding: 15px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.user-review:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.user-review.review-item {
    background: rgba(0, 123, 255, 0.05);
    border-color: rgba(0, 123, 255, 0.2);
}

.user-review .stars i {
    font-size: 1.1rem;
}

.review-item {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

/* Make sure the reaction buttons are consistent between both review types */
.review-item .review-reactions,
.user-review .review-reactions {
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 12px;
}

.reaction-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    margin-right: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.reaction-btn.active {
    background: rgba(13, 110, 253, 0.2);
    border-color: #0d6efd;
    color: #0d6efd;
}

.like-btn.active i {
    color: #0d6efd;
}

.dislike-btn.active i {
    color: #dc3545;
}

.reaction-btn .reaction-count {
    margin-left: 5px;
    font-size: 0.875rem;
}

/* My Review Badge styling */
.my-review-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #0d6efd;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.3);
}