/* ==========================================
   1. GRID LAYOUT (DESKTOP) — equal-height cards
   ========================================== */
@media (min-width: 768px) {
    .commentlist {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        padding-left: 0 !important;
        /* default grid "stretch" makes both cards in a row match the
           height of the taller one — do not add align-items here */
    }

    .commentlist li {
        margin-bottom: 0 !important;
        min-width: 0 !important;
    }
}

.commentlist li {
    position: relative !important;
    padding: 16px !important;
    border: 1px solid #e4e4e4 !important;
    border-radius: 8px !important;
    background-color: #fff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    list-style: none !important;
    display: flex !important;
    flex-direction: column !important;
}

.commentlist li.review-hidden {
    display: none !important;
}

/* ==========================================
   2. HEADER — avatar/name left, date top-right
   ========================================== */
.rv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
}

.rv-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.rv-header img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ececec;
    flex-shrink: 0;
}

.rv-name {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 600;
    letter-spacing: 0.1px;
}

.rv-date {
    font-size: 12px;
    color: #767676;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ==========================================
   3. STAR RATING — bigger, richer, more premium
   ========================================== */
.rv-rating-row {
    margin-bottom: 6px;
}

.rv-rating-row .star-rating {
    margin: 0 !important;
    float: none !important;
    font-size: 1.65em !important;
    letter-spacing: 1px;
}

.rv-rating-row .star-rating span::before {
    color: #e08a00 !important;
}

.rv-verified {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: #c45500;
    margin-bottom: 6px;
}

.rv-verified-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ==========================================
   4. BODY — text left (clamped), photos right
   ========================================== */
.rv-body {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 8px;
    flex: 1;
}

.rv-text {
    font-size: 14px;
    line-height: 1.5;
    color: #222222;
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rv-text p {
    margin: 0 0 6px 0;
}

.rv-images {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    gap: 6px;
}

.rv-images img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e4e4e4;
    display: block;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.rv-images img:hover {
    opacity: 0.85;
}

/* ==========================================
   5. REVIEW FORM — upload field + one-by-one picker
   ========================================== */
.comment-form-review-image {
    margin-bottom: 16px;
}

.comment-form-review-image label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 6px;
}

.review-photo-uploader {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.review-photo-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.review-photo-thumb {
    position: relative;
    width: 56px;
    height: 56px;
}

.review-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e4e4e4;
    display: block;
}

.review-photo-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #333333;
    color: #ffffff;
    border: none;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.review-add-photo-btn {
    padding: 6px 12px;
    border: 1px dashed #a8a8a8;
    border-radius: 6px;
    background: transparent;
    color: #333333;
    font-size: 13px;
    cursor: pointer;
}

.review-add-photo-btn:hover {
    border-color: #767676;
    background: #f9f9f9;
}

/* ==========================================
   6. ALREADY-REVIEWED NOTICE
   ========================================== */
.already-reviewed-notice {
    padding: 14px 16px;
    background: #f7f7f7;
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    font-size: 14px;
    color: #333333;
}

/* ==========================================
   7. HELPFUL BUTTON
   ========================================== */
.rv-helpful-count {
    font-size: 12px;
    color: #767676;
    margin-bottom: 6px;
    display: none;
}

.rv-helpful-count.visible {
    display: block;
}

.review-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-helpful-btn {
    padding: 6px 16px;
    border: 1px solid #000000;
    border-radius: 20px;
    background: #ffffff;
    color: #222222;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-helpful-btn:hover {
    border-color: #444444;
}

.review-helpful-btn.voted {
    background: #e0e0e0;
    border-color: transparent;
    color: #555555;
    cursor: default;
}

/* ==========================================
   8. PAGINATION
   ========================================== */
.review-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 30px auto 10px !important;
    grid-column: 1 / -1;
}

.review-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    background: #ffffff;
    color: #222222;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-page-btn:hover {
    border-color: #a0a0a0;
    background: #f9f9f9;
}

.review-page-btn.active {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
}

.review-page-btn:disabled {
    opacity: 0.4;
    cursor: default;
}
