@import "../../../../Base/Content/sass/bootstrap/variables";
@import "../../../Branding/Content/Partials/Variables";
@import "helpers";

// --- Board
.kanban-board {
    @include glyphicon-color;

    // Remove fixed width?
    /*width: calc(100vw - 220px - 30px);

    @media(max-width: $screen-desktop) {
        width: calc(100vw - 30px);
    }*/
    // DFS: I have removed fixed width. Gives at better fit in webpartzones. Still a not perfekt in small webpartzones.
    // Styling could be better optimized for mobile.
    width:100%;

    overflow: auto;
    position: relative;
    display: flex;
    -ms-flex-direction: row;
    -webkit-flex-direction: row;
    flex-direction: row;
    -ms-flex-wrap: nowrap;
    -webkit-flex-wrap: nowrap;
    flex-wrap: nowrap;
    align-items: stretch;
    padding: 0 0.5%;

    // Alert message box
    .alert {
        max-width: 400px;
        opacity: 0.9;
        position: absolute;
        margin: 0 auto;
        left: 0;
        right: 0;
    }

    // 'Swimlane settings'-button
    .kanban-edit-swimlanes-btn {
        position: absolute;
        top: 7px;
        right: 0;
        height: 24px;
        background-color: $gray-light;
        border-radius: 50%;

        &:hover {
            background-color: $gray-light;
        }

        > .glyphicon {
            color: #fff;
            -moz-transform: rotate(90deg);
            -ms-transform: rotate(90deg);
            -o-transform: rotate(90deg);
            -webkit-transform: rotate(90deg);
            transform: rotate(90deg);
        }
    }
}

// --- Swimlane
[kanban-swimlane] {
    flex-shrink: 0;
    margin: 0 0.5%;
    width: 225px;

    // 'Add card'-button
    .kanban-add-card {
        color: currentColor;
        font-size: inherit;
        font-weight: 200;
        padding: 0 5px;
        margin-bottom: 5px;
    }
}

// --- Card
%kanban-card {
    padding: 0 0 5px 5px;
    margin-bottom: 5px;
}

[kanban-card] {
    &.panel {
        @extend %kanban-card;
        background-color: $wizdom-backgound-color;
    }

    [ng-click] {
        cursor: pointer;
    }
}

// Placeholder used with drag and drop
.kanban-placeholder {
    @extend %kanban-card;
    border: 2px dashed $gray-light;
    border-radius: 4px;
}

// Card header
.kanban-card-header {
    display: table;
    width: 100%;
    margin-top: 2px;

    // Header
    > h5 {
        display: table-cell;
        vertical-align: middle;
    }

    // Image container for assigned members
    > div {
        display: table-cell;
        text-align: right;
        width: 65px;
        height: $member-img-size;
        padding-right: 4px;

        img,
        svg {
            vertical-align: top;
        }

        svg {
            border: 1px solid #999;
        }
    }

    // Alignment of presence pictures
    .kanban-member {
        > div[wizdom365-presence-picture] {
            display: inline-block;
        }

        .ms-peopleux-imgUserLink {
            display: inline-block;
            vertical-align: top;
        }
    }
}

// Card footer
.kanban-card-footer {
    display: table;
    width: 100%;
    min-height: 5px;
    margin-top: 10px;
    font-size: smaller;

    // Primary indicator container
    > div:first-of-type {
        display: table-cell;

        > span {
            margin-right: 5px;
        }
    }

    // Due date container
    > div:nth-of-type(2) {
        display: table-cell;
        width: 60px;
        padding-left: 5px;
    }
}
