/**
 * Like Button Styles for Gallery Pages
 * Created: June 21, 2025 - Centralized like functionality styling
 * Function: Provides consistent like button appearance and animations across all gallery pages
 */

/* Image wrapper for positioning like buttons */
.image-wrapper {
    position: relative;
    display: inline-block;
}

/* Like button positioning and basic styling */
.like-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.like-button:hover {
    transform: scale(1.1);
}

/* Heart icon styling */
.heart-icon {
    width: 28px;
    height: 28px;
    transition: fill 0.4s ease, stroke 0.4s ease;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.5));
    transform-origin: center center;
}

/* Unliked state - outline heart */
.heart-icon:not(.liked) {
    fill: none;
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 2;
}

/* Liked state - filled red heart */
.heart-icon.liked {
    fill: #ff4757;
    stroke: #ff4757;
    stroke-width: 1;
}

/* Heart pop animation on click */
@keyframes heartPop {
    0% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.3); 
    }
    100% { 
        transform: scale(1); 
    }
}

.heart-icon.pop {
    animation: heartPop 0.6s ease-out;
}

/* Floating hearts animation */
.floating-heart {
    position: absolute;
    pointer-events: none;
    font-size: 14px;
    color: #ff4757;
    z-index: 15;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0px) scale(0);
    }
    10% {
        transform: translateY(-10px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(0.5) rotate(15deg);
    }
}

.floating-heart.animate {
    animation: floatUp 1.5s ease-out forwards;
}

/* Multiple heart animation paths for variety */
.floating-heart:nth-child(1) {
    animation-delay: 0s;
}

.floating-heart:nth-child(2) {
    animation-delay: 0.1s;
}

.floating-heart:nth-child(3) {
    animation-delay: 0.2s;
}

.floating-heart:nth-child(4) {
    animation-delay: 0.3s;
}

@keyframes floatUp1 {
    0% {
        opacity: 1;
        transform: translateY(0px) translateX(0px) scale(0);
    }
    10% {
        transform: translateY(-10px) translateX(-5px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) translateX(-15px) scale(0.3) rotate(-10deg);
    }
}

@keyframes floatUp2 {
    0% {
        opacity: 1;
        transform: translateY(0px) translateX(0px) scale(0);
    }
    10% {
        transform: translateY(-10px) translateX(5px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-65px) translateX(20px) scale(0.4) rotate(20deg);
    }
}

@keyframes floatUp3 {
    0% {
        opacity: 1;
        transform: translateY(0px) translateX(0px) scale(0);
    }
    10% {
        transform: translateY(-8px) translateX(-10px) scale(0.8);
    }
    100% {
        opacity: 0;
        transform: translateY(-55px) translateX(-25px) scale(0.2) rotate(-25deg);
    }
}

@keyframes floatUp4 {
    0% {
        opacity: 1;
        transform: translateY(0px) translateX(0px) scale(0);
    }
    10% {
        transform: translateY(-12px) translateX(8px) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translateY(-70px) translateX(15px) scale(0.3) rotate(30deg);
    }
}

.floating-heart.path1 {
    animation: floatUp1 1.5s ease-out forwards;
}

.floating-heart.path2 {
    animation: floatUp2 1.6s ease-out forwards;
}

.floating-heart.path3 {
    animation: floatUp3 1.4s ease-out forwards;
}

.floating-heart.path4 {
    animation: floatUp4 1.7s ease-out forwards;
}
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.fullscreen-image {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 1001;
}

/* Harmonized Caption Bar: Caption left, Like right */
.fullscreen-caption-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: auto;
    min-width: 220px;
    max-width: 90vw;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    z-index: 1002;
    gap: 24px;
}

/* Caption sits left in container, no absolute/positional styles */
.fullscreen-caption {
    color: white;
    background: none;
    font-size: 16px;
    text-align: left;
    max-width: 65vw;
    word-wrap: break-word;
    line-height: 1.5;
    opacity: 1;
    transition: opacity 0.3s ease;
    flex: 1 1 auto;
    overflow: hidden;
    white-space: normal;
}

/* Like button sits right in container */
.fullscreen-like-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    flex: 0 0 auto;
}

.fullscreen-like-button .heart-icon {
    width: 24px;
    height: 24px;
    transition: fill 0.4s ease, stroke 0.4s ease, transform 0.2s;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.8));
    pointer-events: none;
    cursor: pointer;
}

.fullscreen-like-button .heart-icon path {
    pointer-events: none;
    cursor: pointer;
}

.fullscreen-like-button .heart-icon:not(.liked) {
    fill: none;
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 2;
}

.fullscreen-like-button .heart-icon.liked {
    fill: #ff4757;
    stroke: #ff4757;
    stroke-width: 1;
}

.fullscreen-like-button:hover .heart-icon {
    transform: scale(1.1);
}

.fullscreen-floating-heart {
    position: absolute;
    pointer-events: none;
    font-size: 16px;
    color: #ff4757;
    z-index: 1002;
}

.fullscreen-floating-heart.animate {
    animation: floatUpFullscreen 1.5s ease-out forwards;
}

@keyframes floatUpFullscreen {
    0% {
        opacity: 1;
        transform: translateY(0px) scale(0);
    }
    10% {
        transform: translateY(-10px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(0.5) rotate(15deg);
    }
}