/* Custom added styles */
.invalid {
    border: 1px solid $bt-error-highlight;
}
.uppercase {
    text-transform: uppercase;
}
.aster {
    display: inline-block;
    font-size: 9pt;
    color: $bt-error-highlight;
}
input {
    border: 1px solid $bt-grey-dark-20;
    border-radius: 4px;
    font-size: 1em;
    padding: 8px 5px;
    box-sizing: border-box;
    width: 100%;
    outline-color: $bt-blue;
    color: $bt-body-font-color;
}
textarea {
    border: 1px solid $bt-grey-dark-20;
    border-radius: 4px;
    font-size: 0.9em;
    padding: 5px;
    box-sizing: border-box;
    min-height: 120px;
    width: 100%;
    outline-color: $bt-blue;
    color: $bt-body-font-color;
}
input:read-only, textarea:read-only {
    background-color: $bt-grey-light-90;
}
input.filter {
    border: 1px solid $bt-grey-light-40;
    width: 100%;
    &.applied {
        border: 2px solid darkorange;
    }
}
span.vldtn-error {
	background: $bt-error-highlight;
    font-size: 0.8em;
    text-align: left !important;
    display: block;
    position: absolute;
    color: $bt-white;
    margin-top: 8px;
    padding: 3px 5px;
    max-width: 250px;
    z-index: 10;
    &:before {
        content: '';
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-bottom: 7px solid $bt-error-highlight;
        position: absolute;
        top: -7px;
    }
}
span.rfq {
    color: $bt-blue;
    font-size: 11pt;
    margin-left: 4px !important;
}
span.rfo {
    color: red;
    font-size: 11pt;
    margin-left: 4px !important;
}
span.noneditable {
    font-family: $bt-font-family;
    font-weight: bolder;
    padding: 5px 0;
    font-size: 0.95em;
    vertical-align: unset;
    display: inline-block;
    width: 100%;
    color: $bt-black;
}

input[type=text] ~ span.icon, input[type=password] ~ span.icon {
    position: absolute;
    margin-left: -25px;
    margin-top: 3px;
    font-size: 14pt;
    color: rgb(166, 169, 172);
    cursor: pointer;
}

/* SLA styles */
.SLA {
    position: relative;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin: 0 auto;
    display: inline-block !important;
}
.SLA.red {
    background: $bt-red;
}
.SLA.amber {
    background: $bt-amber;
}
.SLA.green {
    background: $bt-green;
}
.SLA.black {
    background: $bt-black;
}

.noneditable {
    font-family: $bt-font-family-bold;
}

.text-input {
    input {
        outline: none;
    }
    .icon {
        position: relative;
        cursor: pointer;
        color: $bt-grey-dark-20;
        float: right;
        top: -28px;
        left: -5px;
    }
}
.megaform {
    padding: 2px;
	box-sizing: border-box;
    background: transparent;
    border-radius: 4px;
    label:not(.option) {
        display: block;
        font-size: 0.9em;
        margin-bottom: 6px;
        color: $bt-body-font-color;
        text-align: left;
        font-family: $bt-font-family-bold;
    }
    textarea {
        outline: none;
    }
    &.error {
        input.text, textarea {
            border-color: $bt-red-dark;
        }
        textarea {
            border-color: $bt-red-dark;
        }
    }
    &.focus {
        input.text, textarea {
            border-color: $bt-blue;
        }
    }
    &.readonly {
        input.text, textarea {
            background: $bt-grey-light-90;
        }
    }
}
.label-text {
    padding: 2px;
    text-align: left;
    .title {
        display: inline-block;
        width: 49.2%;
    }
    .value {
        display: inline-block;
        width: 49.2%;
        margin-left: 0.3%;
        font-family: $bt-font-family;
        font-weight: bold;
    }
    &.megaform {
        .title {
            display: block;
            width: 100%;
            font-size: 0.9em;
            margin-bottom: 6px;
            color: $bt-body-font-color;
            font-family: $bt-font-family-bold;
        }
        .value {
            display: block;
            width: 100%;
            font-family: $bt-font-family;
        }
    }
}
/**  Radio and checkboxes custom **/
.radiocheckbox {
    position: relative;
    padding-left: 22px;
    padding-right: 5px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    input {
        position: absolute;
        opacity: 0;
        cursor: pointer;
    }
    .checkmark {
        position: absolute;
        top: 0;
        left: 0;
        height: 18px;
        width: 18px;
        background-color: $bt-white;
        border: 1px solid $bt-indigo;
        &::after {
            content: "";
            position: absolute;
            display: none;
            left: 5px;
            width: 3px;
            height: 8px;
            border: solid white;
            border-width: 0 3px 3px 0;
            -webkit-transform: rotate(45deg);
            -ms-transform: rotate(45deg);
            transform: rotate(45deg);
        }
    }
    .radio {
        position: absolute;
        top: 1px;
        left: 0;
        height: 16px;
        width: 16px;
        background-color: $bt-white;
        border: 1px solid $bt-indigo;
        border-radius: 50%;
        &::after {
            content: "";
            position: absolute;
            display: none;
            top: 4px;
            left: 4px;
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: white;
        }
    }
    &:hover {
        input ~ .checkmark {
            background-color: rgba($bt-indigo-light, 0.2);
        }
        input ~ .radio {
            background-color: rgba($bt-indigo-light, 0.2);
        }
    }
    input:checked ~ .checkmark {
        background-color: $bt-indigo;
    }
    input:checked:disabled ~ .checkmark {
        background-color: $bt-grey-dark-20;
    }
    input:checked ~ .radio {
        background-color: $bt-indigo;
    }
    input:checked:disabled ~ .radio {
        background-color: $bt-grey-dark-20;
    }
    input:disabled ~ .checkmark {
        background-color: $bt-grey-light-40;
        border-color: $bt-grey-light-40;
    }
    input:disabled ~ .radio {
        background-color: $bt-grey-light-40;
        border-color: $bt-grey-light-40;
    }
    input:checked ~ .checkmark:after {
        display: block;
    }
    input:checked ~ .radio:after {
        display: block;
    }
}

