/**
   ToDo: перенести в компоненты
 */

/***************************************************************************************************
 * Формы
 ***************************************************************************************************/

.modal .modal-sorter .window form input[type=text] {
    padding: 5px 10px;
    width: 100%;
}

.modal .modal-sorter button {
    border: none;
    background: #7eb39f;
    text-transform: uppercase;
    padding: 10px;
    text-align: center;
    display: inline-block;
    color: #fff;
    text-decoration: none;
    transition: 0.2s;
    width: 49%;
    margin: 5px 0;
}

.modal .modal-sorter button:hover {
    background: #367d6a;
}

.modal .modal-sorter button:before {
    display: inline-block;
    position: relative;
    font-family: FontAwesome;
    float: left;
    font-size: 14px;
}

.modal .modal-sorter button.full {
    width: 100%;
}

.modal .modal-sorter button.left {
    float: left;
}

.modal .modal-sorter button.right {
    float: right;
}

.modal .modal-sorter button.load {
    display: none;
}

.modal .modal-sorter button.save:before {
    content: "\f0c7";
}

.modal .modal-sorter button.reset:before {
    content: "\f0e2";
}

.modal .modal-sorter .window form .loader {
    display: none;
    position: absolute;
    margin: 5px 0 0 90%;
}

/***************************************************************************************************
 * Элементы сортировщика
 ***************************************************************************************************/

.modal .modal-sorter .window .items {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    margin-bottom: 15px;
    clear: both;
}

.modal .modal-sorter .window:last-child .items {
    border-bottom: none;
    margin-bottom: 10px;
}

.sorter-item, .modal .modal-sorter .window .items > .placeholder {
    display: inline-block;
    background: #fff;
    width: 290px;
    height: 110px;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0;
    margin-top: 10px;
    cursor: move;
    border: solid #cedde4 1px;
    border-radius: 2px;
    position: relative;
    text-align: center;
}

.modal .modal-sorter .window .items > .placeholder {
    visibility: hidden;
}

.modal .modal-sorter .window:last-child .sorter-item,
.modal .modal-sorter .window:last-child .placeholder {
    width: 310px;
}

.sorter-item:hover {
    box-shadow: 0 2px 6px 1px rgba(0, 0, 0, 0.15);
}

.sorter-item.drag {
    z-index: 1001;
    background: #fff !important;
    display: block;
    position: absolute;
    width: 290px;
    box-shadow: 0 2px 6px 1px rgba(0, 0, 0, 0.15);
}

.sorter-item .bar {
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(255, 255, 255, 0.9);
    position: absolute;
    width: 34px;
    height: 100%;
    top: 0;
    left: 0;
    transition: opacity .5s;
    cursor: default;
    box-sizing: border-box;
    padding: 5px;
    text-align: left;
    z-index: 1;
}

.modal .modal-sorter .window:last-child .sorter-item .bar {
    display: none;
}

.sorter-item:hover .bar {
    visibility: visible;
    opacity: 1;
    box-shadow: 0 2px 6px 1px rgba(0, 0, 0, 0.15);
}

.sorter-item.form .bar {
    visibility: visible;
    opacity: 1;
    box-shadow: none;
    border-right: solid #cedde4 1px;
}

.sorter-item.drag .bar {
    opacity: 0;
    visibility: hidden;
}

.sorter-item .bar > a {
    display: block;
    width: 24px;
    height: 24px;
    margin: 0 5px 0 -100px;
    cursor: pointer;
    position: relative;
    transition: .5s ease-in-out;
    opacity: 0;
}

.sorter-item:hover .bar > a,
.sorter-item.form .bar > a {
    margin-left: 0 !important;
    opacity: 1;
}

.sorter-item .bar > a.edit {
    background: url(images/svg/edit-hover.svg) no-repeat center center;
    background-size: 20px 20px;
    transition-delay: .25s;
}

.sorter-item .bar > a.menu {
    background: url(/admin/static/images/svg/menu.svg) no-repeat center center;
    background-size: 20px 20px;
    transition-delay: 0s;
}

.sorter-item .flipper {
    transition: 0.6s;
    transform-style: preserve-3d;
    position: relative;
    width: 100%;
    height: 100%;
}

.sorter-item.form .flipper {
    transform: rotateY(180deg);
}

.sorter-item .view,
.sorter-item .options {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    padding: 5px 10px;
    overflow: hidden;
    box-sizing: border-box;
    transition: .5s;
}

.sorter-item .view {
    z-index: 2;
    transform: rotateY(0deg);
}

.sorter-item .view > img {
    box-sizing: border-box;
    float: left;
    margin: 5px 10px 0 0;
    max-width: 80px;
    max-height: 80px;
    padding: 0 !important;
}

.sorter-item .view > span {
    display: block;
}

.sorter-item .view > span.additional {
    margin-top: 5px;
}

.sorter-item .view > .info {
    position: absolute;
    bottom: 10px;
    background: url(/admin/static/images/mouse-drag.png) right no-repeat;
    right: 10px;
    padding-right: 35px;
    color: #444;
}

.sorter-item .options {
    padding: 10px 10px 10px 45px;
    transform: rotateY(180deg);
    cursor: default;
    text-align: left;
}

.sorter-item .options label {
    margin: 0 0 0 0;
}

.sorter-item .options label span {
    display: inline-block;
    width: 90px;
}

.sorter-item .options label input {
    box-sizing: border-box;
    padding: 3px 5px;
    width: 143px;
    margin: 0;
}

.sorter-item .options button {
    position: absolute;
    bottom: 10px;
    margin: 0;
    right: 10px;
    width: 110px;
    padding: 7px;
    font-size: 10px;
    background: #236480;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.5s ease-out;
}

.sorter-item .options button:hover {
    background: #035678;
}

/***************************************************************************************************
 * Внешний вид окон
 ***************************************************************************************************/

.modal .modal-sorter .window:last-child {
    background: transparent;
    padding: 0;
}

.modal .modal-sorter .window:last-child form {
    background: #fff;
    display: flex;
    box-sizing: border-box;
    padding: 20px;
}

.modal .modal-sorter .window .caption > .reload {
    float: right;
    cursor: pointer;
    color: #000;
    font-size: 12px;
    margin: 1px 8px 0 0;
}

.modal .modal-sorter .window .caption > .reload:hover {
    color: #f47c5e;
}

.modal .modal-sorter .window .caption > .reload:before {
    content: "\f021";
    font-family: FontAwesome;
}


/***************************************************************************************************
 * Кнопки быстрой навигации
 ***************************************************************************************************/

.modal .modal-sorter .window .navigation {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    width: 40px;
    height: 140px;
    bottom: 35px;
    margin: 0 0 0 -70px;
}

.modal .modal-sorter .window .navigation a {
    display: block;
    width: 40px;
    height: 40px;
    background-color: #7eb39f;
    cursor: pointer;
}

.modal .modal-sorter .window .navigation a:hover {
    background-color: #367d6a;
}

.modal .modal-sorter .window .navigation a.top,
.modal .modal-sorter .window .navigation a.bottom {
    background-image: url(/admin/images/navigate-sorter.png);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 20px 26px;
}

.modal .modal-sorter .window .navigation a.bottom {
    transform: rotate(180deg);
}

.modal .modal-sorter .window .navigation a.center::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 2px;
    margin: 11px;
}
