/* Riepilogo "VS" della modalita' "Promoter Rivale".
   Usa solo i token di css/style.css. */

.rp-report {
    margin: 0 0 26px;
    padding: 0;
}

.rp-rep-wrap {
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(255, 42, 42, .12) 0%, rgba(0, 0, 0, 0) 62%),
        var(--card-bg, var(--color-surface-1));
    box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
    padding: 18px 16px 20px;
    overflow: hidden;
}

.rp-rep-title {
    margin: 0 0 12px;
    text-align: center;
    font-size: 1rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--text-muted, var(--color-text-dim));
}


.rp-rep-banner {
    position: relative;
    text-align: center;
    padding: 18px 12px 16px;
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 42, 42, .35);
    background:
        linear-gradient(180deg, rgba(255, 42, 42, .14) 0%, rgba(0, 0, 0, .35) 100%);
}

.rp-rep-versus {
    display: block;
    font-size: clamp(2.1rem, 8vw, 3.4rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--accent-color, var(--color-accent));
    text-shadow: 0 0 22px rgba(255, 42, 42, .45);
    animation: rpVersusPulse 2.6s ease-in-out infinite;
}

@keyframes rpVersusPulse {
    0%, 100% { opacity: .85; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.03); }
}

.rp-rep-outcome {
    margin: 10px 0 4px;
    font-size: clamp(1.5rem, 6vw, 2.3rem);
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.rp-rep-wrap.is-win  .rp-rep-outcome { color: var(--legendary-color, var(--color-gold)); text-shadow: 0 0 18px rgba(255, 215, 0, .45); }
.rp-rep-wrap.is-lose .rp-rep-outcome { color: var(--accent-color, var(--color-accent));   text-shadow: 0 0 18px rgba(255, 42, 42, .45); }
.rp-rep-wrap.is-draw .rp-rep-outcome { color: var(--color-text-soft); }

.rp-rep-margin {
    margin: 0 0 10px;
    font-size: .95rem;
    color: var(--text-muted, var(--color-text-dim));
}

.rp-rep-delta {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    background: rgba(0, 0, 0, .40);
    border: 1px solid rgba(255, 255, 255, .12);
    font-weight: 900;
    font-size: 1.25rem;
    letter-spacing: .04em;
}

.rp-rep-delta-sep { opacity: .5; font-weight: 400; }


.rp-rep-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 14px;
    align-items: stretch;
}

.rp-rep-divider {
    position: relative;
    width: 2px;
    background: linear-gradient(180deg, rgba(255, 42, 42, 0), rgba(255, 42, 42, .55), rgba(255, 42, 42, 0));
}

.rp-rep-divider span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: .95rem;
    letter-spacing: .05em;
    color: var(--accent-color, var(--color-accent));
    background: var(--card-bg, var(--color-surface-1));
    border: 1px solid rgba(255, 42, 42, .55);
    box-shadow: 0 0 18px rgba(255, 42, 42, .35);
}


.rp-rep-panel {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(0, 0, 0, .28);
    padding: 14px 14px 0;
    min-width: 0;
}

.rp-rep-panel--player { border-left: 3px solid var(--tier-b, var(--color-cyan)); }
.rp-rep-panel--rival  { border-right: 3px solid var(--accent-color, var(--color-accent)); }

.rp-rep-panel.is-winner {
    border-color: rgba(255, 215, 0, .55);
    box-shadow: 0 0 0 1px rgba(255, 215, 0, .22), 0 0 26px rgba(255, 215, 0, .14);
}

.rp-rep-panel-head { margin-bottom: 12px; text-align: center; }

.rp-rep-panel-title {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.rp-rep-panel--player .rp-rep-panel-title { color: var(--tier-b, var(--color-cyan)); }
.rp-rep-panel--rival  .rp-rep-panel-title { color: var(--accent-color, var(--color-accent)); }

.rp-rep-panel-sub { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }

.rp-rep-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    font-size: .78rem;
    letter-spacing: .03em;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    color: var(--text-muted, var(--color-text-dim));
}

.rp-rep-section-title {
    margin: 12px 0 6px;
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted, var(--color-text-dim));
    display: flex;
    justify-content: center;
    gap: 8px;
}