.radiocheckbox2 {
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    input {
        display: none;
        width: 0;
    }
    .checkmark, .radio {
        font-size: 18px;
        color: $bt-indigo;
        margin: 0 5px;
    }
    &.state-disabled {
        color: $bt-grey-light-40;
        .checkmark, .radio {
            color: $bt-grey-light-20;
        }
    }
}

/** Radio and Checkbox as Buttons **/
.buttonRadioCheckbox {
    padding: 1px;
    text-align: left;
    ul {
        list-style: none;
        li {
            display: inline-block;
            list-style-type: none;
            padding: 2px;
        }
    }
    input.butRC[type="checkbox"],
    input.butRC[type="radio"] {
        display: none;
    }

    input.butRC + label {
        padding: 5px 8px;
        border: 1px solid rgba(0, 0, 0, 0.3);
        border-bottom-width: 2px;
        background: $bt-grey-light-90;
        font-size: 1em;
        cursor: pointer;
        border-radius: 4px;
        color: $bt-black;
        display: inline-block;
    }

    input.butRC[type="checkbox"]:checked + label,
    input.butRC[type="radio"]:checked + label {
        border-color: $bt-green;
        background: $bt-green-light;
    }

    input.butRC[type="checkbox"]:disabled + label,
    input.butRC[type="radio"]:disabled + label {
        cursor: not-allowed;
        color: $bt-grey-dark-20;
        background: $bt-grey-light-60;
    }
    input.butRC[type="checkbox"]:checked:disabled + label,
    input.butRC[type="radio"]:checked:disabled + label {
        cursor: not-allowed;
        color: $bt-grey-dark-80;
        background: $bt-green-light;
    }

    input.butRC[type="checkbox"]:disabled:checked + label,
    input.butRC[type="radio"]:disabled:checked + label {
        color: $bt-grey-dark-80;
    }
}

