﻿@keyframes dots {
    0% {
        content: '.'
    }

    32.5% {
        content: '..';
    }

    70% {
        content: '...'
    }

    100% {
        content: '.'
    }
}

.permission-section-title {
    max-width: 1280px;
    margin: auto;
    display: block;
    width: 100%;
    margin-top: 40px;
    margin-bottom: 10px;
}

.permission-wrapper {
    position: relative;
    width: 100%;
    overflow-x: auto;
    margin: auto;
    overflow-y: auto;
    margin-bottom: 60px;
    max-width: 1280px;
}

    .permission-wrapper .table-striped {
        width: 100%;
    }

    .matrix-container {
        display: flex;
        position: relative;
        overflow-x: auto;
        margin-left: 304px;
        margin-right: 4px;
        padding: 10px 0;
        /*border: 1px solid #F3F2F3;*/
    }

.flags-description-column {
    left: 0;
    top: 71px;
    position: absolute;
    width: 300px;
}

.flags-cell-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 65px;
    background-color: #F3F2F3;
    border-style: solid;
    border-width: 2px;
    border-color: #E7E6EA;
    margin-bottom: 2px;
    padding: 4px;
    text-align: center;
    overflow-y: auto;
}

    .flags-cell-container:first-of-type {
        border-top-color: #004167;
        border-top-width: 1px;
    }

    .flags-cell-container:not(:first-of-type) {
        border-left-color: crimson;
    }

    .flags-cell-container p {
        margin: 0;
    }

    .flags-cell-container.disabled {
        background-color: #00466661;
    }

.role-column {
    display: flex;
    flex-direction: column;
    height: max-content;
    margin-left: 4px;
}

.role-cell,
.role-cell-header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 65px;
    width: 100px;
    padding: 4px;
    margin-bottom: 2px;
}

.role-cell-header {
    background-color: #F3F2F3;
    border-style: solid;
    border-width: 1px;
    border-color: #E7E6EA;
    border-top-color: #004167;
    text-align: center;
}

.role-cell {
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #F3F2F3;
    border-style: solid none none none;
    border-width: 1px;
    border-color: #e0dee0;
}

    .role-cell:nth-child(even) {
        background-color: #fffeff;
        border-style: solid none none none;
        border-width: 1px;
        border-color: #D4D2D4;
    }

    .role-cell div {
        width: 24px;
        height: 24px;
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
    }

    .role-cell .tick {
        background-image: url('./icons/checkmark.svg');
    }

    .role-cell .cross {
        background-image: url('./icons/cross.svg');
    }

    .role-cell .arrow {
        background-image: url('./icons/arrow-outline.svg');
        margin: 0 4px;
        width: 24px;
        height: 12px;
    }

    /* Active flag */

    .role-cell.active .cross {
        display: none;
    }

    .role-cell.active .arrow {
        display: none;
    }

    /* Inactive flag */

    .role-cell.inactive .tick {
        display: none;
    }

    .role-cell.inactive .arrow {
        display: none;
    }

    /* Disabled flag */
    .role-cell.disabled {
        opacity: 0.7;
        background-color: #004666;
    }

    /* selected */

    .role-cell.select-reverse,
    .role-cell.select {
        background-color: #F8E14C;
    }

    .role-cell.select-reverse {
        flex-direction: row-reverse;
    }

        .role-cell.select-reverse .arrow,
        .role-cell.select .arrow {
            display: inline-block;
        }

        .role-cell.select-reverse .cross,
        .role-cell.select .cross {
            display: inline-block;
        }

        .role-cell.select-reverse .tick,
        .role-cell.select .tick {
            display: inline-block;
        }

.processing {
    position: absolute;
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    top: 0;
    background-color: #c3c3c354;
}

    .processing.active {
        display: flex;
    }

    .processing .inner-processing-container {
        padding: 20px;
        background-color: white;
        display: flex;
        align-items: baseline;
        width: 320px;
        justify-content: center;
    }

        .processing .inner-processing-container:after {
            animation-name: dots;
            animation-duration: 1s;
            animation-iteration-count: infinite;
            animation-fill-mode: forwards;
            content: ' ';
            width: 14px;
            font-weight: normal;
        }

.permission-action-buttons-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 60px;
    margin-right: 4px;
}

    .permission-action-buttons-container > * {
        margin-left: 10px;
    }

.processing-button {
    padding: 0 60px;
    height: 30px;
    border: 0;
    font-weight: bold;
    cursor: pointer;
    outline: none;
}

    .processing-button.active {
        background-color: #5BD8F1;
        color: #004167;
    }

        .processing-button.active:hover {
            background-color: #6ae3f1;
        }

    .processing-button.inactive {
        opacity: 0.4;
        cursor: not-allowed;
    }


    @media screen and (max-width: 479px) {

        .permission-container {
            overflow-x: scroll;
            width: 100%;
        }

        .permission-wrapper {
            min-width: 720px;
        }

        .flags-description-column {
            top: 120px;
        }

        .permission-action-buttons-container {
            flex-direction: column;
            height: 110px;
        }

        .permission-action-buttons-container > * {
            width: 100%;
            margin: 5px 0;
        }
    }