
UpgradeButton
{
    color: white;
    font-family: Verdana;
    font-size: 18px;
    left: 0px;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    cursor: pointer;
    
    transition: all 0.2s ease-out;

    *
    {
        pointer-events: none;
    }
    
    .button
    {
        width: 64px;
        height: 64px;
        background-color: rgba(rgb(0, 0, 0), 0.7);
        transition: all 0.2s ease-out;

        img
        {
            position: absolute;
            width: 100%;
            height: 100%;
            background-position: center;
            opacity: 0.7;
            background-size: contain;
            background-repeat: no-repeat;
            transition: all 0.2s ease-out;
        }
    }

    .hover-info
    {
        position: absolute;
        top: 0;
        flex-direction: column;
        background-color: rgba(white, 0.1);
        transform: translateX(-8px);
        opacity: 0;

        *
        {
            pointer-events: none;
            overflow: hidden;
        }

        .header 
        {
            width: 100%;
            height: 72px;
            padding: 4px;
            background-color: rgba(black, 0.6);
            gap: 8px;

            *
            {
                white-space: nowrap;
            }

            .icon
            {
                width: 64px;
                height: 64px;
                background-position: center;
                background-size: contain;
                background-repeat: no-repeat;
                flex-shrink: 0;
            }

            .info
            {
                flex-direction: column;
                justify-content: space-around;
                flex-grow: 1;
                text-overflow: ellipsis;

                p
                {
                    width: 100%;
                    background-color: rgba(black, 0);
                    flex-shrink: 0;
                }

                .name
                {
                    font-weight: black;
                    font-size: 24px;
                }

                .count
                {
                    justify-content: flex-start;
                    text-align: left;
                    font-size: 16px;
                    font-weight: normal;
                }
            }

            .price
            {
                flex-shrink: 0;
                height: 100%;
                justify-content: center;
                align-items: center;
            }
        }

        .body
        {
            flex-direction: column;
            padding: 4px;
            gap: 4px;
            font-size: 16px;

            p
            {
                background-color: rgba(black, 0.4);
                padding: 4px;
                max-height: 80px;
            }
        }
    }

    &.cant-afford
    {
        .button
        {
            background-color: rgba(rgb(0, 0, 0), 0.5);
            opacity: 0.7;
        }
    }

    &:not(.cant-afford)
    {
        &:hover
        {
            sound-in: ui.button.over;

            .button
            {
                background-color: rgba(black, 0.7);

                img
                {
                    opacity: 1;
                }
            }
        }

        &:active
        {
            sound-in: ui.popup.message.close;
        }
    }

    &:hover
    {

        .button
        {
            background-color: rgba(black, 0.5);

            img
            {
                opacity: 1;
            }
        }

        .hover-info
        {
            opacity: 1;
            left: -450px;
            width: 450px;
            transition: all 0.2s ease-out;
        }
    }

    &:active
    {
        transition: all 0.05s ease-in-out;
        
        .button
        {
            transform: scale(0.9);
        }
    }
}
