
BuildingButton
{
    background-color: rgba(black, 0.4);
    width: 370px;
    height: 80px;
    color: white;
    font-family: Verdana;
    font-size: 18px;
    left: 0px;
    
    transition: all 0.2s ease-out;

    *
    {
        pointer-events: none;
    }

    .count
    {
        width: 64px;
        flex-shrink: 0;
        background-color: rgba(black, 0.2);
        justify-content: center;
        align-items: center;
        text-align: center;
        font-weight: black;
        font-size: 24px;
    }

    .content
    {
        overflow: hidden;
        padding-left: 8px;
        padding-bottom: 4px;

        img
        {
            position: absolute;
            width: 100%;
            height: 100%;
            background-position: center;
            opacity: 0.4;
            background-size: cover;
            background-repeat: no-repeat;
            transition: all 0.2s ease-out;
        }

        .info
        {
            flex-direction: column;
            justify-content: space-evenly;
            margin-bottom: 2px;

            .name
            {
                width: 100%;
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                flex-grow: 1;

                font-weight: black;
                font-size: 24px;
                text-shadow: 0 0 10px black;
            }

            .sub-info
            {
                width: 100%;
                flex-shrink: 0;

                .price
                {
                    width: 60%;
                }

                .pps
                {
                    width: 40%;
                    font-size: 12px;
                    justify-content: flex-end;
                    align-self: flex-end;
                    text-align: right;
                    padding-right: 8px;
                }
            }
        }

        .progress-bar
        {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 4px;
            
            .progress-fill
            {
                position: absolute;
                left: 0;
                top: 0;
                height: 100%;

                background-color: rgba(white, 1);
            }
        }
    }

    .hover-info
    {
        position: absolute;
        top: 0;
        left: 0%;
        width: 0%;
        flex-direction: column;
        background-color: rgba(black, 0.5);
        transform: translateX(-8px);
        opacity: 0;

        *
        {
            pointer-events: none;
            overflow: hidden;
            text-overflow: clip;
        }

        .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;

                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
    {
        .main
        {
            opacity: 0.3;
        }

        &:hover
        {
            left: -3px;
        }
    }

    &:not(.cant-afford)
    {
        &:hover
        {
            sound-in: ui.button.over;
            background-color: rgba(black, 0.5);

            img
            {
                opacity: 1;
            }
        }

        &:active
        {
            sound-in: ui.popup.message.close;
        }
    }

    &:hover
    {
        left: -8px;

        .hover-info
        {
            opacity: 1;
            left: -125%;
            width: 125%;
            transition: all 0.2s ease-out;
        }
    }

    &:active
    {
        left: 8px;
        transition: all 0.05s ease-in-out;
    }
}
