/* ========================================
   Cute Heart Like Button Styles (Glassmorphic & Centered)
   ======================================== */

/* Like Button Container - Fixed inside viewport (floating) */
/* Like Button Container - Fixed bottom right */
.ux-like-button-wrapper {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.ux-like-button {
    pointer-events: auto;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;

    /* Cute Glassmorphism - Light Mode */
    background: linear-gradient(135deg, rgba(255, 240, 245, 0.9), rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1.5px solid rgba(255, 182, 193, 0.4);

    border-radius: 100px;
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.85);

    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Soft Pink Shadow */
    box-shadow:
        0 10px 40px -10px rgba(255, 105, 180, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset,
        0 4px 16px rgba(255, 182, 193, 0.15);

    overflow: visible;
    user-select: none;
    -webkit-user-select: none;
}

@media (max-width: 640px) {
    .ux-like-button {
        width: 100%;
        justify-content: center;
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }
}

.ux-like-button:hover {
    background: linear-gradient(135deg, rgba(255, 230, 240, 0.95), rgba(255, 255, 255, 0.9));
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(255, 105, 180, 0.5);
    box-shadow:
        0 20px 40px -10px rgba(255, 105, 180, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset,
        0 8px 24px rgba(255, 182, 193, 0.2);
}

.ux-like-button:active {
    transform: translateY(-1px) scale(0.98);
}

/* Heart Icon */
/* Heart Icon Container */
.like-heart-icon {
    width: 1.8rem;
    height: 1.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    line-height: 1;
    font-size: 0;
    /* Hide text fallback */
}

/* SVG Styles */
.cute-heart-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.heart-outline {
    color: rgba(255, 150, 180, 0.5);
    transition: color 0.3s ease;
}

/* Heart Fill - Growing Red Color */
.heart-fill {
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center bottom;
}

/* Animate fill growth */
.ux-like-button .heart-fill {
    animation: fillGrow 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fillGrow {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* At max likes, make heart fully red and vibrant */
.ux-like-button.max-likes .heart-fill {
    opacity: 1 !important;
    fill: #ff4d4d !important;
    color: #ff4d4d !important;
    filter: drop-shadow(0 0 8px rgba(255, 77, 77, 0.6));
    animation: heartGlow 2s ease-in-out infinite;
}

.ux-like-button.max-likes .heart-fill path {
    fill: #ff4d4d !important;
}

/* Override gradient fill at max likes - make it solid red */
.ux-like-button.max-likes .heart-fill {
    fill: #ff4d4d !important;
    background: #ff4d4d !important;
}

.ux-like-button.max-likes .heart-fill[fill*="url"] {
    fill: #ff4d4d !important;
}

@keyframes heartGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 8px rgba(255, 77, 77, 0.6));
    }

    50% {
        filter: drop-shadow(0 0 12px rgba(255, 77, 77, 0.9));
    }
}

.heart-face {
    color: rgba(80, 50, 60, 0.7);
    transition: all 0.3s ease;
    transform-origin: center;
}

.mouth-neutral,
.mouth-happy {
    transition: opacity 0.3s ease;
}

/* Default smile - show happy mouth */
.mouth-neutral {
    opacity: 0;
}

.mouth-happy {
    opacity: 1 !important;
}

.ux-like-button.is-smiling .mouth-neutral {
    opacity: 0;
}

.ux-like-button.is-smiling .mouth-happy {
    opacity: 1;
}

/* Dark mode SVG colors */
[data-theme="dark"] .heart-outline {
    color: rgba(255, 150, 180, 0.4);
}

[data-theme="dark"] .heart-face {
    color: rgba(255, 200, 210, 0.9);
}

/* Heart pulse animation */
@keyframes heartPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

.heart-pulse {
    animation: heartPulse 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Like Counter */
.like-counter {
    font-size: 1rem;
    font-weight: 600;
    color: inherit;
    min-width: 1.2rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Counter bounce animation */
@keyframes counterBounce {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }

    100% {
        transform: translateY(0);
    }
}

.counter-bounce {
    animation: counterBounce 0.3s ease-out;
}

/* Button states */
.ux-like-button.has-likes .like-heart-icon {
    opacity: 1;
}

/* Max Likes State - Cuter & Bigger */
.ux-like-button.max-likes .cute-heart-svg {
    animation: heartWiggle 2s ease-in-out infinite;
}

/* Make outline red at max likes */
.ux-like-button.max-likes .heart-outline {
    color: #ff4d4d !important;
    stroke: #ff4d4d !important;
    stroke-width: 7;
}

.ux-like-button.max-likes .heart-face {
    color: #fff;
    /* White face on red background */
}

.ux-like-button.max-likes .mouth-neutral {
    opacity: 0;
}

.ux-like-button.max-likes .mouth-happy {
    opacity: 1;
}

@keyframes heartWiggle {

    0%,
    100% {
        transform: rotate(-3deg) scale(1.1);
    }

    50% {
        transform: rotate(3deg) scale(1.15);
    }
}

.ux-like-button.max-likes {
    background: rgba(255, 255, 255, 0.95);
    border-color: #fff;
    box-shadow:
        0 15px 50px -10px rgba(255, 105, 180, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.9) inset;
}

/* Floating Hearts Container */
.floating-hearts-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: -1;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Floating Heart Animation */
.floating-heart {
    position: absolute;
    bottom: 50%;
    left: 50%;
    font-size: 1.5rem;
    pointer-events: none;
    animation: floatUp 1.5s ease-out forwards;
    opacity: 0;
}

@keyframes floatUp {
    0% {
        transform: translate(var(--start-x, 0), 0) scale(0.5);
        opacity: 0;
    }

    20% {
        opacity: 1;
        transform: translate(var(--start-x, 0), -30px) scale(1);
    }

    100% {
        transform: translate(var(--end-x, 0), -120px) scale(0.8) rotate(var(--rotation, 0));
        opacity: 0;
    }
}

/* Like Messages (Simplified) */
.like-message {
    position: absolute;
    top: -3.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(10px);

    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    color: #fff;

    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 200;
}

.like-message::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(30, 30, 30, 0.9);
}

.like-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Dark mode support - Cute Glassmorphic */
[data-theme="dark"] .ux-like-button {
    background: linear-gradient(135deg, rgba(40, 30, 35, 0.9), rgba(30, 25, 28, 0.85));
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-color: rgba(255, 105, 180, 0.25);
    color: rgba(255, 248, 250, 0.95);
    box-shadow:
        0 10px 40px -10px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 105, 180, 0.1) inset,
        0 4px 20px rgba(255, 105, 180, 0.1);
}

[data-theme="dark"] .ux-like-button:hover {
    background: linear-gradient(135deg, rgba(50, 35, 42, 0.95), rgba(40, 30, 35, 0.9));
    border-color: rgba(255, 105, 180, 0.45);
    box-shadow:
        0 20px 40px -10px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 105, 180, 0.2) inset,
        0 8px 32px rgba(255, 105, 180, 0.15);
}

/* Max likes in dark mode */
[data-theme="dark"] .ux-like-button.max-likes {
    background: rgba(255, 77, 77, 0.15);
    border-color: rgba(255, 77, 77, 0.4);
    box-shadow:
        0 15px 50px -10px rgba(255, 77, 77, 0.3),
        0 0 0 1px rgba(255, 77, 77, 0.2) inset;
}

[data-theme="dark"] .like-message {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
}

[data-theme="dark"] .like-message::after {
    border-top-color: rgba(255, 255, 255, 0.9);
}

/* Responsive */
@media (max-width: 768px) {
    .ux-like-button-wrapper {
        bottom: 20px;
        padding: 0.5rem 1rem;
    }
}

/* Accessibility */
.ux-like-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}