/* ZONES */

#zones {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#zones > .empty {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#zones > .empty > .toolkit-button {
    margin: 12px;
    background: none;
}

#zones > .zone {
    display: inline-flex;
    padding: 48px 12px 0 12px;
}
#zones > .zone.hidden {
  visibility: hidden;
}

#zones > .zone > .left {
    flex: 2 1 40%;
    position: relative;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    margin: 0 12px 0 0;
    min-width: min-content;
}
#zones > .zone > .center {
    flex: 2 1 40%;
    padding-bottom: 12px;
    display: flex;
    flex-direction: column;
    margin-right: 12px;
}
#zones > .zone > .right {
    flex: 1 1 20%;
    padding-bottom: 44px;
    display: flex;
    flex-direction: column;
}





/* HEADER */

#zones > .zone > .icon {
    padding: 0;
    margin: 0;
}
#zones > .zone > .icon > .color {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: 10px;
    box-shadow: inset 1px 3px 4px rgba(0, 0, 0, 0.66);
    background: #262626;
}


/* ZONES PORTS */

#zones .colors {
    position: absolute;
    left: 0;
    bottom: 0;
    font-size: 8px;
    line-height: 10px;
}
#zones .colors > span {
    display: block;
    width: 44px;
    text-align: left;
}

#zones .scroller {
    height: calc(100% - 32px);
}

#zones .dsp > .toolkit-level-meter {
    width: 100%;
    margin-bottom: 12px;
}

#zones .items > .item.input > .toolkit-label {
    flex: 0 0 32px;
    text-align: center;
}

#zones .items > .item > .toolkit-select {
    margin-right: 0px;
    padding: 0 4px;
    width: 60px;
}
#zones .items > .item > .toolkit-select > .toolkit-icon {
    margin: 0 !important;
    padding: 0;
}

#zones .items > .item > .toolkit-container {
    margin-right: 2px;
}

#zones .items > .item > .toolkit-value {
    flex: 1 1 100%;
    position: relative;
}
#zones .items > .item.flash {
    background: var(--color-orange);
}

#zones .items > .item > .toolkit-value > input {
    padding-top: 6px;
}

#zones .items > .item > .toolkit-value > .labelorigin {
    position: absolute;
    top: 1px;
    left: 3px;
    pointer-events: none;
    opacity: 0.5;
    font-size: 11px;
    line-height: 1;
}

#zones .items > .item > .toolkit-icon.hamburger {
    margin: 0;
    width: 32px;
    opacity: 0.5;
    cursor: ns-resize;
    font-size: 20px;
}

#zones .items > .item > .toolkit-level-meter {
  height: 32px;
  min-height: 0;
}
#zones .items > .item > .spacer {
    flex: 0 0 88px;
}

@media(max-width:1280px) {
    #zones .items > .item > .toolkit-valueknob {
        display: none;
    }
}

#zones .center > .toolkit-label {
    margin-bottom: 22px;
}

#zones .center > .scroller > .inputs {
  display: flex;
  flex-direction: column;
}

/* ZONES DSP */

#zones .dsp {
    flex: 1 1 100%;
    text-align: center;
}

#zones .dsp .toolkit-pager {
    grid-area: pager;
    justify-self: stretch;
    align-self: stretch;
}

#zones .dsp .toolkit-pager .toolkit-buttonarray .toolkit-button {
    border-top: 2px solid #262626;
    border-left: 2px solid #262626;
    flex: 1 0 auto;
}
#zones .dsp .toolkit-pager .toolkit-buttonarray .toolkit-button:first-child {
    border-top-left-radius: 20px;
}
#zones .dsp .toolkit-pager .toolkit-buttonarray .toolkit-button:last-child {
    border-top-right-radius: 20px;
}

#zones .dsp .toolkit-pager .toolkit-buttonarray.toolkit-horizontal > .toolkit-clip > .toolkit-container {
    text-align: center;
}

#zones .dsp awml-page.general {
    flex: 1 1 100%;
    display: -ms-grid;
    display: grid;
    grid-template-areas: "eq eq" "comp limit" "controls controls";
    grid-template-rows: 1fr 1fr 2fr;
    grid-template-columns: 50% 50%;
    grid-gap: 12px 0;
}

