/* ============================================================
   RINGOMIZE REVIEWS - Professional
   ============================================================ */

:root {
    --rr-star-color: #ffb400;
    --rr-star-empty: #d9d9d9;
    --rr-star-stroke: #d99500;
    --rr-stroke-width: 1.3px;
    --rr-size-review: 24px;
    --rr-size-summary: 24px;
    --rr-size-product: 24px;
    --rr-size-shop: 14px;
    --rr-size-picker: 36px;
    --rr-radius: 6px;
    --rr-text: #1a1a1a;
    --rr-text-muted: #888888;
    --rr-border: #e8e8e8;
    --rr-bg: #ffffff;
}

/* ===== STAR ICONS (rounded, outlined) ===== */
.rr-star {
    display: inline-flex;
    position: relative;
    line-height: 0;
}
.rr-star-svg {
    width: 1em;
    height: 1em;
    display: block;
    stroke-linejoin: round;
    stroke-linecap: round;
}
.rr-star.filled .rr-star-svg,
.rr-star.half .rr-star-fg {
    fill: var(--rr-star-color) !important;
    stroke: var(--rr-star-stroke) !important;
    stroke-width: var(--rr-stroke-width);
}
.rr-star.empty .rr-star-svg,
.rr-star.half .rr-star-bg {
    fill: #f2f2f2 !important;
    stroke: var(--rr-star-stroke) !important;
    stroke-width: var(--rr-stroke-width);
}
.rr-star.half {
    width: 1em;
    height: 1em;
}
.rr-star.half .rr-star-fg {
    position: absolute;
    top: 0;
    left: 0;
    clip-path: inset(0 50% 0 0);
}

/* ===== SHOP PAGE RATING ===== */
.rr-shop-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    margin: 4px 0 -2px;
}
.rr-shop-rating .rr-stars {
    display: inline-flex;
    font-size: var(--rr-size-shop);
}
.rr-shop-rating .rr-stars .rr-star {
    font-size: var(--rr-size-shop);
    line-height: 1;
}
.rr-shop-rating .rr-rating-text {
    font-size: 13px;
    color: var(--rr-text-muted);
}

/* ===== PRODUCT PAGE RATING ===== */
.rr-product-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 1px 0 4px;
}
.rr-product-rating .rr-stars {
    display: inline-flex;
    font-size: var(--rr-size-product);
}
.rr-product-rating .rr-stars .rr-star {
    font-size: var(--rr-size-product);
    line-height: 1;
}
.rr-product-rating .rr-rating-text {
    font-size: 16px;
    color: var(--rr-text-muted);
}
.rr-product-rating.rr-scroll-to-reviews,
.rr-shop-rating {
    cursor: pointer;
}
.rr-product-rating.rr-scroll-to-reviews:hover .rr-rating-text {
    text-decoration: underline;
}

/* ===== REVIEW SECTION ===== */
.rr-review-section {
    max-width: 860px;
    margin: 20px auto 0;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.rr-section-heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--rr-text);
    margin-bottom: 5px;
    text-align: center;
}

/* ===== SUMMARY ===== */
.rr-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: center;
    padding: 0px 0 24px;
    border-bottom: 1px solid var(--rr-border);
    margin-bottom: 20px;
}
.rr-summary-left {
    text-align: center;
    min-width: 180px;
    flex-shrink: 0;
}
.rr-summary-top {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
}
.rr-summary-left .rr-big-stars .rr-star {
    font-size: var(--rr-size-summary);
}
.rr-summary-left .rr-big-avg {
    font-size: 16px;
    font-weight: 600;
    color: var(--rr-text);
}
.rr-summary-left .rr-meta-text {
    font-size: 16px;
    color: var(--rr-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: 600;
}
.rr-verified-icon {
    font-size: 12px;
}

.rr-summary-right {
    flex: 1;
    min-width: 220px;
    padding: 0 24px;
    border-left: 1px solid var(--rr-border);
    border-right: 1px solid var(--rr-border);
}
.rr-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    cursor: pointer;
    padding: 1px 6px;
    margin-left: -6px;
    margin-right: -6px;
    border-radius: 5px;
    transition: background 0.15s;
}
.rr-bar-row:hover {
    background: #f7f7f7;
}
.rr-bar-row.active {
    background: #fdf3dd;
}
.rr-bar-stars {
    width: 78px;
    flex-shrink: 0;
}
.rr-bar-stars .rr-star {
    font-size: 12px;
}
.rr-bar-track {
    flex: 1;
    height: 17px;
    background: #f0f0f0;
    overflow: hidden;
}
.rr-bar-fill {
    height: 100%;
    background: var(--rr-text);
}
.rr-bar-count {
    width: 32px;
    color: var(--rr-text-muted);
    font-size: 12px;
    text-align: right;
}

.rr-summary-cta {
    flex-shrink: 0;
}
.rr-summary.rr-summary-empty {
    justify-content: space-between;
}

