/* LAYOUT */

#paging {
    display: grid;
    padding: 0;
}
#paging > .tiles {
    width: 100%;
    height: 100%;
    overflow: auto;
}
#paging > .tiles > .panel {
    display: grid;
}

#paging > .tiles > .panel.desk16l {
    grid-template-areas: "buttons buttons"
                         "general actions";
    grid-template-rows: 1fr 2fr;
    grid-template-columns: 50% 50%;
}
#paging > .tiles > .panel.desk16mini {
    grid-template-areas: "buttons general"
                         "buttons actions";
    grid-template-rows: auto 1fr;
    grid-template-columns: 50% 50%;
}
#paging > .tiles > .panel.mobilepa {
    grid-template-areas: "buttons general"
                         "buttons actions";
    grid-template-rows: auto 1fr;
    grid-template-columns: 50% 50%;
}

#paging > .tiles > .panel > .buttons {
    grid-area: buttons;
}
#paging > .tiles > .panel > .general {
    grid-area: general;
    padding: 8px 12px;
}
#paging > .tiles > .panel > .actions {
    grid-area: actions;
    padding: 8px 12px;
}


/* BUTTONS */

#paging > .tiles > .panel > .buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-content: center;
}

#paging > .tiles > .panel > .buttons > .layers {
    text-align: center;
    flex: 0 0 auto;
}
#paging > .tiles > .panel > .buttons > .layers .toolkit-icon {
    padding: 0;
    font-size: 20px;
}

#paging > .tiles > .panel > .buttons > .matrix {
    text-align: center;
    flex: 1 1 auto;
}

#paging > .tiles > .panel > .buttons > .matrix .toolkit-clip > .toolkit-container {
    display: grid;
    grid-gap: 8px;
    padding: 12px;
    justify-content: stretch;
    align-content: stretch;
}

#paging > .tiles > .panel > .buttons > .matrix .toolkit-button {
    background: black;
}
#paging > .tiles > .panel > .buttons > .matrix .toolkit-button::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: -moz-linear-gradient(top, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.18) 100%);
    background: -webkit-linear-gradient(top, rgba(255,255,255,0.1) 0%,rgba(0,0,0,0.18) 100%);
    background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%,rgba(0,0,0,0.18) 100%);
}

#paging > .tiles > .panel > .buttons > .matrix .toolkit-button::after {
    content: "";
    display: block;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: all 0.33s;
}
#paging > .tiles > .panel > .buttons > .matrix .toolkit-button.toolkit-active::after {
    border: 2px solid transparent;
    animation: panelbutton-blink 0.5s alternate infinite;
}
@keyframes panelbutton-blink {
    from { border-color: transparent; }
    to   { border-color: #FFFFFF; }
}

#paging > .tiles > .panel > .buttons > .matrix .toolkit-button.toolkit-active > .toolkit-label {
    background: none;
    color: inherit !important;
}


#paging > .tiles > .panel.desk16l > .buttons > .matrix .toolkit-clip > .toolkit-container {
    grid-template-columns: repeat(8, 1fr);
}

#paging > .tiles > .panel.desk16mini > .buttons > .matrix .toolkit-clip > .toolkit-container {
    grid-template-columns: repeat(4, 1fr);
}

#paging > .tiles > .panel.mobilepa > .buttons > .matrix .toolkit-clip > .toolkit-container {
    grid-template-columns: repeat(1, 1fr);
}
#paging > .panel.mobilepa > .buttons > .matrix .toolkit-button {

}

/* GENERAL */

#paging .top {
    display: grid;
}

#paging .top > .toolkit-label.index {
    justify-self: start;
}
#paging .top > .toolkit-label.index::before {
    content: "#";
}

#paging .top > .toolkit-buttonarray .toolkit-clip > .toolkit-container {
    display: flex;
}
#paging .top > .toolkit-buttonarray .toolkit-button {
    flex: 1 0 auto;
}


#paging .top > .color > .toolkit-icon {
    font-size: 16px;
    margin-left: 4px;
}

#paging .top > .color > .toolkit-value {
    flex: 0 0 auto;
}

#paging .top > .color .toolkit-input {
    color: inherit;
    background: inherit;
    border: none;
}

#paging .top > .color > .toolkit-buttonarray {
    flex: 1 1 auto;
}
#paging .top > .color > .toolkit-buttonarray .toolkit-clip > .toolkit-container {
    display: flex;
}
#paging .top > .color > .toolkit-buttonarray .toolkit-button {
    min-height: 32px;
    min-width: 2px;
    flex: 1 1 auto;
    margin: 1px;
}
#paging .top > .color > .toolkit-buttonarray .toolkit-button > .toolkit-label {
    display: none;
}



/* ACTIONS */

#paging .scroller {
    white-space: normal;
    height: calc(100% - 24px);
}

#paging .item > .toolkit-select {
    flex: 1 1 100%;
}



/* ADD */

.add-dialog.panel_dialog {
    margin-left: 64px;
    margin-top: -36px;
    width: 256px;
}
.add-dialog.panel_dialog .table {
    width: 100%;
    grid-template-columns: auto 1fr auto;
}