#zones .dsp awml-page.general > awml-clone {
    white-space: nowrap;
}

#zones .dsp awml-page.general > awml-clone.equalizerclone {
    grid-area: eq;
    height: 100%;
}

#zones .dsp awml-page.general > awml-clone.equalizerclone > .toolkit-equalizer {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
}
#zones .dsp awml-page.general > awml-clone.equalizerclone > .toolkit-equalizer .toolkit-response-handle {
    display: none;
}
#zones .dsp awml-page.general > awml-clone.compressorclone {
    grid-area: comp;
}
#zones .dsp awml-page.general > awml-clone.limiterclone {
    grid-area: limit;
}
#zones .dsp awml-clone.dynamics .toolkit-dynamics {
    display: flex;
}
#zones .dsp awml-clone.dynamics .toolkit-dynamics > svg {
    order: 1;
    flex: 0 0 auto;
    margin-right: 2px;
}
#zones .dsp awml-clone.dynamics .toolkit-level-meter {
    height: 100%;
    min-height: 0;
    margin: 0 2px 0 0;
}
#zones .dsp awml-clone.dynamics .toolkit-level-meter > .toolkit-title {
    font-size: 9px;
    margin: 0;
}

#zones .dsp awml-clone.dynamics .toolkit-level-meter.in {
  order: 0;
}
#zones .dsp awml-clone.dynamics .toolkit-level-meter.reduction {
  order: 2;
}
#zones .dsp awml-clone.dynamics .toolkit-level-meter.out {
  order: 3;
}

#zones .dsp .general {
    overflow: hidden;
}
#zones .dsp .controls {
    grid-area: controls;
    display: grid;
    grid-template-areas: "title title title   title"
                         "input ratio upthres dwnthres"
                         "fader rampu rampd   .";
    grid-template-columns: 1fr auto auto auto;
    grid-column-gap: 4px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    grid-row-gap: 12px;
    align-content: center;
}
#zones .dsp .general .controls {
    overflow: visible;
}
#zones .dsp .controls > .title {
    grid-area: title;
}
#zones .dsp .controls > .title > .toolkit-button {
    bottom: 1px;
    right: 0;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
}

#zones .dsp .controls > .toolkit-range-fader {
    grid-area: fader;
    width: auto !important;

}
#zones .dsp .controls > .ratio {
    grid-area: ratio;
}
#zones .dsp .controls > .upthres {
    grid-area: upthres;
}
#zones .dsp .controls > .dwnhres {
    grid-area: dwnhres;
}
#zones .dsp .controls > .rampu {
    grid-area: rampu;
}
#zones .dsp .controls > .rampd {
    grid-area: rampd;
}
#zones .dsp .controls > .tail {
    grid-area: tail;
}


#zones .dsp .controls > .input {
    grid-area: input;
    grid-column-gap: 12px;
    grid-row-gap: 4px;
}

/* ENABLED */

#zones .dsp .enable {
    position: absolute;
    z-index: 100;
    top: 8px;
    right: 8px;
    background: #262626 !important;
    border-radius: 50%;
    width: 48px;
    height: 48px;
}
#zones .dsp .enable > .toolkit-icon {
    background: none !important;
    color: #666;
    font-size: 28px;
}
#zones .dsp .general .enable {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    top: auto;
    bottom: 16px;
}
#zones .dsp .general .toolkit-dynamics .enable {
    right: auto;
    left: 32px;
}
#zones .dsp .general .enable > .toolkit-icon {
    font-size: 16px;
}
#zones .dsp .enable.toolkit-active > .toolkit-icon {
    background: none !important;
    color: var(--color-orange) !important;
}



#zones .toolkit-chart .toolkit-graph {
    stroke: #666;
}
#zones .enabled .toolkit-graph {
    stroke: var(--color-orange);
}
#zones .dsp .toolkit-valueknob .toolkit-value {
    fill: #666;
}
#zones .enabled .toolkit-valueknob .toolkit-value {
    fill: var(--color-orange);
}


/* EQUALIZER */

