/* Layout wrapper */
.post-likes-wrap {
    /*margin-top: 20px;*/
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Heart button container */
.post-likes-btn {
    position: relative;
    background: transparent;
    border: none;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}

/* ===========================
   FONT AWESOME–STYLE HEART
   Centered via absolute + translate
   =========================== */

.post-likes-btn::before {
    content: "";
    position: absolute;
    top: 55%;
    left: 55%;
    width: 22px;
    height: 22px;
    background-color: var(--pl-accent, #ff2b8c);

    /* FA-style OUTLINE heart */
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 21l-1-1C5 14 2 11 2 7a5 5 0 019-3 5 5 0 019 3c0 4-3 7-9 13z'/%3E%3C/svg%3E") no-repeat center/contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 21l-1-1C5 14 2 11 2 7a5 5 0 019-3 5 5 0 019 3c0 4-3 7-9 13z'/%3E%3C/svg%3E") no-repeat center/contain;

    transform: translate(-50%, -50%) scale(1);
    opacity: 0.9;
    transition: opacity .15s ease;
}

/* Filled heart when liked */
.post-likes-btn.liked::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M12 21l-1-1C5 14 2 11 2 7a5 5 0 019-3 5 5 0 019 3c0 4-3 7-9 13z'/%3E%3C/svg%3E") no-repeat center/contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M12 21l-1-1C5 14 2 11 2 7a5 5 0 019-3 5 5 0 019 3c0 4-3 7-9 13z'/%3E%3C/svg%3E") no-repeat center/contain;

    background-color: var(--pl-accent, #ff2b8c);
    opacity: 1;
}

/* Hover feedback */
.post-likes-btn:hover {
    background-color: rgba(255, 43, 140, 0.08);
    background-color: color-mix(in srgb, var(--pl-accent, #ff2b8c) 10%, transparent);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Press feedback */
.post-likes-btn:active {
    transform: scale(0.93);
}

/* While loading – fade a bit */
.post-likes-btn.loading {
    opacity: 0.7;
}

/* ===========================
   COUNT
   =========================== */

.post-likes-count {
    font-weight: 600;
    font-size: 14px;
    color: #444;
}

/* ===========================
   ANIMATIONS
   =========================== */

/* Heart pulse on like/unlike */
.post-likes-btn.pl-heart-anim::before {
    animation: pl-heart-pulse .28s ease-out;
}

@keyframes pl-heart-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }

    45% {
        transform: translate(-50%, -50%) scale(1.32);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Count bump */
.post-likes-count.pl-bump {
    animation: pl-count-bump .28s ease-out;
}

@keyframes pl-count-bump {
    0% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.22);
    }

    100% {
        transform: scale(1);
    }
}

/* ===========================
   FLOATING MINI HEARTS
   Immediate feedback on click
   (JS adds .loading immediately)
   =========================== */

.post-likes-btn.loading::after {
    content: "";
    position: absolute;
    top: 48%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--pl-accent, #ff2b8c);
    pointer-events: none;
    opacity: 0;

    /* central mini heart (masked) */
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M12 21l-1-1C5 14 2 11 2 7a5 5 0 019-3 5 5 0 019 3c0 4-3 7-9 13z'/%3E%3C/svg%3E") no-repeat center/contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M12 21l-1-1C5 14 2 11 2 7a5 5 0 019-3 5 5 0 019 3c0 4-3 7-9 13z'/%3E%3C/svg%3E") no-repeat center/contain;

    /* 6 extra hearts using drop-shadow */
    filter:
        drop-shadow(-10px -40px 0 var(--pl-accent, #ff2b8c)) drop-shadow(10px -4px 0 var(--pl-accent, #ff2b8c)) drop-shadow(0px -8px 0 var(--pl-accent, #ff2b8c)) drop-shadow(-6px -14px 0 var(--pl-accent, #ff2b8c)) drop-shadow(6px -16px 0 var(--pl-accent, #ff2b8c)) drop-shadow(-14px -10px 0 var(--pl-accent, #ff2b8c));

    transform: translate(-50%, -40%) scale(0.6);
    animation: pl-mini-hearts .55s ease-out;
}


@keyframes pl-mini-hearts {
    0% {
        opacity: 0;
        transform: translate(-40%, -60%) scale(0.6);
    }

    30% {
        opacity: 1;
        transform: translate(-60%, -120%) scale(0.9);
    }

    50% {
        opacity: 1;
        transform: translate(-40%, -150%) scale(1.0);
    }

    80% {
        opacity: 1;
        transform: translate(-60%, -170%) scale(1.1);
    }

    100% {
        opacity: 0;
        transform: translate(-40%, -200%) scale(1.3);
    }
}

/* ===========================
   TOP LIKED GRID
   =========================== */

.post-likes-top-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.post-likes-item {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

.post-likes-thumb {
    display: block;
    background-size: cover;
    background-position: center;
    padding-top: 56.25%;
}

.post-likes-content {
    padding: 12px 14px 14px;
}

.post-likes-title {
    font-weight: 600;
    text-decoration: none;
    color: inherit;
}

.post-likes-title:hover {
    text-decoration: underline;
}

.post-likes-meta {
    font-size: 13px;
    color: #666;
}