/* ==========================================================================
   POST-PURCHASE REVIEWS — FRONT CSS
   ========================================================================== */

:root {
    --ppr-star-full: #f5b731;
    --ppr-star-empty: #d0d0d0;
    --ppr-accent: #00a0e3;
    --ppr-avatar: #00a0e3;
    --ppr-text: #333;
    --ppr-text-light: #777;
    --ppr-border: #e8e8e8;
    --ppr-bg-light: #f9f9f9;
    --ppr-radius: 6px;
}

/* ==========================================================================
   GWIAZDKI — SHARED (full / half / empty)
   ========================================================================== */

.ppr-star {
    font-style: normal;
    line-height: 1;
    display: inline-block;
}

.ppr-star--full {
    color: var(--ppr-star-full);
}

.ppr-star--empty {
    color: var(--ppr-star-empty);
}

.ppr-star--half-wrap {
    position: relative;
    display: inline-block;
    color: var(--ppr-star-empty);
}

.ppr-star--half-wrap .ppr-star-empty-under {
    color: var(--ppr-star-empty);
}

.ppr-star--half-wrap .ppr-star-half-inner {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    width: 50%;
    color: var(--ppr-star-full);
}

/* ==========================================================================
   PRODUCT BLOCK (hook: displayFooterProduct)
   ========================================================================== */

.ppr-product-block {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
}

.ppr-block-header {
    text-align: center;
    margin-bottom: 20px;
}

.ppr-block-title {
    display: inline-block;
    font-size: 22px;
    font-weight: 700;
    color: var(--ppr-accent);
    margin: 0 0 8px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--ppr-accent);
    font-style: italic;
}

/* --- SUMMARY --- */

.ppr-block-summary {
    text-align: center;
    margin-bottom: 30px;
}

.ppr-summary-label {
    font-size: 14px;
    color: var(--ppr-text-light);
    margin: 0 0 6px;
}

.ppr-summary-rating {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    margin-bottom: 6px;
}

.ppr-avg-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--ppr-accent);
    line-height: 1;
}

.ppr-avg-separator {
    font-size: 22px;
    color: var(--ppr-text-light);
    margin: 0 2px;
}

.ppr-avg-max {
    font-size: 22px;
    color: var(--ppr-text-light);
}

.ppr-summary-stars {
    display: flex;
    justify-content: center;
    gap: 3px;
}

.ppr-summary-stars .ppr-star,
.ppr-summary-stars .ppr-star--half-wrap {
    font-size: 30px;
}

.ppr-summary-count {
    font-size: 13px;
    color: var(--ppr-text-light);
    margin: 8px 0 0;
}

/* --- LISTA OPINII --- */

.ppr-block-reviews {
    margin-bottom: 20px;
    overflow-anchor: none;
}

.ppr-review-item {
    padding: 22px 0;
    border-bottom: 1px solid var(--ppr-border);
}

.ppr-review-item:first-child {
    border-top: 1px solid var(--ppr-border);
}

.ppr-review-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

/* --- AWATAR: bez kółka tła, kolor #00a0e3 --- */

.ppr-review-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ppr-avatar);
}

.ppr-review-avatar svg {
    width: 48px;
    height: 48px;
}

/* --- META --- */

.ppr-review-meta {
    flex: 1;
}

.ppr-reviewer-name {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--ppr-text);
    margin-bottom: 3px;
}

.ppr-review-stars-date {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ppr-review-stars .ppr-star,
.ppr-review-stars .ppr-star--half-wrap {
    font-size: 20px;
}

.ppr-review-date {
    font-size: 14px;
    color: var(--ppr-text-light);
}

/* --- TREŚĆ OPINII --- */

.ppr-review-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ppr-text);
    margin: 0;
    padding-left: 62px;
    
}

/* --- PRZYCISK "ZOBACZ WIĘCEJ" --- */

.ppr-block-action {
    text-align: center;
    margin-top: 25px;
}

.ppr-see-more-btn {
    display: inline-block;
    background: var(--ppr-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 50px;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    border:none;
}
.ppr-review-item.is-hidden {
    display: none;
}
.ppr-see-more-btn:hover {
    background: #0078b3;
    color: #fff;
    text-decoration: none;

}

/* --- BRAK OPINII --- */

.ppr-no-reviews {
    text-align: center;
    color: var(--ppr-text-light);
    font-size: 14px;
    padding: 15px 0;
}

/* ==========================================================================
   REVIEW FORM (review_form.tpl)
   ========================================================================== */

.ppr-review-page {
    max-width: 700px;
    margin: 30px auto;
    padding: 0 15px;
}

.ppr-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--ppr-text);
    margin-bottom: 25px;
}

.ppr-review-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* --- Product card --- */