/* Multiselect Combobox */
fieldset[disabled] {
	.multiselect {
		pointer-events: none;
	}
}
.selectize {
    position: relative;
    display: inline-block;
    width: 100%;
}
.multiselect__spinner {
	position: absolute;
	right: 1px;
	top: 1px;
	width: 48px;
	height: 35px;
	background: $bt-white;
	display: block;
	&:before {
		position: absolute;
		content: "";
		top: 50%;
		left: 50%;
		margin: -8px 0 0 -8px;
		width: 16px;
		height: 16px;
		border-radius: 100%;
		border-color: $bt-indigo transparent transparent;
		border-style: solid;
		border-width: 2px;
		box-shadow: 0 0 0 1px transparent;
		animation: spinning 2.4s cubic-bezier(0.41, 0.26, 0.2, 0.62);
		animation-iteration-count: infinite;
	}
	&:after {
		position: absolute;
		content: "";
		top: 50%;
		left: 50%;
		margin: -8px 0 0 -8px;
		width: 16px;
		height: 16px;
		border-radius: 100%;
		border-color: $bt-indigo transparent transparent;
		border-style: solid;
		border-width: 2px;
		box-shadow: 0 0 0 1px transparent;
		animation: spinning 2.4s cubic-bezier(0.51, 0.09, 0.21, 0.8);
		animation-iteration-count: infinite;
	}
}
.multiselect__loading-enter-active {
	transition: opacity 0.4s ease-in-out;
	opacity: 1;
}
.multiselect__loading-leave-active {
	transition: opacity 0.4s ease-in-out;
	opacity: 1;
	opacity: 0;
}
.multiselect__loading-enter {
	opacity: 0;
}
.multiselect {
	touch-action: manipulation;
	box-sizing: border-box;
	display: block;
	position: relative;
	width: 100%;
	text-align: left;
	color: $bt-black;
	* {
		box-sizing: border-box;
	}
	&:focus {
		outline: none;
    }
    input {
        border: none !important;
        background: $bt-white !important;
    }
}
.multiselect__input {
	touch-action: manipulation;
	position: relative;
	display: inline-block;
	min-height: 20px;
	line-height: 20px;
    border: none;
    border-radius: 6px;
	padding: 5px;
	width: 100%;
	transition: border 0.1s ease;
	box-sizing: border-box;
	vertical-align: top;
	&::placeholder {
		color: #35495e;
	}
	&:hover {
		border-color: #cfcfcf;
	}
	&:focus {
		border-color: #a8a8a8;
		outline: none;
	}
}
.multiselect__single {
	touch-action: manipulation;
	position: relative;
	display: inline-block;
	width: 80%;
	transition: border 0.1s ease;
	box-sizing: border-box;
    vertical-align: top;
    padding: 3px;
    margin: 0 2px;
	&:hover {
		border-color: #cfcfcf;
	}
	&:focus {
		border-color: #a8a8a8;
		outline: none;
	}
}
.multiselect--disabled {
	background: #ededed;
	pointer-events: none;
	opacity: 0.6;
	.multiselect__current {
		background: #ededed;
		color: #a6a6a6;
	}
	.multiselect__select {
		color: #a6a6a6;
    }
    .multiselect__tags {
        background: #f6f6f6;
    }
}
.multiselect--active {
	z-index: 50;
	&:not(.multiselect--above) {
		.multiselect__current {
			border-bottom-left-radius: 0;
			border-bottom-right-radius: 0;
		}
		.multiselect__input {
			border-bottom-left-radius: 0;
			border-bottom-right-radius: 0;
		}
		.multiselect__tags {
			border-bottom-left-radius: 0;
            border-bottom-right-radius: 0;
		}
	}
	.multiselect__select {
        transform: rotateZ(180deg);
        top:0;
	}
	.multiselect__placeholder {
		display: none;
	}
    .multiselect__tags {
        border-color: $bt-blue;
    }
}
.multiselect--above.multiselect--active {
	.multiselect__current {
		border-top-left-radius: 0;
		border-top-right-radius: 0;
	}
	.multiselect__input {
		border-top-left-radius: 0;
		border-top-right-radius: 0;
	}
	.multiselect__tags {
		border-top-left-radius: 0;
		border-top-right-radius: 0;
	}
}
.multiselect__tag {
	&~.multiselect__input {
		width: auto;
	}
	&~.multiselect__single {
		width: auto;
	}
	display: inline-block;
	padding: 3px 6px;
	border-radius: 5px;
	margin: 1px;
	color: $bt-white;
	background: #1b9dec;
	white-space: nowrap;
	overflow: hidden;
	max-width: 100%;
	text-overflow: ellipsis;
    font-size: 0.9em;
    &:focus {
		background: #1585ca;
	}
	&:hover {
		background: #1585ca;
	}
}
.multiselect__tags-wrap {
	display: inline;
}
.multiselect__tags {
	display: block;
	border-radius: 4px;
	border: 1px solid $bt-grey-dark-20;
    background: $bt-white !important;
    min-height: 30px;
    &.error {
        border-color: $bt-red-dark;
    }
}
.multiselect__tag-icon {
	cursor: pointer;
	margin-left: 7px;
	font-weight: 700;
    display:inline-block;
	transition: all 0.2s ease;
	border-radius: 5px;
    text-align: center;
    font-size: 0.9em;
}
.multiselect__current {
	line-height: 16px;
	min-height: 40px;
	box-sizing: border-box;
	display: block;
	overflow: hidden;
	padding: 8px 12px 0;
	padding-right: 30px;
	white-space: nowrap;
	margin: 0;
	text-decoration: none;
	border-radius: 5px;
	border: 1px solid #e8e8e8;
	cursor: pointer;
}
.multiselect__select {
	position: absolute;
	right: 1px;
	top: 5px;
	padding: 4px;
    transition: transform 0.2s ease;
    z-index: 20;
    color: $bt-grey-dark-20;
    font-size: 1.5em;
}
.multiselect__placeholder {
	color: #adadad;
	display: inline-block;
    padding: 5px;
    font-size: 0.9em;
    width: 100%;
}
.multiselect__content-wrapper {
	position: absolute;
	display: block;
	background: $bt-white !important;
	max-height: 240px;
	border: 1px solid #dadada;
	border-top: none;
	z-index: 50;
	-webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    width: 100%;
    ul {
        background: $bt-white !important;
    }
}
.multiselect__content {
	list-style: none;
	display: inline-block;
	vertical-align: top;
    width: 100%;
	&::webkit-scrollbar {
		display: none;
	}
}
.multiselect--above {
	.multiselect__content-wrapper {
		bottom: 100%;
		border-bottom: none;
		border-top: 1px solid #e8e8e8;
	}
}
.multiselect__element {
	display: block;
}
.multiselect__option {
	display: block;
	padding: 5px;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.9em;
	&:after {
		top: 0;
		right: 0;
		position: absolute;
		padding-right: 12px;
		padding-left: 20px;
    }
    .warnMsg {
        text-align: center;
        color: #fe5600;
        cursor: default;
        .icon {
            padding-right: 10px;
            font-size: 1.8em;
        }
    }
}
.multiselect__option--highlight {
	background: #B0CBE5;
}
.multiselect__option--selected {
	background: #f3f3f3;
	font-weight: bold;
}
.multiselect__option--selected.multiselect__option--highlight {
	background: #8FDFA2;
}
.multiselect__option--disabled {
	background: #ededed !important;
	color: #a6a6a6 !important;
	cursor: text;
	pointer-events: none;
}
.multiselect__option--group {
	background: rgb(145, 183, 218);
    color: $bt-black;
    text-align: center;
}
.multiselect__option--groupdisabled {
    background: #c5c5c5;
    color: $bt-black;
}
.multiselect__option--group.multiselect__option--highlight {
	background: #B0CBE5;
}
.multiselect__option--disabled.multiselect__option--highlight {
	background: #dddddd;
}
.multiselect__option--group-selected.multiselect__option--highlight {
	background: #8FDFA2;
}
.multiselect-enter-active {
	transition: all 0.15s ease;
}
.multiselect-leave-active {
	transition: all 0.15s ease;
	opacity: 0;
}
.multiselect-enter {
	opacity: 0;
}
.multiselect__strong {
	margin-bottom: 8px;
	line-height: 20px;
	display: inline-block;
	vertical-align: top;
}
*[dir="rtl"] {
	.multiselect {
		text-align: right;
	}
	.multiselect__select {
		right: auto;
		left: 1px;
	}
	.multiselect__content {
		text-align: right;
	}
	.multiselect__option {
		&:after {
			right: auto;
			left: 0;
		}
	}
	.multiselect__clear {
		right: auto;
		left: 12px;
	}
	.multiselect__spinner {
		right: auto;
		left: 1px;
	}
}
.autocomplete {
    .multiselect__spinner {
        width: 0 !important;
        height: 0 !important;
        top: 12px !important;
        right: 12px !important;
    }
}

