/**
 * AshesWP 1.8.15 — product reviews UI (Woo comments/reviews hooks preserved).
 * Loaded only on single product.
 */

.asheswp-product-reviews {
    --pr-border: var(--asheswp-border, #e4e7eb);
    --pr-surface: var(--asheswp-surface, #fff);
    --pr-soft: var(--asheswp-surface-soft, #f7f8fa);
    --pr-text: var(--asheswp-text-primary, #1c2128);
    --pr-muted: var(--asheswp-text-secondary, #4d5560);
    --pr-primary: var(--asheswp-color-primary, #ff7239);
    --pr-radius: var(--asheswp-radius-lg, 16px);
    color: var(--pr-text);
}

.asheswp-product-reviews__header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--pr-border);
}

.asheswp-product-reviews__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
}

.asheswp-product-reviews__score {
    display: flex;
    align-items: baseline;
    gap: 4px;
    line-height: 1;
}

.asheswp-product-reviews__score-value {
    font-size: clamp(2rem, 1.6rem + 1.2vw, 2.6rem);
    font-family: var(--SemiBold, inherit);
    color: var(--pr-text);
}

.asheswp-product-reviews__score-max {
    color: var(--pr-muted);
    font-size: 14px;
}

.asheswp-product-reviews__count {
    margin: 6px 0 0;
    color: var(--pr-muted);
    font-size: 14px;
}

.asheswp-product-reviews__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 14px;
}

.asheswp-product-reviews__list > li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.asheswp-product-reviews__list > li::before,
.asheswp-product-reviews__list > li::after {
    display: none !important;
}

.asheswp-review-card__inner {
    padding: 16px 18px;
    border: 1px solid var(--pr-border);
    border-radius: var(--pr-radius);
    background: var(--pr-surface);
}

.asheswp-review-card--admin > .asheswp-review-card__inner,
.asheswp-review-card.byadmin > .asheswp-review-card__inner {
    border-color: color-mix(in srgb, var(--pr-primary) 35%, var(--pr-border));
    background: var(--asheswp-surface-warm, #fff5ef);
}

.asheswp-review-card--reply {
    margin-inline-start: clamp(12px, 3vw, 28px);
}

.asheswp-review-card__reply-label {
    margin: 0 0 8px;
    color: var(--pr-primary);
    font-size: 12px;
    font-family: var(--SemiBold, inherit);
}

.asheswp-review-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.asheswp-review-card__identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.asheswp-review-card__avatar {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--pr-soft);
    color: var(--pr-muted);
    flex: 0 0 40px;
}

.asheswp-review-card--admin .asheswp-review-card__avatar {
    color: var(--pr-primary);
    background: color-mix(in srgb, var(--pr-primary) 12%, var(--pr-soft));
}

.asheswp-review-card__name {
    display: block;
    color: var(--pr-text);
    font-family: var(--SemiBold, inherit);
    font-size: 14px;
}

.asheswp-review-card__date {
    display: block;
    margin-top: 2px;
    color: var(--pr-muted);
    font-size: 12px;
}

.asheswp-review-card__body {
    color: var(--pr-text);
    font-size: 14px;
    line-height: 1.9;
}

.asheswp-review-card__body p {
    margin: 0 0 0.75em;
}

.asheswp-review-card__body p:last-child {
    margin-bottom: 0;
}

.asheswp-review-card .comment-reply-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 8px;
    color: var(--pr-primary);
    font-size: 13px;
}

.asheswp-review-card .comment-reply-link:focus-visible {
    outline: 3px solid var(--asheswp-focus-ring-color, var(--pr-primary));
    outline-offset: 2px;
}

.asheswp-product-reviews__empty {
    padding: 28px 20px;
    border: 1px dashed var(--pr-border);
    border-radius: var(--pr-radius);
    background: var(--pr-soft);
    text-align: center;
}

.asheswp-product-reviews__empty-title {
    margin: 0 0 8px;
    font-family: var(--SemiBold, inherit);
    font-size: 16px;
}

.asheswp-product-reviews__empty-text {
    margin: 0;
    color: var(--pr-muted);
    font-size: 14px;
    line-height: 1.8;
}

.asheswp-product-reviews__form-wrap {
    margin-top: 28px;
    padding: clamp(16px, 2.4vw, 24px);
    border: 1px solid var(--pr-border);
    border-radius: var(--pr-radius);
    background: var(--pr-soft);
}

.asheswp-product-reviews__form-title,
.asheswp-product-reviews #reply-title {
    margin: 0 0 16px;
    font-size: 17px;
    font-family: var(--SemiBold, inherit);
    color: var(--pr-text);
}

