﻿.widget {
    /*TODO: Make this relative */
    min-width: 33%;
    border-radius: var(--rnd-border-radius);
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

    .widget[data-width="1"] {
        grid-column: span 1;
    }

    .widget[data-width="2"] {
        grid-column: span 2;
    }

    .widget[data-width="3"] {
        grid-column: span 3;
    }

.widget-header {
    min-height: 42px;
    text-align: center;
    font-size: 15px;
    line-height: 30px;
    white-space: nowrap;
}

.widget-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    padding-right: 30px;
    min-height: 38px;
    line-height: 30px;
    background: #bfbfbf;
}

.widget-body {
    padding: 20px 20px 0 20px;
    position: relative;
    overflow: auto;
    flex: 1;
    min-height: 0;

}

.widget-footer {
    font-size: 12px;
    padding: 10px 20px;
    margin: 0;
    margin-top: auto;
}

    .widget-footer strong {
        font-weight: bold;
    }

.dropdown-menu {
    cursor: default;
    width: 225px;
    min-width: 225px;
    max-height: fit-content;
}

    .dropdown-menu .dropdown-item {
        cursor: pointer;
        min-width: 225px;
    }

        .dropdown-menu .dropdown-item.no-hover:focus, .dropdown-item.no-hover:hover {
            cursor: default;
            background-color: transparent;
        }

.dropdown-toggle {
    padding: 0px;
    vertical-align: middle;
    padding-bottom: 5px;
    width: 32px;
    border-radius: var(--rnd-border-radius);
    position: absolute;
    top: 1px;
    right: 1px;
    border: 0;
    background: transparent;
    color: var(--rnd-light-colour);
    font-size: 31px;
    line-height: 30px
}

    .dropdown-toggle.show {
        background: var(--rnd-light-colour);
        color: var(--rnd-primary-colour);
    }

    .dropdown-toggle::after {
        display: none;
    }

.dropdown-item input[type='number']::-webkit-inner-spin-button,
.dropdown-item input[type='number']::-webkit-outer-spin-button {
    opacity: 1;
    -webkit-appearance: auto;
}

    .widget-filters .select2 .select2-selection {
        border: none !important;
        background-image: none;
        font-weight: bold;
        font-size: 15px;
        padding: 10px 7px;
        max-width: max-content;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .widget-filters > .select2-container {
        width: auto !important;
        max-width: 100%;
        min-width: 0;
    }

        .widget-filters > .select2-container:not(:last-child)::after {
            content: ">";
            font-size: 15px;
            position: absolute;
            right: -.5rem;
            top: calc(50% + 1px);
            transform: translateY(-50%);
        }


.widget-subfilters {
    min-height: 46px;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    text-align: left;
    font-size: 25px;
    background: #f8f8f8;
}

.widget[data-width="1"] .widget-subfilters {
    flex-direction: column;
}

    .widget[data-width="1"] .widget-subfilters > .select2-container {
        width: 100% !important;
    }

.widget[data-width="2"] .widget-subfilters > .select2-container,
.widget[data-width="3"] .widget-subfilters > .select2-container {
    width: calc(50% - 5px) !important;
}

.widget-no-data {
    font-size: 14px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    color: var(--rnd-primary-colour);
}

    .widget-no-data p {
        margin: 0;
    }

    .widget-no-data .no-data-icon {
        width: 50px;
        height: 50px;
        stroke-width: 1;
    }

.widget .select2-selection__clear {
    padding-left: 2px;
    color: #999;
}

.widget .calendar-control {
    background-color: transparent;
    width: 100%;
}