/** Slidebar Component **/
.bt-slider-component {
    position: relative;
    box-sizing: border-box;
    user-select: none;
}
.bt-slider {
    position: relative;
    display: block;
    background-color: #d8d8d8;
    cursor: pointer;
    height: 8px;
    border-radius: 15px;
    &::after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        z-index: 2;
    }
}
.bt-slider-process {
    position: absolute;
    background-color: $bt-indigo;
    transition: all 0s;
    z-index: 1;
    width: 0;
    height: 100%;
    top: 0;
    left: 0;
    will-change: width;
    border-radius: 15px;
}
.bt-slider-tooltip-container {
    position: absolute;
    transition: all 0s;
    will-change: transform;
    cursor: pointer;
    z-index: 3;
    left: 0;
    top: -16px;
}
.bt-slider-dot {
    display: inline-block;
    position: absolute;
    width: 8px;
    height: 18px;
    background: $bt-indigo;
    border: 1px solid white;
    margin-top: -6px;
    margin-left: -5px;
    z-index: 9;
}
.bt-slider-tooltip-wrap {
    /* display: none; */
    position: absolute;
    z-index: 9;
    width: 100%;
    height: 100%;
    display: block !important;
}
.bt-slider-tooltip-top {
    top: -12px;
    left: 40%;
    transform: translate(-50%, -100%);
}
.bt-slider-tooltip {
    position: relative;
    font-size: 14px;
    white-space: nowrap;
    padding: 2px 5px;
    min-width: 20px;
    text-align: center;
    color: $bt-white;
    border-radius: 5px;
    border: 1px solid $bt-indigo;
    background-color: $bt-indigo;
    &::before {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 50%;
        width: 0;
        height: 0;
        border: 5px solid transparent;
        border-top-color: inherit;
        transform: translate(-50%, 0);
    }
}
.bt-slider-range {
    display: flex;
    padding: 5px 0;
    justify-content: space-between;
    .bt-slider-separate {
        position: relative;
        width: 2px;
        background-color: #9e9e9e;
        height: 5px;
        cursor: pointer;
    }
    .bt-slider-separate-text {
        text-align: center;
        position: absolute;
        white-space: nowrap;
        transform: translate(-50%, 0);
        top: 6px;
    }
}

