.template-engagement {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
}

.template-engagement-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.template-engagement-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    color: #667085;
    font-weight: 600;
}

.template-engagement-stat i {
    color: #98a2b3;
    font-size: 0.9rem;
}

.template-engagement-heart-icon {
    color: #f04438 !important;
}

.template-engagement-label {
    font-weight: 500;
}

.template-engagement-compact .template-engagement-stat {
    font-size: 0.76rem;
}

.template-engagement-compact .template-engagement-label {
    display: none;
}

.template-reaction-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    width: 100%;
}

.template-like-btn,
.template-dislike-btn {
    align-items: center;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    color: #475467;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    gap: 0.38rem;
    justify-content: center;
    line-height: 1;
    min-height: 2rem;
    padding: 0.32rem 0.7rem 0.32rem 0.38rem;
    position: relative;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.template-like-btn i,
.template-dislike-btn i {
    align-items: center;
    background: #f8fafc;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
    display: inline-flex;
    flex: 0 0 1.35rem;
    font-size: 0.8rem;
    height: 1.35rem;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    width: 1.35rem;
}

.template-like-btn i {
    color: #e11d48;
}

.template-dislike-btn i {
    color: #64748b;
}

.template-like-btn.is-liked,
.template-like-btn.is-liked:hover {
    background: #fff1f2;
    border-color: #fecdd3;
    box-shadow: 0 8px 18px rgba(244, 63, 94, 0.16);
    color: #9f1239;
}

.template-like-btn.is-liked i {
    background: linear-gradient(135deg, #f43f5e, #fb7185);
    color: #fff;
    box-shadow: 0 6px 14px rgba(244, 63, 94, 0.28);
}

.template-dislike-btn.is-disliked,
.template-dislike-btn.is-disliked:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}

.template-dislike-btn.is-disliked i {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    box-shadow: 0 6px 14px rgba(59, 130, 246, 0.26);
    color: #fff;
}

.template-like-btn:hover,
.template-dislike-btn:hover {
    background: #fff;
    border-color: #cbd5e1;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.template-like-btn:hover i,
.template-dislike-btn:hover i {
    transform: scale(1.05);
}

.template-like-btn:focus-visible,
.template-dislike-btn:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(46, 91, 255, 0.16), 0 10px 20px rgba(15, 23, 42, 0.1);
    outline: none;
}

.template-like-btn.is-loading,
.template-dislike-btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.template-like-btn.is-loading i,
.template-dislike-btn.is-loading i {
    animation: templateLikePulse 0.85s ease-in-out infinite alternate;
}

@keyframes templateLikePulse {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.08);
    }
}

.landing-template-body .template-engagement {
    margin-bottom: 0.35rem;
}

.landing-template-body .template-engagement .template-like-btn,
.landing-template-body .template-engagement .template-dislike-btn {
    display: none;
}

.landing-template-like-row {
    margin-bottom: 0.25rem;
}
