@import "/UI/Popup.scss";
@import "/UI/Theme.scss";

ResourceSelectPopup.popup .inner
{
    @include ui-block;
    width: 800px;
    height: 800px;
    max-width: 90vw;
    max-height: 90vh;
    gap: 8px;
    font-family: $body-font;
    font-size: $ui-settings-font;
    color: $ui-text;

    .popup-header
    {
        @include ui-title-bar;
        margin: 0;
        height: auto;
        min-height: 23px;
        padding: 3px 10px;
        gap: 8px;

        h2
        {
            flex-grow: 1;
            font-family: $body-font;
            font-size: $ui-settings-font;
            font-weight: 800;
            height: auto;
            color: white;
        }
    }

    .sort-buttons
    {
        flex-shrink: 0;
        flex-direction: row;
        gap: 2px;

        .sort-button
        {
            @include ui-button;
            text-transform: none;

            &.active
            {
                @include ui-selected;
                background-image: none;
            }
        }
    }
}

ResourceSelectPopup.popup .inner .grid
{
    @include ui-section;
    @include ui-scroll;
    width: 100%;
    flex-grow: 1;
    min-height: 0px;
    gap: 8px;
    padding: 8px;
}

ResourceSelectPopup.popup .inner .grid .item
{
    @include ui-selectable;
    width: 100%;
    height: 100%;
    color: $ui-text;
    pointer-events: all;
    margin: 2px;
    position: relative;
    flex-direction: column;
    padding: 8px;
    font-size: $ui-settings-font;
    background-color: $ui-row-alt;

    .icon
    {
        height: 96px;
        font-size: 60px;
        overflow: hidden;
        justify-content: center;
        align-items: center;
        flex-shrink: 0;
        background-position: center;
        background-size: contain;
        background-repeat: no-repeat;
    }

    .title
    {
        font-weight: 700;
        font-size: 13px;
        flex-shrink: 0;
    }

    .desc
    {
        font-size: 11px;
        overflow: hidden;
        opacity: 0.75;
    }
}

ResourceSelectPopup.popup .inner .popup-footer
{
    flex-direction: row;
    justify-content: flex-end;
    flex-shrink: 0;
    gap: 6px;

    .clear-button, .select-button
    {
        @include ui-button;
        min-width: 100px;
        pointer-events: all;
    }
}
