/* ============================================================
   PrezzoTop – Score History Widget
   ============================================================ */

.ptop-sh-wrap {
    background: #fff;
    border: 1px solid #eae4ef;
    border-radius: 16px;
    padding: 18px 18px 14px;
    margin: 20px 0;
    font-family: -apple-system, "SF Pro Display", "Segoe UI Variable", system-ui, sans-serif;
}

/* ── HEADER ── */
.ptop-sh-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.ptop-sh-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ptop-sh-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #6C4176;
}

.ptop-sh-days {
    font-size: 11px;
    color: #9ca3af;
}

/* ── BADGE DELTA ── */
.ptop-sh-delta {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ptop-sh-delta--up {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.ptop-sh-delta--down {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.ptop-sh-delta--flat {
    background: #f9fafb;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

/* ── GRAFICO ── */
.ptop-sh-chart-wrap {
    position: relative;
    width: 100%;
    height: 160px;
    margin-bottom: 14px;
}

/* ── INTERNAL LINKS ── */
.ptop-sh-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.ptop-sh-link {
    font-size: 12px;
    font-weight: 600;
    color: #6C4176;
    background: rgba(108, 65, 118, 0.06);
    border: 1px solid rgba(108, 65, 118, 0.15);
    border-radius: 6px;
    padding: 4px 10px;
    text-decoration: none;
    transition: background .15s;
}

.ptop-sh-link:hover {
    background: rgba(108, 65, 118, 0.12);
    color: #6C4176;
}

/* ── TESTO SEO ── */
.ptop-sh-seo {
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.6;
    margin: 0;
}

/* ── MOBILE ── */
@media (max-width: 640px) {
    .ptop-sh-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .ptop-sh-chart-wrap {
        height: 130px;
    }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
    .ptop-sh-wrap * {
        transition: none !important;
        animation: none !important;
    }
}
/* ── AGGIUNTE v5.0.0 ── */
.ptop-sh-wrap { --ptop-c: #6C4176; }

.ptop-sh-badges {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ptop-sh-today {
    font-size: 12px;
    font-weight: 800;
    color: var(--ptop-c);
    background: color-mix(in srgb, var(--ptop-c) 10%, #fff 90%);
    border: 1px solid color-mix(in srgb, var(--ptop-c) 25%, #fff 75%);
    padding: 4px 9px;
    border-radius: 8px;
    white-space: nowrap;
}
