.cpr-widget,
.cpr-widget * {
    box-sizing: border-box;
}

.cpr-widget {
    width: 100%;
}

.cpr-title {
    margin: 0 0 1.5rem;
}

.cpr-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.cpr-review-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 28px;
    background: #fff;
    border: 1px solid #e7e9ec;
    border-radius: 12px;
}

.cpr-stars,
.cpr-form-stars {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cpr-stars {
    color: #f5a623;
    margin-bottom: 16px;
}

.cpr-star-icon,
.cpr-verified-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.cpr-stars svg,
.cpr-form-star svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.cpr-stars i,
.cpr-form-star i {
    font-size: 16px;
}

.cpr-review-text {
    margin-bottom: 22px;
}

.cpr-review-text > :first-child {
    margin-top: 0;
}

.cpr-review-text > :last-child {
    margin-bottom: 0;
}

.cpr-meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
}

.cpr-author-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.cpr-author {
    font-weight: 600;
}

.cpr-date {
    flex: 0 0 auto;
    font-size: 0.875em;
    opacity: 0.72;
}

.cpr-verified {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #edf8f1;
    color: #1f7a45;
    font-size: 0.78em;
    line-height: 1.2;
}

.cpr-verified svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.cpr-empty {
    padding: 24px 0;
}

.cpr-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}

.cpr-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid #e2e5e9;
    border-radius: 6px;
    text-decoration: none;
}

.cpr-pagination .current {
    font-weight: 700;
}

.cpr-carousel-shell {
    position: relative;
    overflow: visible;
    width: 100%;
}

.cpr-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 0;
}

.cpr-carousel .swiper-wrapper {
    align-items: stretch;
}

.cpr-carousel .swiper-slide {
    display: flex;
    height: auto;
    box-sizing: border-box;
}

.cpr-carousel-shell.cpr-equal-height .swiper-slide > .cpr-review-card {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
}

.cpr-carousel-shell.cpr-natural-height .swiper-wrapper {
    align-items: flex-start;
}

.cpr-carousel-shell.cpr-natural-height .swiper-slide {
    align-self: flex-start;
}

.cpr-carousel-shell.cpr-natural-height .swiper-slide > .cpr-review-card {
    width: 100%;
}

.cpr-pagination-dots {
    position: absolute;
    z-index: 4;
    left: 0;
    bottom: 0;
    width: 100%;
    min-height: 20px;
    margin: 0;
}

