/* r1191 — Grotere sitebrede respectanimatie, zonder MutationObserver.
   De ster is puur CSS, dus ook dynamisch ingeladen knoppen werken direct. */

button.heart-btn,
button.comment-respect,
button.notification-detail-respect-button,
button[data-media-action="respect"],
button.webmaster-respect-button {
    position: relative !important;
    overflow: visible !important;
    isolation: isolate;
}

/* Oude/intern meegeleverde respecticonen uitschakelen: er blijft één ster over. */
button.heart-btn .like-emoji,
button.heart-btn .guestbook-heart-icon,
button.heart-btn .status-heart-icon,
button.heart-btn > svg,
button.comment-respect .dashboard-comment-meta-icon,
button.comment-respect .like-emoji,
button.comment-respect > svg,
button.notification-detail-respect-button .notification-detail-respect-icon,
button.notification-detail-respect-button .like-emoji,
button.notification-detail-respect-button > svg,
button[data-media-action="respect"] .like-emoji,
button[data-media-action="respect"] .status-heart-icon,
button[data-media-action="respect"] > svg,
button.webmaster-respect-button .webmaster-heart-icon,
button.webmaster-respect-button > svg,
.snoeten-respect-star,
.snoeten-respect-legacy-icon {
    display: none !important;
}

/* Eén Hyves-achtige ster, zonder extra DOM-node. */
button.heart-btn::before,
button.comment-respect::before,
button.notification-detail-respect-button::before,
button[data-media-action="respect"]::before,
button.webmaster-respect-button::before {
    content: "☆" !important;
    position: relative !important;
    inset: auto !important;
    z-index: 2 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto !important;
    height: auto !important;
    min-width: 1em;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    color: #6c7580 !important;
    font: 700 1.12em/1 Arial, sans-serif !important;
    opacity: 1 !important;
    transform: none;
    transform-origin: 50% 55%;
    transition: color 140ms ease, text-shadow 140ms ease;
    pointer-events: none;
}

button.heart-btn:is(.liked, .respected, .is-active, .is-respected, [aria-pressed="true"])::before,
button.comment-respect:is(.liked, .respected, .is-active, .is-respected, [aria-pressed="true"])::before,
button.notification-detail-respect-button:is(.liked, .respected, .is-active, .is-respected, [aria-pressed="true"])::before,
button[data-media-action="respect"]:is(.liked, .respected, .is-active, .is-respected, [aria-pressed="true"])::before,
button.webmaster-respect-button:is(.liked, .respected, .is-active, .is-respected, [aria-pressed="true"])::before {
    content: "★" !important;
    color: #63a33f !important;
    text-shadow: 0 1px 0 rgba(255,255,255,.8);
}

/* Oude r1184-pop bij reacties uitschakelen. */
button.comment-respect.is-respect-animating .dashboard-comment-meta-icon,
button.comment-respect.is-respect-animating .comment-meta-count {
    animation: none !important;
}

button.heart-btn.snoeten-respect-give::before,
button.comment-respect.snoeten-respect-give::before,
button.notification-detail-respect-button.snoeten-respect-give::before,
button[data-media-action="respect"].snoeten-respect-give::before,
button.webmaster-respect-button.snoeten-respect-give::before {
    animation: snoetenRespectTwinkle1191 720ms cubic-bezier(.16,.88,.22,1.22) both;
}

button.heart-btn.snoeten-respect-remove::before,
button.comment-respect.snoeten-respect-remove::before,
button.notification-detail-respect-button.snoeten-respect-remove::before,
button[data-media-action="respect"].snoeten-respect-remove::before,
button.webmaster-respect-button.snoeten-respect-remove::before {
    animation: snoetenRespectRelease1191 320ms ease-out both;
}

.snoeten-respect-sparks {
    position: absolute;
    z-index: 1;
    left: var(--respect-spark-x, 50%);
    top: var(--respect-spark-y, 50%);
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.snoeten-respect-spark {
    --spark-angle: 0deg;
    --spark-distance: 26px;
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 5px;
    margin: -2.5px 0 0 -2.5px;
    border-radius: 50%;
    background: #79ad4f;
    opacity: 0;
    transform: rotate(var(--spark-angle)) translateY(0) scale(.25);
    animation: snoetenRespectSpark1191 620ms cubic-bezier(.15,.72,.25,1) forwards;
}
.snoeten-respect-spark:nth-child(2n) { background: #f1a329; }
.snoeten-respect-spark:nth-child(3n) { background: #4b72aa; }

@keyframes snoetenRespectTwinkle1191 {
    0%   { transform: scale(.72) rotate(-18deg); text-shadow: 0 0 0 rgba(99,163,63,0); }
    24%  { transform: scale(1.62) rotate(18deg); text-shadow: 0 0 14px rgba(99,163,63,.52), 0 0 24px rgba(241,163,41,.22); }
    47%  { transform: scale(.92) rotate(-7deg); text-shadow: 0 0 9px rgba(99,163,63,.32); }
    68%  { transform: scale(1.28) rotate(6deg); }
    84%  { transform: scale(.98) rotate(-2deg); }
    100% { transform: scale(1) rotate(0); text-shadow: 0 1px 0 rgba(255,255,255,.8); }
}

@keyframes snoetenRespectRelease1191 {
    0%   { transform: scale(1); }
    50%  { transform: scale(.82) rotate(-5deg); }
    100% { transform: scale(1) rotate(0); }
}

@keyframes snoetenRespectSpark1191 {
    0% { opacity: 0; transform: rotate(var(--spark-angle)) translateY(-2px) scale(.15); }
    18% { opacity: 1; transform: rotate(var(--spark-angle)) translateY(-5px) scale(1.15); }
    100% { opacity: 0; transform: rotate(var(--spark-angle)) translateY(calc(var(--spark-distance) * -1)) scale(.45); }
}

@media (prefers-reduced-motion: reduce) {
    button.heart-btn::before,
    button.comment-respect::before,
    button.notification-detail-respect-button::before,
    button[data-media-action="respect"]::before,
    button.webmaster-respect-button::before,
    .snoeten-respect-spark {
        animation: none !important;
    }
}

/* Hoge specificiteit voor oudere reactie-CSS die ::before en het legacy-icoon met !important uitschakelt/terugzet. */
html body .status-comments.status-comments-facebook .status-comment-meta button.comment-respect::before,
html body .status-comments.status-comments-facebook button.status-comment-respect-side.comment-respect::before {
    content: "☆" !important;
    display: inline-flex !important;
    background: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    color: #6c7580 !important;
}

html body .status-comments.status-comments-facebook .status-comment-meta button.comment-respect:is(.liked, .respected, .is-active, .is-respected, [aria-pressed="true"])::before,
html body .status-comments.status-comments-facebook button.status-comment-respect-side.comment-respect:is(.liked, .respected, .is-active, .is-respected, [aria-pressed="true"])::before {
    content: "★" !important;
    color: #63a33f !important;
}

html body .status-comments.status-comments-facebook button.comment-respect .dashboard-comment-meta-icon,
html body .status-comments.status-comments-facebook button.status-comment-respect-side.comment-respect .dashboard-comment-meta-icon {
    display: none !important;
}
