.favorite-form {
    margin-bottom: 24px;
}

.favorite-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 185px;
    padding: 11px 18px;
    overflow: visible;
    border: 1px solid #ef476f;
    border-radius: var(--radius-full);
    background: transparent;
    color: #d6335c;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 180ms ease,
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.favorite-button:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #ff5d8f, #e63967);
    box-shadow: 0 8px 20px rgba(230, 57, 103, 0.25);
    transform: translateY(-2px);
}

.favorite-button:active {
    transform: translateY(0) scale(0.97);
}

.favorite-button:focus-visible {
    outline: 3px solid rgba(239, 71, 111, 0.3);
    outline-offset: 3px;
}

.favorite-button:disabled {
    cursor: default;
}

.favorite-button.is-loading {
    opacity: 0.65;
    cursor: wait;
}

.favorite-button.is-favorite {
    color: #ffffff;
    background: linear-gradient(135deg, #ff5d8f, #e63967);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(230, 57, 103, 0.25);
}

.favorite-button.is-favorite:hover {
    transform: none;
}

.favorite-heart {
    display: inline-block;
    font-size: 1.4rem;
    line-height: 1;
    transform-origin: center;
}

.favorite-label {
    white-space: nowrap;
}

.favorite-button.animate .favorite-heart {
    animation: heart-pop 650ms ease;
}

.favorite-burst {
    position: absolute;
    top: 50%;
    left: 28px;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.favorite-burst span {
    --angle: 0deg;

    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff5d8f;
    opacity: 0;
}

.favorite-burst span:nth-child(1) {
    --angle: 0deg;
}

.favorite-burst span:nth-child(2) {
    --angle: 60deg;
}

.favorite-burst span:nth-child(3) {
    --angle: 120deg;
}

.favorite-burst span:nth-child(4) {
    --angle: 180deg;
}

.favorite-burst span:nth-child(5) {
    --angle: 240deg;
}

.favorite-burst span:nth-child(6) {
    --angle: 300deg;
}

.favorite-button.animate .favorite-burst span {
    animation: favorite-burst 600ms ease-out forwards;
}

.favorite-button.has-error {
    animation: favorite-shake 400ms ease;
}

@keyframes heart-pop {
    0% {
        transform: scale(1);
    }

    35% {
        transform: scale(1.65) rotate(-12deg);
    }

    65% {
        transform: scale(0.85) rotate(8deg);
    }

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

@keyframes favorite-burst {
    0% {
        opacity: 1;
        transform: rotate(var(--angle)) translateY(0) scale(0.3);
    }

    100% {
        opacity: 0;
        transform: rotate(var(--angle)) translateY(-38px) scale(1);
    }
}

@keyframes favorite-shake {
    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-3px);
    }
}

@media (max-width: 480px) {
    .favorite-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .favorite-button,
    .favorite-heart,
    .favorite-burst span {
        transition: none;
        animation: none !important;
    }
}