/* ========================================
   Post Reactions — Stylesheet
   ======================================== */

.pr-wrapper {
    margin: 2.5rem 0;
    padding: 1.5rem 1.75rem;
    background: #f9f9fb;
    border: 1px solid #e4e4e9;
    border-radius: 14px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

/* Heading */
.pr-heading {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.pr-heading .pr-icon { font-size: 1.1rem; }

/* ── Przyciski reakcji ── */
.pr-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-bottom: 1.2rem;
}

.pr-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .85rem;
    background: #fff;
    border: 1.5px solid #ddd;
    border-radius: 999px;
    cursor: pointer;
    font-size: .9rem;
    color: #444;
    transition: all .18s ease;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.pr-btn:hover {
    border-color: #7c5cfc;
    background: #f3efff;
    color: #5a3fe0;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(124,92,252,.15);
}

.pr-btn.pr-active {
    border-color: #7c5cfc;
    background: #7c5cfc;
    color: #fff;
    box-shadow: 0 3px 10px rgba(124,92,252,.35);
}

.pr-btn.pr-active:hover {
    background: #6a4be0;
    border-color: #6a4be0;
    color: #fff;
}

/* animacja kliknięcia */
.pr-btn.pr-pop {
    animation: pr-pop .3s ease;
}
@keyframes pr-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}

.pr-emoji { font-size: 1.15rem; line-height: 1; }
.pr-label { font-weight: 500; }

.pr-count {
    font-size: .78rem;
    font-weight: 700;
    background: rgba(0,0,0,.08);
    border-radius: 999px;
    padding: .05rem .4rem;
    min-width: 1.2rem;
    text-align: center;
    transition: background .18s;
}
.pr-btn.pr-active .pr-count {
    background: rgba(255,255,255,.25);
}
/* Ukryj badge gdy jest pusty */
.pr-count:empty { display: none; }

/* ── Podsumowanie / pasek ── */
.pr-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pr-total {
    font-size: .82rem;
    color: #666;
    white-space: nowrap;
}

.pr-be-first {
    font-size: .82rem;
    color: #888;
    font-style: italic;
}

.pr-bar-wrap {
    flex: 1;
    min-width: 120px;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #e0e0e0;
    display: flex;
}

.pr-bar-segment {
    height: 100%;
    transition: width .4s ease;
}
.pr-bar-segment.like  { background: #4dabf7; }
.pr-bar-segment.love  { background: #f06595; }
.pr-bar-segment.haha  { background: #ffd43b; }
.pr-bar-segment.wow   { background: #ff922b; }
.pr-bar-segment.sad   { background: #74c0fc; }
.pr-bar-segment.angry { background: #ff6b6b; }

/* ── Toast powiadomienie ── */
.pr-toast {
    position: absolute;
    bottom: .75rem;
    right: 1rem;
    background: #333;
    color: #fff;
    padding: .4rem .9rem;
    border-radius: 8px;
    font-size: .8rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
.pr-toast.pr-show { opacity: 1; }

/* ── Responsywność ── */
@media (max-width: 480px) {
    .pr-wrapper { padding: 1.1rem; }
    .pr-label   { display: none; }
    .pr-btn     { padding: .5rem .7rem; }
}
