/**
 * Post Actions Animations & Styles
 * Lucide icons + Tailwind-like circular buttons with counters
 */

/* Pulse animation for like button */
@keyframes likePulse {
    0% {
        transform: scale(1);
        background-color: rgba(255, 255, 255, 0.1);
    }
    50% {
        transform: scale(1.2);
        background-color: rgba(239, 68, 68, 0.3);
    }
    100% {
        transform: scale(1);
        background-color: rgba(255, 255, 255, 0.1);
    }
}

/* Slide in animation for posts */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Heart beat animation for liked state */
@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.1);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(1);
    }
}

/* Apply slide in animation to posts */
.premium-post {
    animation: slideInUp 0.4s ease-out;
}

/* Heart beat for liked hearts */
.action-icon.liked {
    animation: heartbeat 0.6s ease-in-out;
}

/* Smooth transitions for all action elements */
.post-action-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-icon-container {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-count {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover effects */
.post-action-btn:hover .action-icon-container {
    background-color: rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.05);
}

.post-action-btn:hover .action-count {
    color: var(--text-primary) !important;
    font-weight: 600;
}

/* Focus states for accessibility */
.post-action-btn:focus {
    outline: none !important;
    box-shadow: none !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.post-action-btn:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.post-action-btn:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}

/* Remove focus ring for all action buttons */
.post-action-btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Active state */
.post-action-btn:active {
    transform: translateY(1px);
}

.post-action-btn:active .action-icon-container {
    transform: scale(0.95);
}

/* Loading state */
.post-action-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.post-action-btn.loading .action-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .post-actions {
        gap: 4px;
    }
    
    .post-action-btn {
        padding: 4px 8px;
        font-size: 12px;
        min-height: 28px;
    }
    
    .action-icon-container {
        width: 20px;
        height: 20px;
    }
    
    .action-icon {
        width: 12px;
        height: 12px;
    }
    
    .action-count {
        font-size: 12px;
    }
}

/* Dark theme enhancements */
@media (prefers-color-scheme: dark) {
    .post-action-btn:not(.liked) {
        background: rgba(255, 255, 255, 0.03);
        border-color: rgba(255, 255, 255, 0.08);
    }
    
    .post-action-btn:not(.liked):hover {
        background: rgba(255, 255, 255, 0.08);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .post-action-btn {
        border-width: 2px;
    }
    
    .action-icon {
        stroke-width: 3;
    }
}