/**
 * Like Buttons Styling
 *
 * Project: Sharing Digital Kommunity (SDK)
 * Developer: KreativeStudio
 */

/* Like Button Base Styles */
.like-button {
    position: absolute;
    z-index: 20;
    top: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    color: #9ca3af; /* Default gray color */
    padding: 0;
    outline: none;
}

/* Like Button Hover State */
.like-button:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* Like Button Active State */
.like-button:active {
    transform: scale(0.95);
}

/* Like Button Liked State */
.like-button.liked {
    color: #ef4444 !important; /* Red color for liked items */
}

/* Like Button Icon */
.like-button svg {
    width: 20px;
    height: 20px;
}

/* Like Button with Count */
.like-button-with-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: #9ca3af;
}

.like-button-with-count.liked {
    color: #ef4444;
}

.like-button-with-count:hover {
    transform: translateY(-2px);
}

/* Like Button Animations */
@keyframes heartBeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.3); }
    30% { transform: scale(1); }
    45% { transform: scale(1.2); }
    60% { transform: scale(1); }
}

@keyframes heartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.like-button-clicked {
    animation: heartBeat 0.8s ease-in-out;
}

/* Like Button in Different Contexts */

/* Course Detail Page */
.course-header .like-button-with-count {
    position: relative;
    top: auto;
    left: auto;
    background-color: transparent;
    box-shadow: none;
}

/* Resource Detail Page */
.resource-header .like-button-with-count {
    position: relative;
    top: auto;
    left: auto;
    background-color: transparent;
    box-shadow: none;
}

/* Light Mode Adjustments */
html[data-theme="light"] .like-button {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .like-button:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Dark Mode Adjustments */
html[data-theme="dark"] .like-button {
    background-color: rgba(30, 30, 40, 0.85);
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    .like-button {
        width: 32px;
        height: 32px;
    }
    
    .like-button svg {
        width: 18px;
        height: 18px;
    }
}