.cpr-carousel-shell.cpr-pagination-default .cpr-pagination-dots.swiper-pagination-bullets {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpr-carousel-shell.cpr-pagination-custom .cpr-pagination-dots {
    right: auto;
    bottom: auto;
    width: auto;
    transform: translate(-50%, -50%);
}

.cpr-carousel-shell.cpr-pagination-custom .cpr-pagination-dots.swiper-pagination-bullets {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpr-pagination-dots.swiper-pagination-bullets .swiper-pagination-bullet {
    margin: 0;
    flex: 0 0 auto;
    opacity: .35;
    transition: opacity .2s ease, transform .2s ease, background-color .2s ease;
}

.cpr-pagination-dots.swiper-pagination-bullets .swiper-pagination-bullet-active {
    opacity: 1;
}

.cpr-pagination-dots.swiper-pagination-fraction {
    display: block;
    line-height: 1.4;
    text-align: center;
}

.cpr-pagination-dots.swiper-pagination-progressbar {
    top: auto;
    width: 100%;
}

.cpr-nav {
    position: absolute;
    z-index: 5;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 1px solid #e2e5e9;
    border-radius: 50%;
    background: #fff;
    color: #222;
    cursor: pointer;
    line-height: 1;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, opacity .2s ease, transform .2s ease;
}

.cpr-carousel-shell.cpr-nav-default .cpr-nav {
    transform: translateY(-50%);
}

.cpr-carousel-shell.cpr-nav-default .cpr-nav-prev {
    left: 10px;
    right: auto;
}

.cpr-carousel-shell.cpr-nav-default .cpr-nav-next {
    right: 10px;
    left: auto;
}

.cpr-carousel-shell.cpr-nav-custom .cpr-nav {
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
}

.cpr-carousel-shell.cpr-nav-custom .cpr-nav-prev {
    left: 0;
    top: 50%;
}

.cpr-carousel-shell.cpr-nav-custom .cpr-nav-next {
    left: 100%;
    top: 50%;
}

.cpr-nav svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.cpr-nav i {
    color: currentColor;
    line-height: 1;
}

.cpr-nav.swiper-button-disabled {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none;
}

.cpr-form-wrap {
    margin-top: 42px;
    scroll-margin-top: 32px;
}

.cpr-order-review-action {
    margin-top: 12px;
}

.cpr-order-review-action .button,
.cpr-download-review-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.woocommerce-MyAccount-downloads .download-review {
    white-space: nowrap;
}

.cpr-form-title {
    margin: 0 0 22px;
}


.cpr-field {
    margin-bottom: 18px;
}

.cpr-field label,
.cpr-rating-label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.cpr-field input,
.cpr-field textarea {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #d8dde3;
    border-radius: 6px;
    background: #fff;
    color: #1c2024;
    font: inherit;
}

.cpr-field textarea {
    min-height: 130px;
    resize: vertical;
}

.cpr-field-help {
    display: block;
    margin-top: 7px;
    font-size: 0.85em;
    line-height: 1.45;
    opacity: 0.72;
}

.cpr-login-required {
    padding: 20px;
    border: 1px solid #e2e5e9;
    border-radius: 8px;
    background: #f8f9fa;
}

.cpr-login-required p {
    margin: 0 0 14px;
}

.cpr-login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 6px;
    background: #222;
    color: #fff;
    text-decoration: none;
}

.cpr-login-link:hover,
.cpr-login-link:focus-visible {
    color: #fff;
    text-decoration: none;
}

.cpr-rating-field {
    margin-bottom: 18px;
}

.cpr-form-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 2px;
    border: 0;
    background: transparent;
    color: #c8cdd2;
    cursor: pointer;
    box-shadow: none;
}

.cpr-form-star:hover,
.cpr-form-star:focus-visible,
.cpr-form-star.is-active {
    color: #f5a623;
    background: transparent;
}

.cpr-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 20px;
    border: 0;
    border-radius: 6px;
    background: #222;
    color: #fff;
    cursor: pointer;
}

.cpr-submit:disabled {
    opacity: .65;
    cursor: wait;
}

.cpr-form-message {
    margin-top: 14px;
    font-size: .95em;
}

.cpr-form-message.is-success { color: #1f7a45; }
.cpr-form-message.is-error { color: #b42318; }

.cpr-honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
}

.cpr-editor-notice {
    padding: 16px;
    border: 1px dashed #c4c8cc;
    background: #f7f8f9;
}

@media (max-width: 767px) {
    .cpr-grid {
        grid-template-columns: 1fr;
    }


    .cpr-meta {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* My Account review actions */
.cpr-account-review-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.cpr-orders-product-review {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 180px;
}

.cpr-orders-product-review + .cpr-orders-product-review {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.cpr-orders-product-name {
    display: block;
    max-width: 280px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}

.cpr-edit-review-button {
    opacity: 0.92;
}

.cpr-edit-review-notice {
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #d8dde3;
    border-radius: 6px;
    background: #f8f9fa;
    line-height: 1.5;
}

@media (max-width: 767px) {
    .cpr-orders-product-review {
        min-width: 0;
    }

    .cpr-orders-product-name {
        max-width: 100%;
    }
}

.cpr-review-already-submitted a {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

/* Swiper watchOverflow: hide navigation when every review already fits. */
.cpr-nav.swiper-button-lock,
.cpr-pagination-dots.swiper-pagination-lock,
.cpr-carousel-shell.cpr-carousel-locked .cpr-nav,
.cpr-carousel-shell.cpr-carousel-locked .cpr-pagination-dots,
.cpr-nav[hidden],
.cpr-pagination-dots[hidden] {
    display: none !important;
}
