/* ==========================================================================
   WC Amazon Reviews — Public Styles
   ========================================================================== */

/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
    --wcar-star-full:    #f5a623;
    --wcar-star-half:    #f5a623;
    --wcar-star-empty:   #ddd;
    --wcar-accent:       #f5a623;
    --wcar-accent-dark:  #e08e00;
    --wcar-verified:     #007600;
    --wcar-text:         #0f1111;
    --wcar-text-muted:   #565959;
    --wcar-border:       #ddd;
    --wcar-bg:           #fff;
    --wcar-card-shadow:  0 2px 8px rgba(0,0,0,.08);
    --wcar-radius:       8px;
    --wcar-avatar-size:  56px;
}

/* ── Wrapper ────────────────────────────────────────────────────────────── */
.wcar-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--wcar-text);
    max-width: 900px;
    margin: 0 auto;
}

/* ── Product Section ────────────────────────────────────────────────────── */
.wcar-product-section {
    padding: 40px 0 20px;
    border-top: 1px solid var(--wcar-border);
    margin-top: 40px;
}

.wcar-section-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 24px;
    color: var(--wcar-text);
}

/* ── Title Badge ────────────────────────────────────────────────────────── */
.wcar-title-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -8px 0 12px;
    flex-wrap: wrap;
}

.wcar-title-badge__link {
    font-size: 13px;
    color: #0073a8;
    text-decoration: none;
    border-bottom: 1px dotted #0073a8;
}

.wcar-title-badge__link:hover {
    color: var(--wcar-accent-dark);
    border-color: var(--wcar-accent-dark);
}

/* ── Stars ──────────────────────────────────────────────────────────────── */
.wcar-stars {
    display: inline-flex;
    gap: 1px;
    line-height: 1;
}

.wcar-star {
    font-size: 16px;
    line-height: 1;
}

.wcar-star--full,
.wcar-star--half {
    color: var(--wcar-star-full);
}

.wcar-star--empty {
    color: var(--wcar-star-empty);
}

.wcar-stars--large .wcar-star {
    font-size: 28px;
}

/* ── Summary Block ──────────────────────────────────────────────────────── */
.wcar-summary {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    padding: 24px;
    background: #fafafa;
    border: 1px solid var(--wcar-border);
    border-radius: var(--wcar-radius);
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.wcar-summary__overall {
    text-align: center;
    min-width: 110px;
}

.wcar-summary__score {
    display: block;
    font-size: 54px;
    font-weight: 800;
    line-height: 1;
    color: var(--wcar-text);
    letter-spacing: -2px;
}

.wcar-summary__count {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--wcar-text-muted);
}

.wcar-summary__bars {
    flex: 1;
    min-width: 220px;
}

.wcar-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 7px;
}

.wcar-bar-label {
    font-size: 12px;
    color: #0073a8;
    white-space: nowrap;
    min-width: 36px;
    cursor: default;
}

.wcar-bar-track {
    flex: 1;
    height: 10px;
    background: #e3e6e6;
    border-radius: 5px;
    overflow: hidden;
}

.wcar-bar-fill {
    height: 100%;
    background: var(--wcar-accent);
    border-radius: 5px;
    transition: width .4s ease;
}

.wcar-bar-pct {
    font-size: 12px;
    color: var(--wcar-text-muted);
    min-width: 32px;
    text-align: right;
}

/* ── Review List ────────────────────────────────────────────────────────── */
.wcar-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.wcar-card {
    background: var(--wcar-bg);
    border: 1px solid var(--wcar-border);
    border-radius: var(--wcar-radius);
    padding: 20px 22px;
    box-shadow: var(--wcar-card-shadow);
    transition: box-shadow .2s;
}

.wcar-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

/* Card header: avatar + name + location */
.wcar-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

/* Avatar */
.wcar-avatar {
    width: var(--wcar-avatar-size);
    height: var(--wcar-avatar-size);
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #e3e6e6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcar-avatar__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wcar-avatar__initials {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #0073aa, #00a0d2);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    letter-spacing: 1px;
}

.wcar-card__meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.wcar-card__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--wcar-text);
}

.wcar-card__location {
    font-size: 12px;
    color: var(--wcar-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Rating row */
.wcar-card__rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.wcar-card__subject {
    font-size: 15px;
    font-weight: 700;
    color: var(--wcar-text);
    flex: 1;
    min-width: 0;
}

/* Badges */
.wcar-card__badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.wcar-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 2px 0;
}

.wcar-badge--verified {
    color: var(--wcar-verified);
    font-weight: 600;
}

.wcar-badge--date {
    color: var(--wcar-text-muted);
}

/* Message */
.wcar-card__message {
    font-size: 14px;
    line-height: 1.65;
    color: #333;
}

/* ── Pagination ─────────────────────────────────────────────────────────── */
.wcar-pagination {
    display: flex;
    gap: 6px;
    margin-top: 24px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.wcar-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--wcar-border);
    border-radius: 6px;
    background: #fff;
    color: #0073a8;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    font-family: inherit;
}

.wcar-page-btn:hover:not(.active) {
    background: #f0f0f0;
    border-color: #aaa;
}

.wcar-page-btn.active {
    background: var(--wcar-accent);
    border-color: var(--wcar-accent-dark);
    color: #fff;
    font-weight: 700;
    cursor: default;
}

.wcar-page-btn:focus-visible {
    outline: 2px solid var(--wcar-accent);
    outline-offset: 2px;
}

/* ── Empty state ────────────────────────────────────────────────────────── */
.wcar-no-reviews {
    color: var(--wcar-text-muted);
    font-size: 14px;
    padding: 20px 0;
}

/* ── Loading overlay ────────────────────────────────────────────────────── */
.wcar-list.wcar-loading {
    opacity: .4;
    pointer-events: none;
    transition: opacity .2s;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .wcar-summary {
        flex-direction: column;
        gap: 20px;
    }

    .wcar-summary__overall {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
    }

    .wcar-summary__score {
        font-size: 42px;
    }

    .wcar-card__rating {
        flex-direction: column;
        align-items: flex-start;
    }
}
