/**
 * ResellerRatings social-proof widget (Gitea #811).
 * Compact, number-led trust card for the storefront sidebar + a mobile band.
 * Self-contained; reads only local tables via tpl_credentials.php.
 */
.rr-card {
    --rr-ink: #1b1f27;
    --rr-gold: #f5a623;
    --rr-gold-deep: #d97b06;
    --rr-muted: #6b7280;
    --rr-line: #e7e9ee;
    box-sizing: border-box;
    width: 100%;
    max-width: 230px;
    margin: 0 auto 18px;
    padding: 18px 16px 14px;
    background: #fff;
    border: 1px solid var(--rr-line);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(20, 24, 33, .04), 0 8px 22px -14px rgba(20, 24, 33, .25);
    text-align: center;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--rr-ink);
    position: relative;
    overflow: hidden;
}
.rr-card * { box-sizing: border-box; }

/* thin gold seam along the top edge */
.rr-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rr-gold), var(--rr-gold-deep));
}

@keyframes rr-rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Elite pill */
.rr-elite {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 2px 0 13px;
    padding: 4px 12px 4px 9px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #5a3b00;
    background: linear-gradient(180deg, #ffe1a1, #f5b942);
    border: 1px solid #e0a534;
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
    line-height: 1;
}
.rr-elite svg { width: 11px; height: 11px; display: block; flex: 0 0 auto; }

/* Big rating number */
.rr-score {
    font-size: 46px;
    font-weight: 800;
    line-height: .9;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}
.rr-score-out {
    font-size: 13px;
    font-weight: 600;
    color: var(--rr-muted);
    margin-left: 1px;
}

/* Partial-fill star row */
.rr-stars {
    position: relative;
    display: inline-block;
    margin: 7px 0 2px;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 3px;
    color: #d9dce2;
    white-space: nowrap;
}
.rr-stars::before { content: "\2605\2605\2605\2605\2605"; }
.rr-stars-fill {
    position: absolute;
    top: 0; left: 0;
    overflow: hidden;
    white-space: nowrap;
    color: var(--rr-gold);
    -webkit-text-stroke: .4px var(--rr-gold-deep);
}
.rr-stars-fill::before { content: "\2605\2605\2605\2605\2605"; }

/* Verified review count */
.rr-count {
    display: block;
    margin-top: 9px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--rr-ink);
    text-decoration: none;
}
.rr-count a, .rr-card a.rr-count { color: var(--rr-ink); text-decoration: none; }
.rr-count:hover { text-decoration: underline; }
.rr-count .rr-check {
    color: #2e8b57;
    font-weight: 800;
    margin-right: 3px;
}

/* Curated pull-quote */
.rr-quote {
    margin: 13px 2px 4px;
    padding: 9px 4px 9px 11px;
    border-left: 3px solid var(--rr-gold);
    text-align: left;
    font-size: 12.5px;
    font-style: italic;
    line-height: 1.45;
    color: #3a3f4a;
    background: linear-gradient(90deg, rgba(245, 166, 35, .06), rgba(245, 166, 35, 0));
}
.rr-quote-by {
    display: block;
    margin-top: 5px;
    font-style: normal;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--rr-muted);
}

/* RR wordmark footer */
.rr-mark {
    display: block;
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid var(--rr-line);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #9aa0ab;
    text-decoration: none;
}
.rr-mark:hover { color: var(--rr-muted); text-decoration: none; }

/* Generic fallback (stale/missing data) */
.rr-card--fallback { padding: 14px 16px; }
.rr-card--fallback .rr-fallback-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--rr-ink);
    text-decoration: none;
}
.rr-card--fallback .rr-fallback-link:hover { text-decoration: underline; }

/* ---- Mobile band (footer, small screens only) ---------------------------- */
.rr-band { display: none; }

@media (max-width: 767px) {
    /* On mobile the band replaces the sidebar card. */
    .rr-card { display: none !important; }

    .rr-band {
        display: block;
        margin: 0 auto 16px;
        max-width: 480px;
        padding: 12px 16px 14px;
        background: #fff;
        border: 1px solid #e7e9ee;
        border-radius: 12px;
        box-shadow: 0 8px 22px -16px rgba(20, 24, 33, .3);
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
        color: #1b1f27;
        text-align: center;
        position: relative;
        overflow: hidden;
    }
    .rr-band * { box-sizing: border-box; }
    .rr-band::before {
        content: "";
        position: absolute; top: 0; left: 0; right: 0; height: 3px;
        background: linear-gradient(90deg, #f5a623, #d97b06);
    }

    .rr-band-head {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px 10px;
    }
    .rr-band-num {
        font-size: 30px; font-weight: 800; line-height: 1;
        letter-spacing: -.02em; font-variant-numeric: tabular-nums;
    }
    .rr-band-of { font-size: 12px; font-weight: 600; color: #6b7280; align-self: flex-end; margin: 0 4px 4px -3px; }
    .rr-band-stars {
        position: relative; display: inline-block;
        font-size: 17px; line-height: 1; letter-spacing: 2px;
        color: #d9dce2; white-space: nowrap;
    }
    .rr-band-stars::before { content: "\2605\2605\2605\2605\2605"; }
    .rr-band-fill {
        position: absolute; top: 0; left: 0; overflow: hidden; white-space: nowrap;
        color: #f5a623; -webkit-text-stroke: .4px #d97b06;
    }
    .rr-band-fill::before { content: "\2605\2605\2605\2605\2605"; }
    .rr-band-elite {
        font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
        color: #5a3b00; background: linear-gradient(180deg, #ffe1a1, #f5b942);
        border: 1px solid #e0a534; border-radius: 999px; padding: 3px 9px; line-height: 1;
    }
    .rr-band-count { font-size: 12.5px; font-weight: 600; color: #1b1f27; text-decoration: none; white-space: nowrap; }
    .rr-band-count:hover { text-decoration: underline; }
    .rr-band-count .rr-check { color: #2e8b57; font-weight: 800; margin-right: 3px; }

    .rr-band-quote {
        min-height: 36px;
        margin-top: 10px; padding-top: 10px;
        border-top: 1px solid #e7e9ee;
        font-size: 13px; font-style: italic; line-height: 1.4; color: #3a3f4a;
        transition: opacity .28s ease;
    }
    .rr-band-by { font-style: normal; font-weight: 600; font-size: 11px; color: #6b7280; }
}

/* ---- Footer engagement row: official seal beside the social icons (#811) -- */
.footer-engagement #rr-seal-card {
    text-align: center;
}
.footer-engagement #rr-seal-card .rr-seal-embed {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
}
/* The RR widget document.writes a fixed-width box; keep it from overflowing the column. */
.footer-engagement #rr-seal-card .rr-seal-embed > * { max-width: 100%; }