.rp-rep-section-title span { opacity: .8; letter-spacing: .02em; }


.rp-rep-lineup {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rp-rep-band {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    grid-template-areas: "tier name cost" ". genre cost";
    gap: 2px 8px;
    align-items: center;
    padding: 7px 9px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .07);
    font-size: .9rem;
}

.rp-rep-band-tier {
    grid-area: tier;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-sm);
    font-size: .72rem;
    font-weight: 900;
    color: var(--color-ink);
    background: var(--color-text-dim);
}

.rp-rep-band.tier-S .rp-rep-band-tier { background: var(--tier-s, var(--color-orange)); }
.rp-rep-band.tier-A .rp-rep-band-tier { background: var(--tier-a, var(--color-gold)); }
.rp-rep-band.tier-B .rp-rep-band-tier { background: var(--tier-b, var(--color-cyan)); }
.rp-rep-band.tier-C .rp-rep-band-tier { background: var(--tier-c, var(--color-green)); }

.rp-rep-band-name {
    grid-area: name;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.rp-rep-band.is-legendary .rp-rep-band-name { color: var(--legendary-color, var(--color-gold)); }
.rp-rep-legend { font-size: .8em; }

.rp-rep-band-genre {
    grid-area: genre;
    font-size: .74rem;
    color: var(--text-muted, var(--color-text-dim));
    overflow-wrap: anywhere;
}

.rp-rep-band-cost {
    grid-area: cost;
    font-variant-numeric: tabular-nums;
    font-size: .82rem;
    color: var(--text-muted, var(--color-text-dim));
    white-space: nowrap;
}

.rp-rep-empty-note {
    margin: 0;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    font-size: .84rem;
    color: var(--text-muted, var(--color-text-dim));
    background: rgba(255, 255, 255, .03);
    border: 1px dashed rgba(255, 255, 255, .12);
}


.rp-rep-stats {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}

.rp-rep-stat {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 10px;
    padding: 6px 9px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .03);
    font-size: .86rem;
}

.rp-rep-stat span { color: var(--text-muted, var(--color-text-dim)); }
.rp-rep-stat strong { font-variant-numeric: tabular-nums; }


.rp-rep-tags {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rp-rep-tags li {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 5px 9px;
    border-radius: var(--radius-sm);
    font-size: .83rem;
    border: 1px solid transparent;
}

.rp-rep-tags.is-synergy li {
    background: rgba(0, 255, 127, .07);
    border-color: rgba(0, 255, 127, .22);
}

.rp-rep-tags.is-penalty li {
    background: rgba(255, 42, 42, .08);
    border-color: rgba(255, 42, 42, .28);
}

.rp-rep-tag-value { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-rep-tags.is-synergy .rp-rep-tag-value { color: var(--tier-c, var(--color-green)); }
.rp-rep-tags.is-penalty .rp-rep-tag-value { color: var(--accent-color, var(--color-accent)); }


.rp-rep-total {
    margin: 14px -14px 0;
    padding: 12px 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, .45);
    border-top: 1px solid rgba(255, 255, 255, .10);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.rp-rep-total span {
    font-size: .74rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted, var(--color-text-dim));
}

.rp-rep-total strong {
    font-size: 1.5rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.rp-rep-panel.is-winner .rp-rep-total strong { color: var(--legendary-color, var(--color-gold)); }


@media (max-width: 720px) {
    .rp-rep-grid {
        grid-template-columns: 1fr;
    }
    .rp-rep-divider {
        width: auto;
        height: 2px;
        background: linear-gradient(90deg, rgba(255, 42, 42, 0), rgba(255, 42, 42, .55), rgba(255, 42, 42, 0));
        margin: 6px 0;
    }
    .rp-rep-panel--rival { border-right: none; border-left: 3px solid var(--accent-color, var(--color-accent)); }
}

@media (prefers-reduced-motion: reduce) {
    .rp-rep-versus { animation: none; }
}

/* La preview del canvas resta contenuta su mobile. */
.share-image-preview-wrap #share-image-canvas {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
}