.ppr-product-review {
    background: #fff;
    border: 1px solid var(--ppr-border);
    border-radius: var(--ppr-radius);
    padding: 24px;
    margin-bottom: 20px;
}

.ppr-product-review--done {
    opacity: 0.6;
}

.ppr-product-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.ppr-product-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid var(--ppr-border);
    flex-shrink: 0;
}

.ppr-product-info {
    flex: 1;
}

.ppr-product-info .ppr-product-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--ppr-text);
    margin: 0 0 4px;
}

.ppr-badge {
    display: inline-block;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
}

.ppr-badge--done {
    background: #e8f5e9;
    color: #2e7d32;
}

/* --- Label --- */

.ppr-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ppr-text);
    margin-bottom: 8px;
}

.ppr-required {
    color: #e53935;
}

/* --- Star Rating Widget (5 unicode stars, half-click via JS) --- */

.ppr-rating-section {
    margin-bottom: 20px;
}

.ppr-stars-widget {
    display: flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}

.ppr-sw-star {
    font-size: 36px;
    cursor: pointer;
    color: var(--ppr-star-empty);
    transition: color 0.12s;
    line-height: 1;
    position: relative;
}

.ppr-sw-star.full {
    color: var(--ppr-star-full);
}

.ppr-sw-star.half {
    color: var(--ppr-star-empty);
    background: linear-gradient(90deg, var(--ppr-star-full) 50%, var(--ppr-star-empty) 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ppr-sw-value {
    margin-left: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ppr-accent);
    min-width: 35px;
    -webkit-text-fill-color: var(--ppr-accent);
}

/* --- Comment textarea --- */

.ppr-comment-section {
    margin-bottom: 10px;
}

.ppr-textarea {
    width: 100%;
    min-height: 110px;
    border: 1px solid var(--ppr-border);
    border-radius: var(--ppr-radius);
    padding: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.ppr-textarea:focus {
    border-color: var(--ppr-accent);
    outline: none;
}

.ppr-char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--ppr-text-light);
    margin-top: 4px;
}

/* --- Notice --- */

.ppr-notice {
    font-size: 13px;
    color: var(--ppr-text-light);
    margin-bottom: 15px;
}

.ppr-notice p {
    margin: 0;
}

.ppr-notice--info {
    padding: 10px 14px;
    background: var(--ppr-bg-light);
    border-radius: var(--ppr-radius);
    border: 1px solid var(--ppr-border);
}

/* --- Submit button --- */

.ppr-submit-section {
    margin-top: 10px;
}

.ppr-submit-section .ppr-submit-btn {
    display: inline-block;
    float: right;
    width: auto;
    max-width: none;
    margin: 0;
    background: var(--ppr-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 40px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.ppr-submit-section .ppr-submit-btn:hover {
    background: #0088b5;
}

.ppr-submit-section::after {
    content: '';
    display: table;
    clear: both;
}

/* ==========================================================================
   SUCCESS PAGE (review_success.tpl)
   ========================================================================== */

.ppr-success-page {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 15px;
}

.ppr-success-box {
    text-align: center;
    margin-bottom: 30px;
}

.ppr-success-icon {
    width: 64px;
    height: 64px;
    background: #e8f5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 30px;
    color: #4caf50;
    line-height: 1;
}

.ppr-success-box h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--ppr-text);
    margin: 0 0 8px;
}

.ppr-success-box > p {
    font-size: 15px;
    color: var(--ppr-text);
    margin: 0 0 4px;
}

.ppr-moderation-info {
    font-size: 13px;
    color: var(--ppr-text-light);
    margin: 0 0 25px;
}

/* --- Coupon box --- */

.ppr-coupon-box {
    background: #fff;
    border: 1px solid var(--ppr-border);
    border-radius: var(--ppr-radius);
    padding: 24px;
    margin: 25px 0;
    text-align: center;
}

.ppr-coupon-box h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--ppr-text);
    margin: 0 0 6px;
}

.ppr-coupon-box > p {
    font-size: 14px;
    color: var(--ppr-text-light);
    margin: 0 0 14px;
}

.ppr-coupon-code-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.ppr-coupon-code {
    display: inline-block;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--ppr-text);
    background: var(--ppr-bg-light);
    border: 2px dashed var(--ppr-border);
    padding: 10px 24px;
    border-radius: var(--ppr-radius);
}

.ppr-copy-btn {
    background: #fff;
    border: 1px solid var(--ppr-border);
    border-radius: var(--ppr-radius);
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s;
}

.ppr-copy-btn:hover {
    background: var(--ppr-bg-light);
}

.ppr-coupon-info {
    font-size: 13px;
    color: var(--ppr-text-light);
    margin: 0;
}

.ppr-coupon-info strong {
    color: var(--ppr-accent);
}

/* --- Actions --- */

