/* Main Container */
.review-summary {
    padding: 32px;
    background-color: #fff;
    border-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
}

/* Header Section */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.review-header-left h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #111;
}

.review-score-container {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.review-score {
    font-size: 40px;
    font-weight: 700;
}

.review-stars-wrapper {
    display: flex;
    flex-direction: column;
}

.review-stars {
    color: #ff9f00;
    font-size: 20px;
    letter-spacing: 2px;
}

.review-count {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

/* Breakdown Bars */
.review-breakdown {
    flex: 1;
    max-width: 400px;
    margin: 0 40px;
}

.review-bar-row {
    display: flex;
    align-items: center;
    font-size: 12px;
    margin: 4px 0;
    color: #666;
}

.review-bar-label {
    width: 50px;
}

.review-bar-container {
    flex-grow: 1;
    background-color: #eee;
    height: 4px;
    border-radius: 2px;
    margin: 0 10px;
    overflow: hidden;
}

.review-bar-fill {
    background-color: #ff9f00;
    height: 100%;
}

.review-bar-percent {
    width: 30px;
}

/* Recommend Circular Progress */
.review-recommend-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.circular-progress {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(#000 var(--percent), #eee 0deg);
}

.circular-progress::before {
    content: "";
    position: absolute;
    width: 42px;
    height: 42px;
    background-color: #fff;
    border-radius: 50%;
}

.circular-progress span {
    position: relative;
    font-weight: 700;
    font-size: 14px;
}

.recommend-text {
    font-size: 13px;
    line-height: 1.2;
}

.recommend-text strong {
    display: block;
    font-size: 14px;
}

.review-button {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 18px 10px;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 0;
}

.review-card-user img.review-avatar {
    height: 27px;
    width: 27px;
}

/* Global Media Gallery */
.global-review-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 32px;
    scrollbar-width: thin;
}

.global-gallery-item {
    flex: 0 0 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.global-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* AI Summary */
.ai-summary {
    background-color: #f4f4f4;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 32px;
}

.ai-summary h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px 0;
}

.ai-summary p {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    margin: 0;
}

/* Filters */
.review-filters {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.review-filters select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background-color: #f9f9f9;
}

.review-filters label {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* Review Cards */
.review-cards {
    display: flex;
    flex-direction: column;
}

.review-card {
    padding: 40px 0;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
}

.review-card-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn:hover {
    background: #f9f9f9;
    color: #000;
}

.review-user-header {
    display: flex;
    gap: 12px;
    margin-bottom: 4px;
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.review-user-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.review-user-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.user-info-name {
    font-weight: 700;
    font-size: 14px;
    color: #000;
}

.user-flag {
    width: 16px;
    height: auto;
}

.review-verified-badge {
    background-color: #e6f9f0;
    color: #008a4b;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.review-date {
    font-size: 12px;
    color: #666;
}

.review-rating-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.review-stars-inline {
    color: #ff9f00;
    font-size: 18px;
    letter-spacing: -2px;
}

.recommend-badge-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #111;
}

.review-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    color: #000;
}

.review-content {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

.review-media-gallery {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.review-media-item {
    width: 50px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.review-media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-tags-links {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

.review-tag-link {
    color: #666;
    text-decoration: underline;
}

.review-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: background 0.2s;
}

.action-btn:hover {
    background: #f9f9f9;
}

.report-link {
    font-size: 13px;
    color: #333;
    text-decoration: none;
    margin-left: 8px;
}

.review-card-criteria {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Criteria Ratings */
.criterion-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.criterion-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
}

.criterion-bar-bg {
    background-color: #eee;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
}

.criterion-bar-fill {
    background-color: #000;
    height: 100%;
}

/* Pagination */
.review-pagination {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 40px;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    background: transparent;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    color: #000;
}

.pagination-btn.active {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

/* Review Modal & Form */
.review-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.review-modal-content {
    background-color: #fff;
    margin: 50px auto;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 640px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.review-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    font-weight: 400;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.review-modal-close:hover {
    color: #000;
}

.review-modal h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
}

.review-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    grid-column: 1 / -1;
}

.review-form .form-group[data-field="firstName"],
.form-group[data-field="lastName"],
.form-group[data-field="reviewTitle"],
.form-group[data-field="emailAddress"] {
    grid-column: span 1;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #111;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group textarea {
    padding: 12px 14px;
    border: 1px solid var(--rs-border, #ddd);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    color: #111;
}

.form-group input[type="text"]::placeholder,
.form-group input[type="email"]::placeholder,
.form-group input[type="url"]::placeholder,
.form-group textarea::placeholder {
    color: #a3a3a4;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Overall Rating — stacked, large stars */
.overall-rating-group .star-rating label {
    font-size: 26px;
}

/* Multi-criteria Rating — grouped, inline rows */
.multi-criteria-title {
    grid-column: 1 / -1;
    font-size: 14px;
    font-weight: 700;
    color: #111;
    margin: 8px 0 0;
}

.multi-criteria-group {
    gap: 12px;
}

.rating-group {
    flex-direction: row;
    align-items: center;
    gap: 20px;
    margin-bottom: 0;
}

.rating-group label {
    margin-bottom: 0;
}

.rating-group .rating-label {
    font-size: 13px;
    font-weight: 500;
    color: #111;
    width: 130px;
    flex-shrink: 0;
}

.multi-criteria-group .star-rating label {
    font-size: 18px;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 2px;
    /* WooCommerce Overrides */
    float: none !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    font-family: inherit !important;
}

.woocommerce-js .star-rating::before {
    display: none !important;
}

.star-rating input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.star-rating label {
    font-size: 24px !important;
    color: #ddd;
    cursor: pointer;
    line-height: 1;
    display: inline-block;
    transition: color 0.2s;
}

.star-rating input:checked~label,
.star-rating label:hover,
.star-rating label:hover~label {
    color: var(--rs-rating, #ff9f00);
}

/* Upload dropzones */
.upload-dropzone-group {
    gap: 8px;
}

.rs-dropzone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 18px 12px;
    border: 1px dashed var(--rs-border, #cececf);
    border-radius: 8px;
    background: transparent;
    color: #8c8c8d;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
    font-weight: 400;
}

.rs-dropzone:hover,
.rs-dropzone.is-dragover {
    border-color: var(--rs-rating, #ff8a3d);
    background-color: var(--rs-secondary-bg, #f9f9f9);
}

.rs-dropzone svg {
    flex-shrink: 0;
    color: #8c8c8d;
}

.rs-dropzone-text {
    font-size: 12px;
    color: #8c8c8d;
    font-weight: 400;
}

.rs-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Checkbox fields — Recommendation / Anonymous Rating */
.checkbox-field {
    gap: 8px;
}

.checkbox-field-title {
    font-size: 13px;
    font-weight: 600;
    color: #111;
}

.rs-checkbox-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 400;
    color: #444;
    cursor: pointer;
    user-select: none;
}

.rs-checkbox-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rs-form-check-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 16px;
    width: 16px;
    border-radius: 4px;
    border: 1.5px solid var(--rs-border, #cececf);
    background: #fff;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}

.rs-checkbox-option input:checked~.rs-form-check-box {
    background: var(--rs-primary-bg, #4946fe);
    border-color: var(--rs-primary-bg, #4946fe);
}

.rs-checkbox-option input:checked~.rs-form-check-box::after {
    content: '';
    display: block;
    width: 4px;
    height: 8px;
    border: 1.5px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
}

.review-form .form-actions {
    display: flex;
    margin-top: 8px;
    gap: 10px;
}

.btn-submit {
    width: 100%;
    background-color: var(--rs-primary-bg, #4946fe);
    color: var(--rs-tertiary-text, #fff);
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.btn-submit:hover {
    opacity: 0.9;
}

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

/* Report Review modal actions — same button family as .btn-submit (Write a Review),
   kept as separate classes since assets/js/single-product.js targets .review-form-submit directly. */
.review-form-submit {
    background-color: #000;
    color: #fff;
    padding: 12px 32px;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
}

.review-form-cancel {
    background-color: #fff;
    color: #000;
    padding: 12px 32px;
    border: 1px solid #000;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 640px) {
    .review-form {
        grid-template-columns: 1fr;
    }

    .form-group[data-field] {
        grid-column: 1 / -1;
    }

    .review-modal-content {
        padding: 24px;
        margin: 20px auto;
    }
}

@media (max-width: 1024px) {
    .review-card {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .review-breakdown {
        display: none;
    }
}

/* Showcase: Widget root */
.reviewscribe-widget-root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Showcase: Review card — matches Figma node 2644-13482 */
.reviewscribe-card {
    background: #FFFFFF;
    border: 1px solid #CECECF;
    border-radius: 6px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
}

/* Showcase Carousel */
.reviewscribe-showcase-review-carousel {
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    gap: 16px !important;
}

.reviewscribe-showcase-review-carousel::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

/* Carousel cards — flex: 0 0 auto so they don't shrink */
.reviewscribe-showcase-review-carousel .reviewscribe-card {
    flex: 0 0 300px;
    min-width: 300px;
}

@media (min-width: 768px) {
    .reviewscribe-showcase-review-carousel .reviewscribe-card {
        flex: 0 0 340px;
        min-width: 340px;
    }
}

@media (min-width: 1200px) {
    .reviewscribe-showcase-review-carousel .reviewscribe-card {
        flex: 0 0 376px;
        min-width: 376px;
    }
}

/* Grid layout cards */
.reviewscribe-showcase-review-grid .reviewscribe-card {
    width: 100%;
}

/* Dots — Figma: active 11px rgba(0,0,0,0.25)+border, inactive 8px rgba(0,0,0,0.1) */
.rs-dot {
    transition: all 0.25s ease;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-block;
}

.rs-dot.active{
    width: 11px !important;
    height: 11px !important;
    background: rgba(0, 0, 0, 0.25) !important;
    border: 0.5px solid rgba(0, 0, 0, 0.2) !important;
}

/* Nav arrows — Figma: 1px border rgba(0,0,0,0.2), 40px circle, transparent bg */
.rs-prev,
.rs-next {
    transition: background-color 0.2s ease, transform 0.2s ease;
    z-index: 100 !important;
    outline: none;
}

/* No ::before arrows — SVG icons are embedded in the buttons */
.rs-prev::before,
.rs-next::before {
    content: none;
}

.rs-prev:hover,
.rs-next:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    transform: translateY(-50%) scale(1.06) !important;
}

/* Share Menu */
.share-container {
    position: relative;
    z-index: 100;
}

.share-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 0;
    width: 180px;
    /* Reduced width */
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #eee;
    padding: 6px 0;
    margin-bottom: 8px;
    animation: fadeIn 0.2s ease-out;
}

.share-item {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Reduced gap */
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.1s;
}

.share-item:hover {
    background-color: #f5f5f5;
    color: #000;
}

.share-item svg {
    flex-shrink: 0;
}

.woocommerce-product-rating {
    display: none !important;
}

.woocommerce-js .star-rating span {
    display: none;
}

/* ── ReviewScribe Widget: hide scrollbars on carousel tracks ───────────────── */
.reviewscribe-showcase-review-carousel::-webkit-scrollbar,
.reviewscribe-showcase-video-carousel::-webkit-scrollbar {
    display: none;
}

/* ── Video Card ────────────────────────────────────────────────────────────── */
.rs-video-card {
    position: relative;
    min-width: 280px;
    flex: 0 0 280px;
    border-radius: 16px;
    overflow: visible;
    scroll-snap-align: start;
}

/* ── Grid Card ─────────────────────────────────────────────────────────────── */
.rs-grid-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Grid Wrapper ──────────────────────────────────────────────────────────── */
.rs-grid-wrapper {
    width: 100%;
    box-sizing: border-box;
}

/* ── Floating Panel ────────────────────────────────────────────────────────── */
.rs-floating-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.rs-floating-panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.rs-floating-reviews {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}

.rs-floating-reviews::-webkit-scrollbar {
    width: 4px;
}

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

.rs-floating-reviews::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 4px;
}

.rs-floating-close-tab {
    transition: opacity 0.2s ease;
}

.rs-floating-close-tab:hover {
    opacity: 0.85;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
    .rs-floating-panel {
        width: calc(100vw - 40px) !important;
    }
    .rs-video-card {
        min-width: 240px;
        flex: 0 0 240px;
    }
    .rs-grid-wrapper {
        padding: 20px 16px !important;
    }
}
/* ── Video Theatre Modal ───────────────────────────────────────────────────── */
#rs-video-modal {
    animation: rs-backdrop-in 0.2s ease;
}

#rs-video-modal > div {
    animation: rs-modal-in 0.25s ease;
}

@keyframes rs-backdrop-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes rs-modal-in {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

#rs-modal-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#rs-modal-close:hover {
    background: #f3f4f6;
}

#rs-modal-review {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.15) transparent;
}

#rs-modal-review::-webkit-scrollbar {
    width: 4px;
}

#rs-modal-review::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
}

@media (max-width: 768px) {
    #rs-video-modal > div {
        flex-direction: column;
        max-height: 95vh;
    }
    #rs-video-modal > div > div:last-child {
        /* header row */
    }
    /* Stack the body columns vertically */
    #rs-video-modal > div > div:nth-child(2) {
        flex-direction: column;
    }
    #rs-video-modal #rs-modal-author {
        width: 100% !important;
        border-left: none !important;
        border-top: 1px solid #cececf;
    }
}

.review-form input[type="checkbox" i] {width: 28px;height: 20px;}

.review-form .form-group label {
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
}

.review-form .form-group label span.required {
    padding-left: 3px;
}
.review-form input {
    border-radius: 8px !important;
}
.multi-criteria-group .rating-group {
    display: flex;
}