/* ===== FILTER / SORT ===== */
.rr-filter-wrap {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.rr-filter-wrap select {
    padding: 8px 14px;
    border: 1px solid var(--rr-border);
    border-radius: var(--rr-radius);
    font-size: 14px;
    background: var(--rr-bg);
    color: var(--rr-text);
    cursor: pointer;
    outline: none;
}
.rr-filter-wrap select:focus {
    border-color: var(--rr-text);
}
.rr-write-review-btn {
    padding: 10px 24px;
    background: var(--rr-text);
    color: #fff;
    border: none;
    border-radius: var(--rr-radius);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.rr-write-review-btn:hover {
    background: #333;
}

/* ===== REVIEW LIST ===== */
.rr-review-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.rr-review-item {
    padding: 16px 0;
    border-bottom: 1px solid #f5f5f5;
}
.rr-review-item:last-child {
    border-bottom: none;
}
.rr-review-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -2px 0 0;
}
.rr-review-avatar {
    width: 36px;
    height: 36px;
    background: #e0e0e080;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rr-avatar-svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #505050;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.rr-review-name {
    font-weight: 500;
    color: var(--rr-text);
    font-size: 14px;
}
.rr-review-stars {
    font-size: var(--rr-size-review);
    display: inline-flex;
}
.rr-review-stars .rr-star {
    font-size: var(--rr-size-review);
}
.rr-review-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--rr-text);
    margin: 4px 0 6px;
}
.rr-review-text {
    font-size: 14px;
    color: #444;
    line-height: 1.7;
    margin: 0;
}

/* ===== STORE REPLY ===== */
.rr-store-reply {
    margin-top: 12px;
    margin-left: 10px;
    padding: 12px 16px;
    background: #fafafa;
    border-left: 3px solid var(--rr-text);
    border-radius: 0 var(--rr-radius) var(--rr-radius) 0;
}
.rr-store-reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}
.rr-store-badge {
    background: var(--rr-text);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 4px;
}
.rr-store-reply-text {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    margin: 0;
}

/* ===== MEDIA GRID ===== */
.rr-media-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.rr-media-item {
    width: 80px;
    height: 80px;
    border-radius: var(--rr-radius);
    overflow: hidden;
    border: 1px solid var(--rr-border);
    position: relative;
    cursor: pointer;
}
.rr-media-item img,
.rr-media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.rr-media-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 26px;
    height: 26px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    pointer-events: none;
}

/* ===== LIGHTBOX ===== */
.rr-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}
.rr-lightbox-overlay img,
.rr-lightbox-overlay video {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
}
.rr-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

/* ===== PAGINATION ===== */
.rr-pagination-wrap {
    text-align: center;
    margin-top: 24px;
}
.rr-pagination {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.rr-pagination button {
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    color: var(--rr-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, opacity 0.15s;
}
.rr-pagination .rr-page-nav {
    width: 32px;
    height: 32px;
    color: #333;
    padding: 0;
}
.rr-pagination .rr-page-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.rr-pagination .rr-page-nav:not(:disabled):hover {
    color: var(--rr-star-color, #ffb400);
}
.rr-pagination .rr-page-num {
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    font-size: 20px;
    font-weight: 400;
    color: #333;
}
.rr-pagination .rr-page-num:hover {
    color: #000;
}
.rr-pagination .rr-page-num.active {
    color: #9a9a9a;
    font-weight: 700;
}

/* ===== FORM ===== */
.rr-form-wrap {
    background: var(--rr-bg);
    border: 1px solid var(--rr-border);
    border-radius: 10px;
    padding: 32px;
    margin-top: 10px;
    display: none;
}
.rr-form-wrap.active {
    display: block;
    margin-block: 20px;
}
.rr-form-heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--rr-text);
    margin-bottom: 24px;
}
.rr-field {
    margin-bottom: 22px;
}
.rr-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--rr-text);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rr-label .rr-required {
    color: #e53935;
}
.rr-label .rr-optional {
    font-weight: 400;
    text-transform: none;
    color: var(--rr-text-muted);
}

.rr-star-picker {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}
.rr-star-picker .rr-pick-star {
    width: var(--rr-size-picker);
    height: var(--rr-size-picker);
    cursor: pointer;
    user-select: none;
}
.rr-star-picker .rr-pick-star .rr-star-svg {
    width: 100%;
    height: 100%;
    fill: #f2f2f2;
    stroke: var(--rr-star-stroke);
    stroke-width: var(--rr-stroke-width);
    stroke-linejoin: round;
    transition: fill 0.15s, stroke 0.15s;
}
.rr-star-picker .rr-pick-star.active .rr-star-svg,
.rr-star-picker .rr-pick-star.hover .rr-star-svg {
    fill: var(--rr-star-color);
    stroke: var(--rr-star-stroke);
}
.rr-rating-text-hint {
    font-size: 14px;
    color: #666;
    display: block;
    margin-top: 4px;
}