.ppr-actions {
    text-align: center;
    margin-top: 20px;
}

.ppr-actions .btn {
    display: inline-block;
    background: var(--ppr-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 40px;
    border-radius: 30px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    transition: background 0.2s;
}

.ppr-actions .btn:hover {
    background: #0088b5;
    color: #fff;
    text-decoration: none;
}

/* --- Warning notice --- */

.ppr-notice--warning {
    padding: 14px 18px;
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    border-radius: var(--ppr-radius);
    color: #e65100;
    font-size: 14px;
    margin-bottom: 20px;
}

.ppr-notice--warning h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
}

.ppr-notice--warning ul {
    margin: 0;
    padding-left: 18px;
}

.ppr-notice--warning li {
    margin-bottom: 3px;
}

/* ==========================================================================
   ERROR PAGE
   ========================================================================== */

.ppr-error-wrap {
    max-width: 500px;
    margin: 60px auto;
    text-align: center;
    padding: 0 15px;
}

.ppr-error-code {
    font-size: 72px;
    font-weight: 700;
    color: #ddd;
    margin-bottom: 5px;
}

.ppr-error-message {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.ppr-error-hint {
    color: var(--ppr-text-light);
    font-size: 13px;
    margin-bottom: 20px;
}

/* ==========================================================================
   FULL LIST PAGE
   ========================================================================== */

.ppr-list-wrap {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 15px;
}

.ppr-distribution {
    margin-bottom: 25px;
}

.ppr-dist-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.ppr-dist-label {
    width: 40px;
    text-align: right;
    font-size: 13px;
    color: var(--ppr-text-light);
}

.ppr-dist-bar-bg {
    flex: 1;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.ppr-dist-bar-fill {
    height: 100%;
    background: var(--ppr-star-full);
    border-radius: 5px;
    transition: width 0.4s ease;
}

.ppr-dist-count {
    width: 30px;
    font-size: 13px;
    color: var(--ppr-text-light);
}

.ppr-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.ppr-pagination a,
.ppr-pagination span {
    display: inline-block;
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid var(--ppr-border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--ppr-text);
}

.ppr-pagination span.current {
    background: var(--ppr-accent);
    color: #fff;
    border-color: var(--ppr-accent);
}

.ppr-pagination a:hover {
    background: var(--ppr-bg-light);
}

.ppr-load-more-btn {
    display: block;
    width: 200px;
    margin: 20px auto;
    background: var(--ppr-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 10px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
}

.ppr-load-more-btn:hover {
    background: #0096b7;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 576px) {
    .ppr-block-title {
        font-size: 18px;
    }

    .ppr-avg-number {
        font-size: 28px;
    }

    .ppr-review-text {
        padding-left: 0;
    }

    .ppr-review-header {
        gap: 10px;
    }

    .ppr-review-avatar,
    .ppr-review-avatar svg {
        width: 38px;
        height: 38px;
    }

    .ppr-reviewer-name {
        font-size: 16px;
    }

    .ppr-see-more-btn {
        padding: 10px 35px;
        font-size: 14px;
    }

    .ppr-product-info {
        flex-direction: column;
        text-align: center;
    }
}
/* ==========================================================================
   ERROR PAGE
   ========================================================================== */

.ppr-error-wrap {
    max-width: 480px;
    margin: 60px auto;
    text-align: center;
    padding: 40px 30px;
    background: #fff;
    border: 1px solid var(--ppr-border);
    border-radius: var(--ppr-radius);
}

.ppr-error-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    color: #e53935;
}
.ppr-review-text{

    overflow-wrap: anywhere;   /* najlepsze na długie ciągi */

}
.ppr-read-more{
    background: none;
    border: 0;
    padding: 0;
    margin-top: 6px;
    cursor: pointer;
    text-decoration: underline;
    font-size: 13px;
    opacity: .85;
}
.ppr-read-more:hover{ opacity: 1; }

.ppr-error-code {
    font-size: 56px;
    font-weight: 800;
    color: #e0e0e0;
    line-height: 1;
    margin-bottom: 8px;
}

.ppr-error-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--ppr-text);
    margin: 0 0 10px;
}

.ppr-error-message {
    font-size: 14px;
    color: var(--ppr-text);
    margin: 0 0 6px;
    line-height: 1.5;
}

.ppr-error-hint {
    font-size: 13px;
    color: var(--ppr-text-light);
    margin: 0 0 24px;
    line-height: 1.5;
}

.ppr-error-actions {
    margin-top: 10px;
}

.ppr-btn {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 36px;
    border-radius: 12px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.ppr-btn--primary {
    background: var(--ppr-accent);
    color: #fff;
}

.ppr-btn--primary:hover {
    background: #0088b5;
    color: #fff;
    text-decoration: none;
}