.asheswp-product-reviews__field {
    margin: 0 0 14px;
}

.asheswp-product-reviews__field label,
.asheswp-product-reviews .comment-form-rating label {
    display: block;
    margin-bottom: 8px;
    color: var(--pr-muted);
    font-size: 13px;
}

.asheswp-product-reviews input[type="text"],
.asheswp-product-reviews input[type="email"],
.asheswp-product-reviews textarea,
.asheswp-product-reviews select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--pr-border);
    border-radius: 12px;
    background: var(--pr-surface);
    color: var(--pr-text);
    font: inherit;
    font-size: 16px;
    line-height: 1.5;
}

.asheswp-product-reviews textarea {
    min-height: 140px;
    resize: vertical;
}

.asheswp-product-reviews input:focus-visible,
.asheswp-product-reviews textarea:focus-visible,
.asheswp-product-reviews select:focus-visible {
    outline: 3px solid var(--asheswp-focus-ring-color, var(--pr-primary));
    outline-offset: 2px;
}

.asheswp-product-reviews__rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
}

.asheswp-product-reviews p.stars,
.asheswp-product-reviews .stars {
    margin: 0 !important;
}

.asheswp-product-reviews .stars span {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.asheswp-product-reviews.woocommerce p.stars a,
.woocommerce .asheswp-product-reviews p.stars a {
    width: 44px;
    height: 44px;
    font-size: 28px;
}

.asheswp-product-reviews.woocommerce p.stars a::before,
.woocommerce .asheswp-product-reviews p.stars a::before {
    width: 28px;
    height: 28px;
    font-size: 28px;
    top: 8px;
    right: 8px;
}

.asheswp-product-reviews__submit,
.asheswp-product-reviews .form-submit .submit {
    min-height: 48px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border: 0;
    border-radius: 12px;
    background: var(--pr-primary);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-family: var(--SemiBold, inherit);
    cursor: pointer;
}

.asheswp-product-reviews__submit:hover,
.asheswp-product-reviews .form-submit .submit:hover {
    background: var(--asheswp-color-primary-hover, #e8622e);
}

.asheswp-product-reviews__submit:focus-visible,
.asheswp-product-reviews .form-submit .submit:focus-visible {
    outline: 3px solid var(--asheswp-focus-ring-color, var(--pr-primary));
    outline-offset: 3px;
}

.asheswp-product-reviews .form-submit {
    margin: 8px 0 0;
    float: none;
}

.asheswp-product-reviews__verify {
    margin-top: 16px;
    color: var(--pr-muted);
}

html[data-theme="dark"] .asheswp-product-reviews,
html[data-asheswp-theme="dark"] .asheswp-product-reviews,
body.dark-mode .asheswp-product-reviews {
    --pr-border: var(--asheswp-border);
    --pr-surface: var(--asheswp-surface-elevated);
    --pr-soft: var(--asheswp-surface-soft);
    --pr-text: var(--asheswp-text-primary);
    --pr-muted: var(--asheswp-text-secondary);
}

html[data-theme="dark"] .asheswp-review-card--admin > .asheswp-review-card__inner,
html[data-asheswp-theme="dark"] .asheswp-review-card--admin > .asheswp-review-card__inner,
body.dark-mode .asheswp-review-card--admin > .asheswp-review-card__inner {
    background: var(--asheswp-surface-warm, #2a1f1a);
}

@media (max-width: 575.98px) {
    .asheswp-product-reviews__rating {
        flex-direction: column;
        align-items: flex-start;
    }

    .asheswp-product-reviews__submit,
    .asheswp-product-reviews .form-submit .submit {
        width: 100%;
    }
}