#zones .dsp awml-page {

}
#zones .dsp awml-page.equalizer {
    display: -ms-flexbox;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
}
#zones .dsp awml-page.equalizer > * {
    flex: 0 0 auto;
}
#zones .dsp awml-page.equalizer > .equalizerclone {
    flex: 1 1 auto;
    max-height: 320px;
    height: 100%;
    display: block;
}
#zones .dsp awml-page.equalizer > .equalizerclone > .toolkit-equalizer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
}

#zones .dsp awml-page.equalizer > .bands {
    flex: 0 0 auto;
    display: -ms-flexbox;
    display: flex;
    margin-top: 4px;
}
#zones .dsp awml-page.equalizer > .bands > awml-clone {
    flex: 1 1 auto;
    background: #262626;
    border-radius: 6px;
    margin: 2px;
    padding: 4px;
}
#zones .dsp awml-page.equalizer > .bands > awml-clone > .toolkit-valueknob {
    display: -ms-flexbox;
    display: flex;
}



/* COMPRESSOR / LIMITER */
#zones .dsp awml-page.dynamics {
    display: flex;
    flex-direction: column;
}
#zones .dsp awml-page.dynamics .enable {
  bottom: 20px;
  right: 80px;
  top: auto;
}
#zones .dsp awml-page.dynamics > .controls {
    display: grid;
    grid-template-areas: "attack thres ratio"
                         "release thres makeup";


    grid-template-rows: auto auto;
    grid-template-columns: 1fr auto 1fr;
    flex: 1 1 262px;
    align-content: start;
}
#zones .dsp awml-page.dynamics > .dynamicsclone {
    grid-area: graph;
    flex: 4 1 auto;
    font-size: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#zones .dsp awml-page.dynamics > .controls > .toolkit-valueknob::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    height: 80px;
    background: #262626;
    border-radius: 40px;
}
#zones .dsp awml-page.dynamics > .controls > .compthres::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 240px;
    height: 240px;
    background: #262626;
    border-radius: 100%;
}
#zones .dsp awml-page.dynamics > .controls > .compattack {
    grid-area: attack;
    padding-left: 8px;
    z-index: 1;
}
#zones .dsp awml-page.dynamics > .controls > .comprelease {
    grid-area: release;
    padding-left: 8px;
    z-index: 1;
}
#zones .dsp awml-page.dynamics > .controls > .compratio {
    grid-area: ratio;
    padding-right: 8px;
    z-index: 1;
}
#zones .dsp awml-page.dynamics > .controls > .compthres {
    grid-area: thres;
    margin: 32px -28px;
    z-index: 0;
}
#zones .dsp awml-page.dynamics > .controls > .compgain {
    grid-area: makeup;
    padding-right: 8px;
    z-index: 1;
}



/* DRAGDROP */

#zones .add_before::after,
#zones .add_after::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-orange);
}
#zones .add_before::after {
    top: -2px;
}
#zones .add_after::after {
    bottom: -3px;
}
#zones .dragged {
    opacity: 0.3;
}



/* ADD PORTS */

.add-dialog.zone_port {
    width: 464px;
}

.add-dialog.zone_port .flex {
    width: 440px;
}
.add-dialog.zone_port .flex > .toolkit-label {
    flex: 0 0 96px;
    text-align: right;
    margin-right: 8px;
}
.add-dialog.zone_port .flex > .toolkit-select {
    flex: 1 0 auto;
    margin-right: 8px;
}
.add-dialog.zone_port .warning {
    font-size: 56px;
    line-height: 56px;
    color: #333333;
    margin-right: 8px;
}
.add-dialog.zone_port .info {
    white-space: normal;
    flex: 0 0 256px;
}
.add-dialog.zone_port .bigvalue {
    padding: 8px 16px;
}
.add-dialog.zone_port .bigvalue .toolkit-icon {
    font-size: 24px;
}
.add-dialog.zone_port .bigvalue .value {
    font-size: 24px;
    line-height: 32px;
}


.add-dialog.zone_port .table {
    width: 100%;
    height: 100%;
    align-content: end;
}


.add-dialog.zone_port > awml-clone > .toolkit-pager {
    height: 248px;
}

