/**
 * Operation styles
 *
 * @author n1474335 [n1474335@gmail.com]
 * @copyright Crown Copyright 2017
 * @license Apache-2.0
 */

.operation {
    cursor: grab;
    padding: 10px;
    list-style-type: none;
    position: relative;
    border-width: 1px;
    border-style: solid;
    border-top: none;
    border-left: none;
    border-right: none;
}

#rec-list .operation {
    padding: 14px;
}

.op-title {
    font-weight: var(--op-title-font-weight);
}

.ingredients {
    display: grid;
    grid-template-columns: auto auto auto;
    grid-column-gap: 14px;
}

.ingredients > div {
    grid-column: 1 / span 3;
}

.ingredients > div.inline {
    grid-column: unset;
}

.ingredients .form-group {
    margin-top: 1rem;
    padding-top: 0;
}

.arg {
    font-family: var(--fixed-width-font-family);
    text-overflow: ellipsis;
}

select.arg {
    font-family: var(--primary-font-family);
    min-width: 100px;
}

textarea.arg {
    min-height: 74px;
    resize: vertical;
}

div.toggle-string {
    flex: 1;
}

.operation [class^='bmd-label'],
.operation [class*=' bmd-label'] {
    top: 13px !important;
    left: 12px;
    z-index: 10;
}

.operation label,
.operation .checkbox label {
    color: var(--arg-label-colour);
}

.operation .is-focused [class^='bmd-label'],
.operation .is-focused [class*=' bmd-label'],
.operation .is-focused [class^='bmd-label'],
.operation .is-focused [class*=' bmd-label'],
.operation .is-focused label,
.operation .checkbox label:hover {
    color: #1976d2;
}

.operation .form-control {
    padding: 20px 12px 6px 12px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    background-image: none;
    background-color: var(--arg-background);
    background-position-y: 100%, 100%;
    color: var(--arg-font-colour);
}

.operation .form-control:hover {
    background-image:
        linear-gradient(to top, #1976d2 2px, rgba(25, 118, 210, 0) 2px),
        linear-gradient(to top, rgba(0, 0, 0, 0.26) 1px, rgba(0, 0, 0, 0) 1px);
    filter: brightness(97%);
}

.operation .form-control:focus {
    background-color: var(--arg-background);
    background-image:
        linear-gradient(to top, #1976d2 2px, rgba(25, 118, 210, 0) 2px),
        linear-gradient(to top, rgba(0, 0, 0, 0.26) 1px, rgba(0, 0, 0, 0) 1px);
    filter: brightness(100%);
}

.operation .bmd-form-group.is-filled label.bmd-label-floating,
.operation .bmd-form-group.is-focused label.bmd-label-floating {
    top: 4px !important;
    left: 12px;
}

.operation label.bmd-label-floating {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    width: calc(100% - 13px);
}

.operation .bmd-form-group .bmd-help {
    margin-top: -17px;
}

.input-group .form-control {
    border-top-left-radius: 4px !important;
}

.input-group-append button {
    border-top-right-radius: 4px;
    background-color: var(--arg-background) !important;
    margin: unset;
}

.input-group-append button:hover {
    filter: brightness(97%);
}

.editable-option-menu {
    height: auto;
    max-height: 350px;
    overflow-x: hidden;
}

.editable-option-menu .dropdown-item {
    padding: 0.3rem 1rem 0.3rem 1rem;
    min-height: 1.6rem;
    max-width: 20rem;
}

.ingredients .dropdown-toggle-split {
    height: 41px !important;
}

.boolean-arg {
    height: 46px;
}

.boolean-arg .checkbox {
    height: 100%;
}

.boolean-arg .checkbox label {
    height: 100%;
    display: flex;
    align-items: center;
}

.boolean-arg .checkbox-decorator {
    top: 13px;
}

.register-list {
    background-color: var(--fc-operation-border-colour);
    font-family: var(--fixed-width-font-family);
    padding: 10px;
    word-break: break-all;
}

.op-icon {
    float: right;
    color: #f44336;
    font-size: 18px;
    cursor: pointer;
}

.recip-icons {
    position: absolute;
    top: 13px;
    right: 10px;
    height: 16px;
}

.recip-icons i {
    margin-right: 10px;
    vertical-align: baseline;
    float: right;
    font-size: 18px;
    cursor: pointer;
}

.disable-icon {
    color: #9e9e9e;
}

.disable-icon-selected {
    color: #f44336;
}

.breakpoint {
    color: #9e9e9e;
}

.breakpoint-selected {
    color: #f44336;
}

.break {
    color: var(--breakpoint-font-colour) !important;
    background-color: var(--breakpoint-bg-colour) !important;
    border-color: var(--breakpoint-border-colour) !important;
}

.break .form-group * { color: var(--breakpoint-font-colour) !important; }

.selected-op {
    color: var(--selected-operation-font-color) !important;
    background-color: var(--selected-operation-bg-colour) !important;
    border-color: var(--selected-operation-border-colour) !important;
}

.selected-op .form-group * { color: var(--selected-operation-font-color) !important; }

.flow-control-op {
    color: var(--fc-operation-font-colour) !important;
    background-color: var(--fc-operation-bg-colour) !important;
    border-color: var(--fc-operation-border-colour) !important;
}

.flow-control-op .form-group *:not(.arg) { color: var(--fc-operation-font-colour) }

.flow-control-op.break {
    color: var(--fc-breakpoint-operation-font-colour) !important;
    background-color: var(--fc-breakpoint-operation-bg-colour) !important;
    border-color: var(--fc-breakpoint-operation-border-colour) !important;
}

.flow-control-op.break .form-group * { color: var(--fc-breakpoint-operation-font-colour) !important; }

.disabled {
    color: var(--disabled-font-colour) !important;
    background-color: var(--disabled-bg-colour) !important;
    border-color: var(--disabled-border-colour) !important;
}

.disabled .form-group * { color: var(--disabled-font-colour) !important; }

.break .register-list {
    color: var(--fc-breakpoint-operation-font-colour) !important;
    background-color: var(--fc-breakpoint-operation-border-colour) !important;
}

.disabled .register-list {
    color: var(--disabled-font-colour) !important;
    background-color: var(--disabled-border-colour) !important;
}
