/* ---- Header row ---- */
.pw-reviews-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.pw-add-review-btn {
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}
.pw-add-review-btn:hover { background: #333; }

/* ---- Rating breakdown ---- */
.pw-rating-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.pw-rating-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 100px;
}
.pw-rating-average { font-size: 40px; font-weight: 600; line-height: 1; }
.pw-rating-outof   { font-size: 13px; color: #777; margin-top: 4px; }
.pw-rating-total   { font-size: 13px; color: #777; margin-top: 2px; }

.pw-rating-bars {
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pw-rating-row {
    display: grid;
    grid-template-columns: 50px 1fr 30px;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
.pw-rating-track {
    background: #eee;
    border-radius: 3px;
    height: 8px;
    overflow: hidden;
}
.pw-rating-fill {
    display: block;
    height: 100%;
    background: #1a1a1a;
    border-radius: 3px;
}
.pw-rating-count { text-align: right; color: #777; }

/* ---- Carousel ---- */
.pw-reviews-carousel { position: relative; }

.commentlist.pw-carousel-list {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 12px;
    margin: 0;
    list-style: none;
    scrollbar-width: thin;
}
.commentlist.pw-carousel-list::-webkit-scrollbar { height: 6px; }
.commentlist.pw-carousel-list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

.commentlist.pw-carousel-list > li.review {
    flex: 0 0 300px;
    scroll-snap-align: start;
    background: #fafafa;
    border-radius: 6px;
    padding: 18px;
    box-sizing: border-box;
}

.pw-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.pw-carousel-prev { left: -18px; }
.pw-carousel-next { right: -18px; }

@media (max-width: 500px) {
    .pw-carousel-nav { display: none; } /* rely on swipe on mobile */
    .commentlist.pw-carousel-list > li.review { flex-basis: 85%; }
}

/* ---- Modal ---- */
.pw-review-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}
.pw-review-modal-overlay.is-visible { display: flex; }

.pw-review-modal {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.pw-review-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #555;
}

body.pw-modal-open { overflow: hidden; }
/* ---- Kill Elementor/Hello Theme default button styling ---- */
.pw-add-review-btn,
.pw-carousel-nav,
.pw-review-modal-close {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
}

.pw-add-review-btn:hover,
.pw-add-review-btn:focus,
.pw-add-review-btn:active,
.pw-add-review-btn:visited,
.pw-carousel-nav:hover,
.pw-carousel-nav:focus,
.pw-carousel-nav:active,
.pw-carousel-nav:visited,
.pw-review-modal-close:hover,
.pw-review-modal-close:focus,
.pw-review-modal-close:active,
.pw-review-modal-close:visited {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    border-color: transparent !important;
}

/* Add a Review button - force our own colours, no pink ever */
.pw-add-review-btn {
    background-color: #3F5751 !important;
    color: #fff !important;
    padding: 10px 20px !important; /* re-add padding just for this one, it needs it */
    border-radius: 6px !important;
}
.pw-add-review-btn:hover,
.pw-add-review-btn:focus {
    background-color: #3F5751 !important;
    color: #fff !important;
}

/* Carousel arrows - icon only, totally bare */
.pw-carousel-nav {
    background: transparent !important;
    background-color: transparent !important;
    color: #1a1a1a !important;
	    font-size: 32px !important;
    line-height: 1 !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.pw-carousel-nav:hover,
.pw-carousel-nav:focus {
    background: transparent !important;
    background-color: transparent !important;
    color: #1a1a1a !important;
}

/* Modal close icon - icon only, totally bare */
.pw-review-modal-close {
    background: transparent !important;
    background-color: transparent !important;
    color: #555 !important;
	font-size: 28px !important;
    line-height: 1 !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.pw-review-modal-close:hover,
.pw-review-modal-close:focus {
    background: transparent !important;
    background-color: transparent !important;
    color: #1a1a1a !important;
}