.add-dialog.zone_port > awml-clone > .toolkit-pager > .toolkit-buttonarray {
    margin-bottom: 8px;
}
.add-dialog.zone_port > awml-clone > .toolkit-pager > .toolkit-buttonarray .toolkit-container {
    display: flex;
}
.add-dialog.zone_port > awml-clone > .toolkit-pager > .toolkit-buttonarray .toolkit-button {
    flex: 1 1 33%;
}

.add-dialog.zone_port > awml-clone > .toolkit-pager .toolkit-page {
    animation-duration: 0s !important;
    display: flex;
    flex-direction: column;
}
.add-dialog.zone_port > awml-clone > .toolkit-pager .toolkit-page.table {
    display: grid;
}

.add-dialog.zone_port .noports {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}


.add-dialog.zone_port > awml-clone > .toolkit-pager .backplaneusage {
    display: flex;
    justify-content: left;
    gap: 4px;
}
.add-dialog.zone_port > awml-clone > .toolkit-pager .backplaneusage > .toolkit-button {
    padding: 2px 0 2px 2px;
    background: #262626;
    border-radius: 6px;
    border: 2px solid transparent;
    font-size: 0.9em;
}
.add-dialog.zone_port > awml-clone > .toolkit-pager .backplaneusage > .toolkit-button.toolkit-active {
    border: 2px solid var(--color-orange);
}
.add-dialog.zone_port > awml-clone > .toolkit-pager .backplaneusage > .toolkit-button.toolkit-active > * {
    background: none;
    color: #ffffff;
}
.add-dialog.zone_port > awml-clone > .toolkit-pager .backplaneusage > .toolkit-button.toolkit-active > .toolkit-label {
    color: #ffffff !important;
}
.add-dialog.zone_port > awml-clone > .toolkit-pager .backplaneusage > .toolkit-button > .toolkit-icon {
    color: #666666 !important;
    padding: 0;
}
.add-dialog.zone_port > awml-clone > .toolkit-pager .backplaneusage > .toolkit-button.overflow > .toolkit-icon {
    color: var(--color-orange) !important;
    animation: input-overflow-blink 0.5s alternate infinite;
}
.add-dialog.zone_port > awml-clone > .toolkit-pager .backplaneusage > .toolkit-button > .toolkit-label {
    white-space: pre;
    line-height: 1;
    /* font-size: 0.8r2em; */
}
@keyframes input-overflow-blink {
    from { opacity: 1; }
    to { opacity: 0; }
}

.add-dialog.zone_port > awml-clone > .toolkit-pager .portcontainer {
    display: flex;
    justify-content: left;
    gap: 4px;
}
.add-dialog.zone_port > awml-clone > .toolkit-pager .portcontainer > .toolkit-select {
    flex: 1 1 auto;
}
.add-dialog.zone_port > awml-clone > .toolkit-pager .portcontainer > .toolkit-buttonarray {
    flex: 0 0 auto;
    width: auto;
}


/* Generator */

.add-dialog.zone_port > awml-clone > .toolkit-pager .generator .toolkit-buttonarray .toolkit-container {
    display: flex;
}
.add-dialog.zone_port > awml-clone > .toolkit-pager .generator .toolkit-buttonarray .toolkit-button {
    flex-direction: column;
    flex: 1 1 auto;
    padding: 4px 8px;
}
.add-dialog.zone_port > awml-clone > .toolkit-pager .generator .toolkit-buttonarray .toolkit-button.toolkit-active {
    background: -moz-linear-gradient(top, rgb(214, 76, 14) 0%, rgb(241, 107, 47) 100%);
    background: -webkit-linear-gradient(top, rgb(214, 76, 14) 0%, rgb(241, 107, 47) 100%);
    background: linear-gradient(to bottom, rgb(214, 76, 14) 0%, rgb(241, 107, 47) 100%);
}
.add-dialog.zone_port > awml-clone > .toolkit-pager .generator .toolkit-buttonarray .toolkit-button.toolkit-active > * {
    background: none;
    line-height: 1;
}

.add-dialog.zone_port > awml-clone > .toolkit-pager .generator {
    grid-template-rows: 1fr auto;
}
