.dnd-placeholder {
    min-width: 512px;
    max-width: 880px;
    height: 500px;
}

.dnd {
    display: none;
    visibility: hidden;
    position: relative;
    margin-bottom: 50px;
    overflow: hidden;
}

.dnd:last-child {
    margin-bottom: 0;
}

.dnd-intro {
    margin-bottom: 1em;
}

.dnd-choices-text-center {
    .choice {
        text-align: center;
    }
}

.dnd-choices-right {
    .question {
        overflow: hidden;
    }

    .choices {
        float: right;
        display: flex;
        flex-direction: column;
        justify-content: center;

        .choice {
            margin-right: 0;
        }
    }

    .targets {
        float: left;
    }
}

.dnd-choices-left {
    .question {
        overflow: hidden;
    }

    .choices {
        float: left;

        .choice {
            margin-right: 0;
        }
    }

    .targets {
        float: left;
    }

    .btn-group {
        clear: both;
    }
}

.choices {
    //cursor: pointer;

    .choice {
        margin-right: 4px;
        margin-bottom: 4px;

        &.choice-draggable {
            margin: 0;
        }
    }
}

.choice {
    display: inline-block;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    padding: 2px 4px;
    border: 1px solid #888888;
    background-color: #ffffff;
    vertical-align: top;

    &.choice-enabled {
        cursor: move;
    }

    &.choice-disabled {
        cursor: auto;
    }

    p:first-child {
        margin-top: 0;
    }

    p:last-child {
        margin-bottom: 0;
    }
}

.choices-per-col {
    .choice img {
        width: 100%;
    }
}

.targets {
    background-size: contain;

    .target {
        border: 1px solid #7e7e7e;
        padding: 0;

        &:focus {
            outline: none;
        }
    }

    .choice {
        border-color: #ffffff;
    }

    img {
        display: block;
        margin-bottom: 10px;
    }
}

.choice-selected {
    .choices,
    .target-enabled {
        cursor: pointer;
    }
}

.show-correct {
    .choice-correct {
        border-color: green;
        background-color: #e5ffe5;
    }
}

.dnd-table.show-correct {
    .choice-correct {
        border-color: #e5ffe5;
    }
}

.show-incorrect {
    .choice-incorrect {
        border-color: red;
        background-color: #ffe5e5;
    }
}

.dnd-table.show-incorrect {
    .choice-incorrect {
        border-color: #ffe5e5;
    }
}

.dnd-inline {
    .choices {
        .choice {
            width: auto;
        }
    }

    .choice {
        //display: inline-flex;
        //align-items: center;
        //justify-content: center;
        text-align: center;

        img {
            //vertical-align: middle;
        }
    }

    .targets {
        line-height: 2.2;

        .choice {
            display: inline-block;
        }

        .static {
            padding-right: 4px;
        }

        .target {
            display: inline-block;
            vertical-align: middle;
            line-height: 1.4;
        }
    }
}

.dnd-inline-li {
    @extend .dnd-inline;

    .choice {
        text-align: left;
    }

    .targets {
        .target {
            vertical-align: top;
        }
    }
}

.dnd-inline-multi {
    @extend .dnd-inline;

    .targets {
        p {
            //display: table;
        }

        span {
            //display: table-cell;
            //text-align: left;
        }

        .target {
            //width: 100%;
            //padding-right: 100px;

            & .stack-head {
                //display: inline-block;
                //display: block;
                float: left;
                padding: 2px 4px;
                border: 1px solid #ffffff;
                background-color: #ffffff;
                //vertical-align: middle;
                //font-weight: bold;
            }
        }

        .choice {
            width: auto;
            padding-left: 2px;
            padding-right: 0;

            &:last-child {
                padding-right: 4px;
            }

            &:not(:last-child):after {
                content: ',';
            }
        }
    }
}

.dnd-block {
    .targets {
        .target {
            margin-bottom: 8px;
        }
    }

    .choices {
        .choice {
            display: inline-block;
        }
    }

    &.dnd-centre {
        .choices {
            text-align: center;
        }

        .targets {
            text-align: center;

            img {
                margin-right: auto;
                margin-left: auto;
            }
        }

        .choice,
        .target {
            display: inline-block;
        }
    }

    &.multi-choice {
        .target {
            padding-bottom: 20px; //so focus can still be seen when target is full

            .choice {
                height: auto !important;
            }
        }
    }

    &.dnd-table {
        .target {
            margin-bottom: 0;

            .choice {
                /*height: 100% !important;*/
                /*overflow: hidden;*/
            }
        }
    }
}

.dnd-absolute {
    .targets {
        position: relative;

        .target {
            position: absolute;
        }
    }
}

.theme1 {
    .choice {
        background-color: #686868;
        color: #ffffff;

        &.choice-selected {
            background-color: #2b2b2b !important;
            border-color: #2b2b2b !important;
        }

        &.choice-reveal {
            border-color: #ffffff !important;
            background-color: #ffffff;
            color: #686868;
        }
    }

    .targets {
        .target {
            background-color: #f4f9ff;

            &.target-highlight {
                background-color: #a9d3ff;
            }

            &:focus {
                background-color: #a9d3ff;
                outline: none;
            }
        }

        .choice {
            border-color: #686868;
        }
    }

}

.theme2 {
    .choice {
        &.choice-selected {
            background-color: #d0e7ff !important;
        }

        &.choice-draggable {
            background-color: #ffffff !important;
            border-color: #888888 !important;
        }
    }

    .targets {
        .target-enabled {
            background-color: #f4f9ff;

            &.target-highlight {
                background-color: #d0e7ff;
            }

            &:focus {
                background-color: #d0e7ff;

                .choice-enabled:last-child {
                    border-color: rgba(#ffffff, 0);
                    background-color: rgba(#ffffff, 0);
                }
            }
        }
    }
}

.theme3 {
    .choice {
        &.choice-selected {
            background-color: #e4e4e4;
            //border-color: #a9d3ff !important;
        }

        &.choice-draggable {
            border-color: #888888 !important;
        }
    }

    .targets {
        .target {
            background-color: #ffffff;

            &.target-highlight {
                background-color: #e4e4e4;
            }

            .choice-selected {
                border-color: #e4e4e4;
            }
        }
    }
}

//TODO collapsible
table {
    table-layout: fixed;
    /*table-layout: auto;*/
}

th:focus {
    outline: none;
}

.choice-per-header {
    cursor: pointer;
}

.header-focus {
    color: white;
    background-color: #686868;
}

////