.widget.barriers {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    width: calc(8 * var(--block-width) - 2 * var(--base-margin));
    margin: var(--base-margin);
    flex-grow: 2;
}

.widget.barriers > .caption {
    margin: 16px 16px 16px 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.widget.barriers > .caption > h2 {
    margin: 0;
    padding: 0;
}

.widget.barriers > .caption .timer-holder {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.widget.barriers > .caption .timer-holder > .control {
    width: 120px;
}

.widget.barriers > .caption .seq-holder {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 130px;
}

.widget.barriers > .caption .interrupt-holder {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 130px;
}

.widget.barriers > .caption .buttons {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
}

.widget.barriers > .caption .buttons > * {
    margin-left: 16px;
}

.widget.barriers .hdr {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    margin: 0 16px;
}

.widget.barriers .double-line {
    display: flex;
    flex-direction: column;
}

.widget.barriers .double-line .subtitle {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.widget.barriers .item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    padding: 0 16px;
}

.widget.barriers .vertical {
    width: 60px;
    flex: none;
}

.widget.barriers .label {
    width: 32px;
    height: 24px;
    line-height: 24px;
    flex: none;
    font-size: 10pt;
    color: silver;
    text-align: center;
}

.widget.barriers .level {
    width: 50px;
    flex: none;
}

.widget.barriers .open {
    width: 120px;
    flex: none;
    padding: 0 12px;
    box-sizing: border-box;
}

.widget.barriers .close {
    width: 120px;
    flex: none;
}

.widget.barriers .limit {
    width: 120px;
    flex: none;
}

.widget.barriers .position {
    width: 150px;
    flex: none;
}

.widget.barriers .actions {
    flex-grow: 2;
}

.widget.barriers .item .vertical {
    min-height: 36px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.widget.barriers .item .container {
    flex-grow: 2;
    display: flex;
    flex-direction: column;
}

.widget.barriers .item .container.empty {
    text-align: center;
    font-size: 10pt;
}

.widget.barriers .item.ba .container {
    flex-direction: column-reverse;
}

.widget.barriers .item.ba {
    background: rgba(0, 128, 0, 0.1);
}

.widget.barriers .item.ab {
    background: rgba(128, 0, 0, 0.1);
}

.widget.barriers .item .container .line {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    transition: background-color .2s;
}

.widget.barriers .item.ba .container .line.lit {
    background: rgba(0, 128, 0, 0.1);
}

.widget.barriers .item.ba .container .line:hover {
    background: rgba(0, 128, 0, 0.15);
}

.widget.barriers .item.ab .container .line.lit {
    background: rgba(128, 0, 0, 0.1);
}

.widget.barriers .item.ab .container .line:hover {
    background: rgba(128, 0, 0, 0.15);
}

.widget.barriers .item .container .line.disabled {
    color: silver;
}

.widget.barriers .item .container .spacer {
    width: 100%;
    min-height: 8px;
}

.widget.barriers .item .container .spacer.dragover, .widget.barriers .item .container .line.dragover {
    background: rgba(119, 136, 153, 0.5);
}

.widget.barriers .item .container .line > .source {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.widget.barriers .item .container .line > .final {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.barriers-widget-overlay {
    padding: 16px;
}

.barriers-widget-overlay .control {
    margin: 16px 0;
}