.product-review {
    &-number {
        border: 1px solid #e0e2e3;
        padding: 35px 43px 33px 40px;

        &-title {
            font-size: 20px;
            font-weight: 500;
            margin-bottom: 14px;
        }
    }

    &-summary {
        display: flex;
        align-items: center;
        margin-bottom: 0.75rem;

        &-value {
            span {
                font-size: 40px;
                font-weight: 500;
                color: #000;
                margin-inline-end: 8px;
            }
        }

        &-rating {
            display: flex;
            align-items: center;

            p {
                margin-inline-start: 4px;
                font-size: 14px;
                margin-bottom: 0 !important;
            }
        }
    }

    &-progress {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;

        &-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            gap: 0.75rem;
            transition: background-color 0.2s ease;

            &.clickable {
                cursor: pointer;
                border-radius: 0.25rem;
                padding: 0.25rem;

                &:hover {
                    background-color: rgba(var(--primary-color-rgb, 13, 110, 253), 0.05);
                }

                &:focus {
                    outline: 2px solid rgba(var(--primary-color-rgb, 13, 110, 253), 0.5);
                    outline-offset: 2px;
                }
            }

            &-value {
                width: 100%;
            }

            &-title {
                flex-shrink: 0;
                min-width: 50px;
            }

            &-percent {
                width: 50px;
                flex-shrink: 0;
            }
        }
    }

    &-item {
        &:last-child {
            border-bottom: none !important;
        }

        &.current-customer-review {
            background-color: rgba(var(--primary-color-rgb, 13, 110, 253), 0.05);
            border: 1px solid rgba(var(--primary-color-rgb, 13, 110, 253), 0.15);
            border-radius: 0.375rem;
            padding: 1rem;
            margin-bottom: 1rem;
            position: relative;

            &::before {
                content: '';
                position: absolute;
                top: 0;
                inset-inline-start: 0;
                width: 4px;
                height: 100%;
                background-color: var(--primary-color, #0d6efd);
                border-radius: 0.375rem 0 0 0.375rem;
            }
        }

        &__actions {
            .delete-review-btn {
                border: none !important;
                background: none !important;
                color: #dc3545 !important;
                padding: 0.25rem !important;
                line-height: 1;
                opacity: 0.7;
                transition: opacity 0.2s ease;

                &:hover {
                    opacity: 1;
                    background: none !important;
                    color: #dc3545 !important;
                }

                &.loading {
                    opacity: 0.4;
                    pointer-events: none;
                }

                svg {
                    width: 1rem;
                    height: 1rem;
                }
            }
        }

        &__reply {
            > div {
                &:before {
                    position: absolute;
                    inset-inline-start: 10px;
                    top: -10px;
                    content: '';
                    border-inline-start: 10px solid transparent;
                    border-inline-end: 10px solid transparent;
                    border-bottom: 10px solid #f8f9fa;
                }
            }
        }

        &__reply-form {
            .vendor-reply-toggle-btn {
                text-decoration: none;
                color: #6b7280 !important;
                font-size: 13px;
                display: inline-flex;
                align-items: center;
                transition: color 0.2s ease;

                &:hover {
                    color: var(--primary-color, #0d6efd) !important;
                }

                svg {
                    width: 14px;
                    height: 14px;
                }
            }

            .vendor-reply-form {
                textarea.form-control {
                    border: 1px solid #e5e7eb;
                    border-radius: 6px;
                    padding: 10px 12px;
                    font-size: 14px;
                    resize: vertical;
                    min-height: 60px;
                    color: #374151;

                    &::placeholder {
                        color: #9ca3af;
                        opacity: 1;
                    }

                    &:focus {
                        border-color: #9ca3af;
                        box-shadow: none;
                        outline: none;
                    }
                }

                .vendor-reply-submit-btn {
                    position: relative;

                    &.loading {
                        opacity: 0.7;
                        pointer-events: none;
                        color: transparent !important;

                        &::after {
                            content: '';
                            position: absolute;
                            top: 50%;
                            left: 50%;
                            width: 14px;
                            height: 14px;
                            margin-top: -7px;
                            margin-left: -7px;
                            border: 2px solid #fff;
                            border-top-color: transparent;
                            border-radius: 50%;
                            animation: vendor-reply-spinner 0.6s linear infinite;
                        }
                    }
                }

                @keyframes vendor-reply-spinner {
                    to {
                        transform: rotate(360deg);
                    }
                }

                .btn {
                    display: inline-flex !important;
                    width: auto !important;
                    padding: 6px 14px !important;
                    font-size: 13px !important;
                    font-weight: 500 !important;
                    border-radius: 6px !important;
                    align-items: center;
                    justify-content: center;
                    transition: all 0.2s ease;
                }

                .btn-primary {
                    background-color: var(--primary-color, #0d6efd) !important;
                    border-color: var(--primary-color, #0d6efd) !important;
                    color: #fff !important;

                    &:hover {
                        opacity: 0.9;
                    }

                    &.loading {
                        opacity: 0.6;
                        pointer-events: none;
                    }
                }

                .btn-link {
                    background: transparent !important;
                    border: none !important;
                    color: #6b7280 !important;
                    padding: 6px 10px !important;
                    text-decoration: none !important;

                    &:hover {
                        color: #374151 !important;
                        background: transparent !important;
                    }
                }
            }
        }
    }

    &-container {
        .pagination {
            justify-content: center;
        }

        .loading-spinner {
            position: absolute;
            top: 0;
            inset-inline-start: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.5);

            &:after {
                content: ' ';
                display: block;
                border-radius: 50%;
                border-width: 1px;
                border-style: solid;
                -webkit-animation: lds-dual-ring 0.5s linear infinite;
                animation: lds-dual-ring 0.5s linear infinite;
                width: 40px;
                height: 40px;
                border-color: var(--primary-color) transparent var(--primary-color) transparent;
            }
        }

        @keyframes lds-dual-ring {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }

        @-webkit-keyframes lds-dual-ring {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }

        .progress {
            border-radius: 0;
            height: 0.6rem;

            .progress-bar {
                background-color: #ffb21d;
            }
        }

        .image-upload-info {
            svg {
                width: 1rem;
                height: 1rem;
                margin-bottom: 0;
            }
        }

        .lg-outer {
            .lg-thumb {
                margin: auto;
            }
        }

        .btn-primary {
            color: #fff;
            background-color: var(--primary-color);
            border-color: var(--primary-color);
            padding: 0.5rem 0.75rem;
        }

        .btn-primary:hover {
            color: var(--text-color);
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }

        .btn-primary.focus,
        .btn-primary:focus {
            color: #fff;
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }

        .btn-primary.disabled,
        .btn-primary:disabled {
            color: #fff;
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }

        .btn-primary:not(:disabled):not(.disabled).active,
        .btn-primary:not(:disabled):not(.disabled):active,
        .show > .btn-primary.dropdown-toggle {
            color: #fff;
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }

        .form-rating-stars {
            float: inline-start;

            > label {
                float: inline-end;
                color: #999;
                cursor: pointer;
                line-height: 1;

                svg {
                    width: 1rem;
                    height: 1rem;
                    margin-bottom: 0;
                }
            }

            .btn-check {
                display: none;
            }

            > input:checked ~ label,
            &:not(:checked) > label:hover,
            &:not(:checked) > label:hover ~ label {
                color: #fab528;
            }

            > input:checked + label:hover,
            > input:checked ~ label:hover,
            > label:hover ~ input:checked ~ label,
            > input:checked ~ label:hover ~ label {
                color: #fab528;
            }
        }

        .image-viewer__item {
            position: relative;
            -webkit-transition: all 0.3s cubic-bezier(0.46, 0.03, 0.52, 0.96);
            transition: all 0.3s cubic-bezier(0.46, 0.03, 0.52, 0.96);
            text-align: initial;
            margin-inline-end: 2px;
            background-color: #eee;
            width: 70px;
            height: 70px;
            border: 1px solid #c4c6cf;
            margin-top: 5px;

            img {
                height: 100%;
                width: 100%;
                object-fit: contain;
            }
        }

        .image-upload__uploader-container {
            display: inline-block;

            &:hover {
                cursor: pointer;
            }

            .image-upload__uploader {
                width: 70px;
                height: 70px;
                border: 1px dashed #c4c6cf;
                -webkit-box-orient: vertical;
                -webkit-box-direction: normal;
                -ms-flex-direction: column;
                flex-direction: column;
                -webkit-box-pack: center;
                -ms-flex-pack: center;
                justify-content: center;
                -webkit-box-align: center;
                -ms-flex-align: center;
                align-items: center;
                position: relative;
                display: -webkit-box;
                display: -ms-flexbox;
                display: flex;

                &:hover {
                    background: #d9edf7;

                    .image-upload__file-input {
                        cursor: pointer;
                    }
                }
            }
        }

        .image-upload__icon {
            color: #333;
            font-size: 20px;
            margin-bottom: 8px;
        }

        .image-upload__text {
            color: #333;
            font-size: 9px;
            padding: 0 3px;
            text-align: center;
        }

        .image-upload__file-input {
            position: absolute;
            inset-inline-start: 0;
            top: 0;
            opacity: 0;
            width: 100%;
            height: 100%;
        }

        .image-viewer__item {
            display: inline-block;
        }

        .image-viewer__list {
            display: block;
            width: 100%;
        }

        .image-viewer__icon-remove {
            cursor: pointer;
            position: absolute;
            inset-inline-end: 3px;
            top: 3px;
            z-index: 1;
            height: 20px;
            line-height: 20px;
            text-align: center;
            width: 20px;
            background: #848484;
            border-radius: 50%;

            svg {
                color: #ffffff;
                width: 10px;
                height: 10px;
                margin-bottom: 0;
            }
        }
    }

    &-container {
        .review-list-container {
            > h4 {
                font-size: 18px;
                font-weight: 600;
                color: #1f2937;
                margin-bottom: 20px;
                padding-bottom: 15px;
                border-bottom: 2px solid #f3f4f6;
            }
        }

        .product-review-controls {
            margin-bottom: 20px;

            .review-control-buttons {
                .review-control-btn.btn {
                    font-size: 14px;
                    padding: 8px 16px !important;
                    border: 1px solid #e5e7eb !important;
                    border-radius: 6px !important;
                    background-color: #fff !important;
                    color: #6b7280 !important;
                    transition: all 0.2s ease;
                    font-weight: 400;
                    display: inline-flex;
                    align-items: center;
                    justify-content: center;
                    gap: 6px;

                    svg {
                        width: 16px;
                        height: 16px;
                        margin: 0 !important;
                        vertical-align: middle;
                    }

                    &:hover {
                        background-color: #f9fafb !important;
                        border-color: #d1d5db !important;
                        color: #374151 !important;
                    }

                    &.active {
                        background-color: #f3f4f6 !important;
                        border-color: #9ca3af !important;
                        color: #1f2937 !important;
                    }
                }
            }

            .review-clear-btn {
                font-size: 14px;
                padding: 8px 16px !important;
                border: 1px solid #e5e7eb !important;
                border-radius: 6px !important;
                background-color: #fff !important;
                color: #6b7280 !important;
                transition: all 0.2s ease;
                font-weight: 400;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                gap: 6px;

                svg {
                    width: 16px;
                    height: 16px;
                    margin: 0 !important;
                }

                &:hover {
                    background-color: #f9fafb !important;
                    border-color: #d1d5db !important;
                    color: #374151 !important;
                }
            }
        }

        .review-search-container,
        .review-filter-container,
        .review-sort-container {
            margin-bottom: 24px !important;

            .review-search-input,
            .review-sort-select,
            .review-star-filter {
                border: 1px solid #e5e7eb;
                border-radius: 6px;
                padding: 10px 14px;
                font-size: 14px;
                transition: all 0.2s ease;
                height: 44px;

                &:focus {
                    border-color: #9ca3af;
                    box-shadow: none;
                    outline: none;
                }
            }

            .review-search-input {
                padding-inline-end: 2.5rem;

                &:focus::placeholder {
                    opacity: 0.5;
                }
            }

            .review-sort-select,
            .review-star-filter {
                cursor: pointer;
                background-color: #fff;
            }
        }

        .review-search-container {
            .position-relative > .position-absolute {
                top: 50% !important;
                transform: translateY(-50%) !important;
                line-height: 1;

                svg {
                    width: 18px;
                    height: 18px;
                    display: block;
                    margin: 0 !important;
                    margin-bottom: 0 !important;
                }
            }
        }
    }
}

// Review Form Warning Alert
.review-warning-alert {
    background-color: #fff3cd !important;
    border: 1px solid #ffeaa7 !important;
    border-radius: 8px !important;
    padding: 16px 20px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #856404 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    border-left: 4px solid #ffc107 !important;
    margin-bottom: 1.5rem !important;

    .warning-icon {
        flex-shrink: 0;
        width: 24px;
        height: 24px;
        background-color: #ffc107;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 2px;

        svg {
            width: 14px;
            height: 14px;
            color: #fff;
        }
    }

    .warning-content {
        flex: 1;

        .warning-title {
            font-weight: 600;
            margin-bottom: 4px;
            color: #856404;
        }

        .warning-message {
            margin-bottom: 0;
        }

        .warning-actions {
            margin-top: 12px;

            .btn {
                border-color: #ffc107;
                color: #856404;
                font-weight: 500;
                padding: 6px 12px;
                font-size: 13px;
                text-decoration: none;
                border-radius: 6px;
                transition: all 0.2s ease;
                display: inline-flex;
                align-items: center;
                gap: 4px;

                &:hover {
                    background-color: #ffc107;
                    color: #fff;
                    border-color: #ffc107;
                }

                svg {
                    width: 14px;
                    height: 14px;
                }
            }
        }
    }

    // Mobile responsive
    @media (max-width: 576px) {
        padding: 12px 16px !important;
        gap: 10px !important;
        font-size: 13px !important;

        .warning-icon {
            width: 20px;
            height: 20px;

            svg {
                width: 12px;
                height: 12px;
            }
        }

        .warning-content {
            .warning-actions {
                margin-top: 10px;

                .btn {
                    padding: 5px 10px;
                    font-size: 12px;
                    width: 100%;
                    justify-content: center;

                    svg {
                        width: 12px;
                        height: 12px;
                    }
                }
            }
        }
    }
}

.review-info-alert {
    background-color: #d1ecf1 !important;
    border: 1px solid #bee5eb !important;
    border-radius: 8px !important;
    padding: 16px 20px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #0c5460 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    border-left: 4px solid #17a2b8 !important;
    margin-bottom: 1.5rem !important;

    .info-icon {
        flex-shrink: 0;
        width: 24px;
        height: 24px;
        background-color: #17a2b8;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 2px;

        svg {
            width: 14px;
            height: 14px;
            color: #fff;
        }
    }

    .info-content {
        flex: 1;

        .info-title {
            font-weight: 600;
            margin-bottom: 4px;
            color: #0c5460;
        }

        .info-message {
            margin-bottom: 0;
            color: #0c5460;
        }

        .info-actions {
            margin-top: 12px;

            .btn {
                border-color: #17a2b8;
                color: #0c5460;
                padding: 6px 12px;
                font-size: 13px;
                font-weight: 500;
                border-radius: 6px;
                display: inline-flex;
                align-items: center;
                gap: 4px;
                text-decoration: none;
                transition: all 0.2s ease;

                &:hover {
                    background-color: #17a2b8;
                    border-color: #17a2b8;
                    color: #fff;
                }

                svg {
                    width: 14px;
                    height: 14px;
                }
            }
        }
    }

    @media (max-width: 576px) {
        font-size: 13px !important;
        padding: 12px 16px !important;
        gap: 10px !important;

        .info-icon {
            width: 20px;
            height: 20px;

            svg {
                width: 12px;
                height: 12px;
            }
        }

        .info-content {
            .info-actions {
                margin-top: 10px;

                .btn {
                    width: 100%;
                    justify-content: center;
                    font-size: 12px;
                    padding: 5px 10px;

                    svg {
                        width: 12px;
                        height: 12px;
                    }
                }
            }
        }
    }
}
