/**
 * High-Performance Post Like System - Styles
 */

.post-like-container {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-like-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #fff;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: 600;
    color: #657786;
    outline: none;
    position: relative;
    overflow: hidden;
    
    box-shadow: 0 5px 30px rgba(255, 111, 99, .4);
    border: 0;
    width: 50px;
    height: 50px;
}

.post-like-btn:hover {
    border-color: #e0245e;
   
    transform: translateY(-1px);
}

.post-like-btn:active {
    transform: translateY(0);
}

.post-like-btn.processing {
    pointer-events: none;
    opacity: 0.7;
}

/* Heart icon styles */
.heart-icon {
    padding-top: 2px;
    width: 26px;
    height: 26px;
    fill: #832729;

    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.post-like-btn.liked .heart-icon {
    fill: #fff;
    animation: heartBeat 0.3s ease;
}

.post-like-btn.liked {
    border-color: #e0245e;
    color: #e0245e;
    background: #832729;
}

/* Animation for like action */
.post-like-btn.animating {
    animation: buttonPulse 0.3s ease;
}

.post-like-btn.animating .heart-icon {
    animation: heartPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Like count */
.like-count {
    font-size: 15px;
    font-weight: 600;
   
    text-align: left;
    transition: all 0.2s ease;
}

/* Particle effect on like */
.post-like-btn.animating::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(224, 36, 94, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: particleExplosion 0.5s ease-out;
}

/* Keyframe animations */
@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(0.9);
    }
}

@keyframes heartPop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.4);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes buttonPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes particleExplosion {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Loading state */
.post-like-btn.processing::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 24px;
}

/* Responsive design */
@media (max-width: 768px) {
    .post-like-btn {
        font-size: 14px;
        height: 40px;
        width: 40px;
    }
    
    .heart-icon {
        width: 18px;
        height: 18px;
    }
    
    .like-count {
        font-size: 14px;
    }
}


/* Accessibility */
.post-like-btn:focus {
    outline: 2px solid #1da1f2;
    outline-offset: 2px;
}

.post-like-btn:focus:not(:focus-visible) {
    outline: none;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .post-like-btn {
        border-width: 3px;
    }
    
    .post-like-btn.liked {
        background: #fff;
        color: #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .post-like-btn,
    .heart-icon,
    .like-count {
        transition: none;
        animation: none;
    }
    
    .post-like-btn.animating,
    .post-like-btn.animating .heart-icon,
    .post-like-btn.animating::before {
        animation: none;
    }
}