/** Switch component **/
.switch {
    .tgl {
        display: none;
    }
    span.normal {
        display: inline;
        position: relative;
        top: -7px;
        left: 5px;
    }
    span.readonly {
        font-family: $bt-font-family;
        font-weight: bold;
        font-size: 0.95em;
    }
}
.tgl {
    box-sizing: border-box;
    &:after {
        box-sizing: border-box;
    }
    &:before {
        box-sizing: border-box;
    }
    & + .tgl-btn {
        box-sizing: border-box;
        outline: 0;
        display: inline-block;
        width: 50px;
        height: 25px;
        position: relative;
        cursor: pointer;
        user-select: none;
        padding: 2px;
        &:after {
            position: relative;
            display: block;
            content: "";
            width: 0.7em;
            height: 0.7em;
            top: 0.2em;
            left: 5%;
        }
        &:before {
            position: relative;
            display: block;
            content: "";
            width: 0.7em;
            height: 0.7em;
            top: 0.2em;
            display: none;
        }
    }
    &:checked {
        & + .tgl-btn {
            &:after {
                left: 80%;
            }
        }
    }
    &:disabled {
        & + .tgl-btn {
            &:after {
                background: $bt-grey-light-40;
            }
        }
    }
}
.tgl-flat {
    & + .tgl-btn {
        padding: 2px;
        transition: all 0.2s ease;
        background: #ddd;
        border: 2px solid #999;
        border-radius: 2em;
        &:after {
            transition: all 0.2s ease;
            background: $bt-white;
            content: "";
            border-radius: 1em;
        }
    }
    &.both {
        & + .tgl-btn {
            border: 2px solid $bt-blue-dark;
            background: $bt-blue-dark;
            &:after {
                left: 5%;
            }
        }
    }
    &:checked {
        & + .tgl-btn {
            border: 2px solid $bt-green-dark;
            background: $bt-green-dark;
            &:after {
                left: 75%;
            }
        }
    }
}

/* Form Section */
section {
    text-align: left;
    padding: 5px;
    margin: 5px auto;
    box-sizing: border-box;
    border-radius: 4px;
    border: 1px solid #ddd;
    .heading {
        h4, h5, h6 {
            color: $bt-indigo;
            display: inline-block;
            padding-bottom: 5px;
            font-family: $bt-font-family-bold;
        }
        &.closable {
            cursor: pointer;
        }
        .closeIcon {
            float: right;
            font-size: 1.2em;
            margin-left: 5px;
        }
        .helpIcon {
            float: right;
            font-size: 1.2em;
        }
    }
    .section-body {
        padding: 0 2px;
    }
    &.focused {
        background: #f3f3ff;
        .section-body {
            border: none;
        }
    }
    &.hidden {
        display: none;
    }
    &.dialog {
        .heading {
            h4, h5, h6{
                color: $bt-grey-dark-60;
            }
        }
    }
    &.inner {
        padding: 0 10px;
        border: none;
        .heading {
            h4, h5, h6{
                color: $bt-grey-dark-60;
            }
            &.closed {
                border-bottom: 1px solid #ddd;
            }
        }
        .section-body {
            margin-top: 5px;
            padding: 2px 4px;
            border: 1px solid #ddd;
            border-radius: 4px;
        }
    }
}