.rr-input,
.rr-textarea {
    width: 100%;
    border: 1px solid #d0d0d0;
    border-radius: var(--rr-radius);
    padding: 12px 14px;
    font-size: 15px;
    color: var(--rr-text);
    background: var(--rr-bg);
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.rr-input:focus,
.rr-textarea:focus {
    border-color: var(--rr-text);
}
.rr-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Upload */
.rr-upload-area {
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}
.rr-upload-area:hover {
    border-color: var(--rr-text);
}
.rr-upload-area .rr-upload-icon {
    font-size: 30px;
    color: #999;
}
.rr-upload-area .rr-upload-text {
    font-size: 14px;
    color: var(--rr-text-muted);
    margin-top: 4px;
}
.rr-upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.rr-preview-item {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: var(--rr-radius);
    overflow: hidden;
    border: 1px solid var(--rr-border);
}
.rr-preview-item img,
.rr-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rr-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
}

/* Upload progress ring (shown while a photo/video is uploading) */
.rr-preview-generic {
    background: #f2f2f2;
}
.rr-progress-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.45);
}
.rr-preview-item.rr-preview-pending img,
.rr-preview-item.rr-preview-pending video {
    filter: brightness(0.6);
}
.rr-progress-ring {
    transform: rotate(-90deg);
    position: absolute;
}
.rr-progress-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.35);
    stroke-width: 3;
}
.rr-progress-ring-fg {
    fill: none;
    stroke: var(--rr-star-color, #ffb400);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.15s linear;
}
.rr-progress-pct {
    position: relative;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.rr-preview-error {
    border-color: #e53935 !important;
}
.rr-progress-error-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e53935;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    cursor: help;
}

.rr-data-note {
    background: #f8f8f8;
    padding: 14px 18px;
    border-radius: var(--rr-radius);
    margin: 18px 0 22px;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}
.rr-data-note strong {
    color: var(--rr-text);
}
.rr-data-note p {
    margin: 0;
}

.rr-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.rr-submit-btn {
    padding: 12px 40px;
    background: var(--rr-text);
    color: #fff;
    border: none;
    border-radius: var(--rr-radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rr-submit-btn:hover {
    background: #333;
}
.rr-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.rr-cancel-btn {
    padding: 12px 24px;
    background: transparent;
    color: #666;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}
.rr-cancel-btn:hover {
    color: var(--rr-text);
}
.rr-form-message {
    padding: 12px 16px;
    border-radius: var(--rr-radius);
    margin-bottom: 16px;
    font-size: 14px;
}
.rr-form-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}
.rr-form-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .rr-summary {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    .rr-summary-left {
        min-width: unset;
        width: 100%;
    }
    .rr-summary-left .rr-big-stars .rr-star {
        font-size: 24px;
    }
    .rr-summary-left .rr-big-avg {
        font-size: 16px;
        font-weight: 600;
    }
    .rr-summary-right {
        width: 100%;
        border-left: none;
        border-right: none;
        padding: 12px 0;
        border-top: 1px solid var(--rr-border);
        border-bottom: 1px solid var(--rr-border);
    }
    .rr-bar-row {
        gap: 8px;
        font-size: 12px;
    }
    .rr-bar-stars {
        width: 62px;
    }
    .rr-bar-stars .rr-star {
        font-size: 10px;
    }
    .rr-bar-track {
        height: 17px;
    }
    .rr-bar-count {
        width: 28px;
        font-size: 11px;
    }
    .rr-summary-cta {
        width: 100%;
    }
    .rr-write-review-btn {
        width: 100%;
    }
    .rr-product-rating .rr-stars {
        font-size: 18px;
    }
    .rr-product-rating .rr-stars .rr-star {
        font-size: 18px;
    }
    .rr-product-rating .rr-rating-text {
        font-size: 14px;
    }
    .rr-shop-rating .rr-stars {
        font-size: 18px;
    }
    .rr-shop-rating .rr-stars .rr-star {
        font-size: 18px;
    }
    .rr-shop-rating .rr-rating-text {
        font-size: 9px;
        line-height: 0;
    }
    .rr-form-wrap {
        padding: 20px;
    }
    .rr-star-picker .rr-pick-star {
        width: 28px;
        height: 28px;
    }
    .rr-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .rr-submit-btn {
        width: 100%;
        text-align: center;
    }
    .rr-cancel-btn {
        text-align: center;
    }
    .rr-filter-wrap {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .rr-filter-wrap select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .rr-summary-left .rr-big-stars .rr-star {
        font-size: 24px;
    }
    .rr-product-rating .rr-stars {
        font-size: 16px;
    }
    .rr-product-rating .rr-stars .rr-star {
        font-size: 24px;
    }
    .rr-product-rating .rr-rating-text {
        font-size: 13px;
    }
}