/* CV Enhanced Review - Will style summary, chart, filter, sorting, helpful voting etc. */
/* LEGACY/compatibility styles - copied from original theme for reviews */
.reviews-loading {
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.woocommerce #reviews #comments ol.commentlist li img.avatar {
    display: none !important;
}

.woocommerce #reviews #comments ol.commentlist li .comment-text {
    margin: 0 !important;
}

.woocommerce #reviews #comments h2 {
    margin-bottom: 10px;
}

.reviews-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.95);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #fff !important;
    border-top: 4px solid var(--brand-500) !important;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.woocommerce-pagination {
    margin-top: 20px;
}
nav.woocommerce-pagination li span {
    margin: 0;
    border: none;
    background: transparent;
    padding: 10px 15px;
    border-radius: 10px;
}

.woocommerce nav.woocommerce-pagination ul li ,.woocommerce nav.woocommerce-pagination ul{
    border: none !important;
}
.woocommerce-pagination .page-numbers {
    display: flex !important
;
    border: none !important;
    justify-content: center;
    gap: 8px;
}

.woocommerce-pagination .page-numbers li span, .woocommerce-pagination .page-numbers li a {
    border-radius: 9999px;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 500 !important;
    letter-spacing: -0.02em !important;
    color: var(--gray-950);
    transition: all 0.2s 
ease;
    border: none !important;
    border-radius: 10px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}
.woocommerce-pagination a:hover {
    background: #e0e0e0;
}
.woocommerce-pagination .current {
    background: var(--brand-500) !important;
    color: #fff !important;
}

.commentlist {
    position: relative;
}

/* Average rating display */
.cver-average-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0px 0 35px;
    padding: 12px 0;
    /* border-bottom: 1px solid #e0e0e0; */
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cver-average-rating .star-rating {
    font-size: 18px !important;
    margin: 0;
    font-size: 18px;
}

.cver-average-rating .cver-average-number {
    font-size: 18px;
    font-weight: normal;
    color: var(--gray-700);
    line-height: 1;
}
.woocommerce #reviews #comments h2{
    text-align:center;
    
}

/* Filter & Sort controls at top */
.cver-controls-wrapper {
    display: grid;
    gap: 20px;
    margin: 15px 0;
    grid-column-gap: 1fr;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 20px;
    margin-bottom: 50px;
    font-weight: 500;
    font-size: 14px;
}

.cver-filter-wrapper, 
.cver-sorting-wrapper  {
    position: relative;
}



.cver-sorting-wrapper  svg,
.cver-filter-wrapper svg{
    position:absolute;
    right: 5px;
    top: 13px;
    width:20px;
    z-index: 99;
}


/* Custom filter dropdown */
.cver-filter-dropdown-custom {
    position: relative;
    /* min-width: 280px; */
}

.cver-filter-selected {
    padding: 8px 12px;
    /* border: 1px solid #ccc; */
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    position: relative;
    padding-right: 20px;
    border-radius: 20px;
    border: 1px solid var(--gray-200);
}

.cver-filter-selected:after {
    /* content: '▼'; */
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #666;
}

.cver-filter-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.cver-filter-dropdown-custom.open .cver-filter-options {
    display: block;
}

.cver-filter-option {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    justify-content: flex-start;
}

.cver-filter-option:hover {
    background: #f5f5f5;
}

.cver-filter-option.active {
    background: var(--gray-300);
}

.cver-filter-percent {
    font-weight: 600;
    min-width: 40px;
    color: var(--gray-700);
    font-size: 13px;
    padding: 0;
    display: inline-grid;
}

.cver-filter-bar {
    flex: 1;
    height: 15px;
    background: #e0e0e0;
    /* border-radius: 4px; */
    overflow: hidden;
    min-width: 60px;
    border: solid 1px var(--gray-500);
    max-width: 82px;
}

.cver-filter-bar-fill {
    display: block;
    height: 100%;
    background: var(--brand-500);
    /* border-radius: 4px; */
    transition: width 0.3s;
    /* border: solid 1px var(--gray-100); */
}

.cver-filter-stars {
    font-size: 13px;
    color: #333;
    white-space: nowrap;
}

#cver-filter-dropdown {
    display: none;
}

/* Custom sort dropdown */
.cver-sort-dropdown-custom {
    position: relative;
    /* min-width: 200px; */
}

.cver-sort-selected {
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    position: relative;
    padding-right: 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 20px;
    color: var(--gray-700);
    white-space: nowrap;
}

.cver-sort-selected:after {
    /* content: '▼'; */
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #666;
}

.cver-sort-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: 4px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.cver-sort-dropdown-custom.open .cver-sort-options {
    display: block;
}

.cver-sort-option {
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 13px;
}

.cver-sort-option:hover {
    background: #f5f5f5;
}

.cver-sort-option.active {
    background: var(--gray-300);
    color: var(--gray-700);
}

#cver-sort-dropdown {
    display: none;
}

/* Helpful voting */
.cver-helpful-area {
    margin: 12px 0 20px;
    padding: 10px;
    /* background: #f9f9f9; */
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: end;
    margin-bottom: 0;
}

.cver-helpful-text {
    font-size: 13px;
    color: var(--gray-700);
    font-weight: 300;
}

.cver-helpful-btn {
    border: none;
    background: #fff;
    padding: revert-layer;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-700);
    /* border-right: solid 1px; */
    /* border-radius: 0; */
}

button.cver-helpful-btn.cver-helpful-up:after {
    content: " ";
    position: absolute;
    width: 1px;
    height: 14px;
    right: -5px;
    top: 0px;
    background: var(--gray-700);
}

button.cver-helpful-btn.cver-helpful-up {
    position: relative;
}


.cver-helpful-btn:hover {
    background: transparent;
    border-color: transparent;
    transform: translateY(-1px);n
    color: var(--brand-600);
}

.cver-helpful-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cver-helpful-btn .cver-icon-up, .cver-helpful-btn .cver-icon-down {
    font-size: 12px;
    line-height: 1;
}

.cver-helpful-btn .cver-count {
    font-weight: normal;
    min-width: 14px;
    text-align: center;
    line-height: 1;
    font-size: 13px;
}



@media(max-width: 600px) {
    .cver-controls-wrapper {
        flex-direction:column;
        gap: 10px;
    }

    .cver-filter-dropdown-custom,.cver-sort-dropdown-custom {
        width: 100%;
        min-width: auto;
    }
}
