@import "_Mixins.scss";
@import "_Sizes.scss";

//General
.p-none {
    padding: 0;
}

.p-top-none {
    padding-top: 0;
}

a {
    font-weight: 500;
    color: $link-text-color;
    text-decoration: $link-text-decoration;

    &:hover,
    &:active {
        color: darken($link-text-color, 6%);
    }
}

.nowrap-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flex-pull-right {
    margin-left: auto;
}

.width100p {
    min-width: 100%;
}

.m-t-3 {
    margin-top: 3px;
}

.m-t-35 {
    margin-top: 35px;
}

.line-height-18 {
    line-height: 18px;
}

.top-25p {
    top: 25%;
}

.height-44 {
    height: 44px;
}

.doc-ackey-container {
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 5px;
    background-color: $input-disabled-background-color;
    border: 1px solid $divider-color;
    border-radius: 4px;
}

//text positioning sizes
@media (max-width: $max-screen-xs) {
    .text-right-xs {
        text-align: right !important;
    }

    .text-left-xs {
        text-align: left !important;
    }

    .text-center-xs {
        text-align: center !important;
    }

    .padding-left-none-xs {
        padding-left: 0;
    }

    .padding-none-xs {
        padding: 0;
    }

    .margin-none-xs {
        margin: 0;
    }
}

@media (min-width: $min-screen-sm) and (max-width: $max-screen-sm) {
    .text-right-sm {
        text-align: right !important;
    }

    .text-left-sm {
        text-align: left !important;
    }

    .text-center-sm {
        text-align: center !important;
    }

    .padding-left-none-sm {
        padding-left: 0;
    }

    .padding-none-sm {
        padding: 0;
    }

    .margin-none-sm {
        margin: 0;
    }
}

@media (min-width: $min-screen-md) and (max-width: $max-screen-md) {
    .text-right-md {
        text-align: right !important;
    }

    .text-left-md {
        text-align: left !important;
    }

    .text-center-md {
        text-align: center !important;
    }

    .padding-left-none-md {
        padding-left: 0;
    }

    .padding-none-md {
        padding: 0;
    }

    .margin-none-md {
        margin: 0;
    }
}

@media (min-width: $min-screen-lg) {
    .text-right-lg {
        text-align: right !important;
    }

    .text-left-lg {
        text-align: left !important;
    }

    .text-center-lg {
        text-align: center !important;
    }

    .padding-left-none-lg {
        padding-left: 0;
    }

    .padding-none-lg {
        padding: 0;
    }

    .margin-none-lg {
        margin: 0;
    }
}

.bootstrap-select .selectpicker + button {
    border: 0;
}

input,
select,
.form-control,
.select2-selection {
    border: 0;
    border-bottom: 1px solid $divider-color;
    color: $main-text-color;
    border-radius: 0;
    background-color: $input-background-color;

    &:focus {
        border-color: $divider-color !important;
        border-bottom: 1px solid $accent-color !important;
        outline: none !important;
    }

    &:disabled,
    &[readonly] {
        background-color: $input-disabled-background-color;
    }

    &.container-selected {
        background-color: $custom-select-selected-color;
        color: $custom-select-selected-font-color;
    }
}

.connectionsTabContainer {
    .form-group {
        margin-bottom: 0;
    }
}

textarea.form-control {
    border: 1px solid $divider-color;
}

.input-like-table-cell {
    border: 1px solid $divider-color;
    height: 44px;
}

.form-control.auto-width {
    width: auto;
    display: inline-block;
}

select.form-control {
    padding-left: 12px;
}

select:disabled {
    -webkit-appearance: none;
    -moz-appearance: none;
    text-indent: 1px;
    text-overflow: '';
}

select::-ms-expand {
    display: none;
}

.has-error {

    input,
    select,
    .selectpicker + button,
    .form-control {
        border-bottom: 1px solid $danger-color;
        box-shadow: none;
    }

    label,
    .field-validation-error {
        color: $danger-color;
    }
}

.table-input-error {
    background-image: $exclamation-icon;
    padding-right: 20px !important;
    background-size: .8em;
    background-position: calc(100% - 1em) center;
    background-repeat: no-repeat;
    background-repeat: no-repeat;
}

.input-group {
    .input-group-addon {
        border: 0;
        border-bottom: 1px solid $divider-color;
        padding-left: 3px;
        padding-right: 3px;
        color: rgba($main-text-color, 0.5);
        background-color: $input-background-color;
        margin-top: 18px;
        margin-bottom: 18px;

        &.disabled {
            background-color: $input-disabled-background-color;
        }

        &.input-addon-td {
            border-top: 1px solid $divider-color;
            background-color: $input-disabled-background-color;
        }
    }

    input {
        padding-left: 3px;
        padding-right: 3px;
    }
}

input.highlighted-input {
    background-color: $accent-color;

    &:disabled {
        background-color: lighten($accent-color, 3);
    }
}

.small-input {
    max-width: 80px;
}

.input-transparent {
    background-color: transparent;
}

.addable-icon {
    display: inline-block;

    button.btn-primary.btn-outline[disabled] {
        border: 1px solid $divider-color;
        border-left: none;
    }

    a,
    i {
        color: $accent-color;
        font-size: 14px;
    }
}

.addable-button {
    display: inline-block;

    .createNewButton {
        color: $accent-color;
        background-color: $input-background-color;
        padding: 0px;
        border: none;

        &:disabled {
            background-color: $input-disabled-background-color;
        }
    }
}

.addable-input {
    width: calc(100% - 18px);
    display: inline-block;
}

.addable-input-btn {
    width: calc(100% - 22px);
    display: inline-block;
}

.addable-input-btn-connection {
    width: calc(100% - 42px);
    display: inline-block;
    padding-top: 3px;
}

.badge {
    background-color: $badge-color;
    color: rgba($main-text-color, 0.8);

    &.badge-primary {
        background-color: $accent-color;
        color: $light-color;
    }

    &.badge-danger {
        background-color: $danger-color;
        color: $light-color;
    }
}

.overflow-x-auto {
    overflow-x: auto;
}

.delete-modal-title-margin {
    margin-top: 32px;
}

//Checkbox
input[type=checkbox].form-checkbox {
    margin-top: 10px;
}

//Radio button
.form-group label > span {
    font-weight: normal;
}

.form-group label.label-group {
    margin: 0;
}

//Switchery
.js-switch {
    & + .switchery {
        background-color: $switchery-back-disabled-color !important;
        box-shadow: none !important;
        border-radius: 0;
        border: 1px solid $switchery-face-disabled-color !important;

        small {
            border-radius: 0;
            box-shadow: none !important;
            background-color: $switchery-face-disabled-color;
            height: 16px;
            width: 16px;
            margin: 2px;
        }
    }

    &:checked + .switchery {
        background-color: $accent-color !important;
        box-shadow: $accent-color 0px 0px 0px 11px inset !important;
        border-color: $accent-color !important;

        small {
            background-color: $switchery-face-color;
            left: 13px !important;
        }
    }
}

//Search
.search-input {
    background-image: $search-icon;
    padding-right: 20px !important;
    background-size: .8em;
    background-position: calc(100% - 6px) center;
    background-repeat: no-repeat;
}

.select-search-input {
    background-image: $search-icon;
    padding-left: 20px !important;
    background-size: 1em;
    background-position: 6px center;
    background-repeat: no-repeat;
}

.search-wrapper {
    display: inline;
    position: relative;
    overflow: hidden;
    white-space: nowrap;

    input[type='text'] {
        min-width: 250px;
        display: inline;
    }

    i {
        @include vertically-center();
        right: 15px;
        font-size: 15px;
    }
}

.buttons-tabbed {
    .bootstrap-select {
        border-left: 1px solid $divider-color;
        border-bottom: 0;
    }
}

//Ibox
.ibox-title {
    padding: 15px 20px 20px 20px;

    h5 {
        margin-top: 2px;
    }

    &:empty {
        padding: 0;
        min-height: 15px;
    }

    .btn {
        margin-top: -8px;
    }

    .btn:not(.btn-transparent) {
        margin-left: 5px;
    }

    &.ibox-title-tab {
        background-color: transparent;
        min-height: 0px;
        border: none;
    }

    &.ibox-title-borderless {
        border: 0;
    }
}

.ibox-title-flat {
    padding-bottom: 7px;

    .btn {
        margin: 0px;
    }
}

form .ibox-title {
    border-top: 1px solid $divider-color;
}

.ibox:not(.search-box) {
    .ibox-title + .ibox-content {
        border-top: 0;
        padding-top: 5px;
    }
}

.ibox-content .tab-pane.active {
    background-color: $content-background-color;
}

.p-l-0 {
    padding-left: 0;
}

.p-l-10 {
    padding-left: 10px;
}

.p-r-0 {
    padding-right: 0;
}

.p-r-10 {
    padding-right: 10px;
}

.p-r-5 {
    padding-right: 5px;
}

.p-x-0 {
    padding-left: 0;
    padding-right: 0;
}

.p-l-md {
    padding-left: 40px;
}

.p-l-lg {
    padding-left: 50px;
}

.p-l-25 {
    padding-left: 25px;
}


/* -1x would be 2px, -2x would be 4px, -4x would be 16px etc.. */
.p-3x {
    padding: 8px;
}

.p-t-3x {
    padding-top: 8px;
}

.p-tb-3x {
    padding-top: 8px;
    padding-bottom: 8px;
}

.p-r-3x {
    padding-right: 8px;
}

.p-t-4x {
    padding-top: 16px;
}

.p-lr-4x {
    padding-left: 16px;
    padding-right: 16px;
}

/* TODO: These clases should be imported from bootstrap, like pl-2, mt-4 etc. */
.p-l-sm {
    padding-left: 20px;
}

.p-r-sm {
    padding-right: 20px;
}

.p-r-md {
    padding-right: 40px;
}

.p-b-xl {
    padding-bottom: 120px;
}

.p-l-5 {
    padding-left: 5px;
}

.p-b-5 {
    padding-bottom: 5px;
}

.p-b-10 {
    padding-bottom: 10px;
}

.p-t-5 {
    padding-top: 5px;
}

.p-t-10 {
    padding-top: 10px;
}

.p-t-20 {
    padding-top: 20px;
}

.column-full-height-border-right {
    border-right: 1px solid $divider-color;
}

//Wells and alerts
.well {
    background-color: $disabled-header-field;
}

.flat.alert,
.flat.well {
    border: none;
    border-radius: 0;
    box-shadow: none;
    -webkit-box-shadow: none;
    margin: 0;

    .btn {
        margin-right: -15px;
        margin-top: -8px;
    }
}

.flat.alert .alert-title {
    font-weight: bold;
    margin-bottom: 0;
}

.flat.alert-sm {
    padding: 8px 15px;
    color: $main-text-color;
    font-weight: 600;
}

.alert-warning {
    background-color: desaturate(lighten($success-color, 53), 48%);
    color: darken($accent-color, 14);
    border-color: darken($accent-color, 4);
}

.alert-success {
    background-color: desaturate(lighten($success-color, 53), 48%);
    color: darken($success-color, 14);
    border-color: darken($success-color, 4);
}

.alert-info {
    background-color: desaturate(lighten($success-color, 53), 48%);
    color: darken($success-color, 14);
    border-color: darken($success-color, 4);
}

//Stacked content (company display)
.stacked-content {
    .pull-left {
        max-width: 50%;

        &:not(:last-child) {
            padding-right: 15px;
        }

        &:first-child {
            padding-left: 15px;
        }
    }

    @media (min-width: 1200px) {
        & > div:not(:last-child) {
            border-right: 1px solid $divider-color;
            min-height: 300px;
        }
    }

    .display-group {
        margin-bottom: 10px;
        @include overflow-ellipsis();
    }
}

//Texts
.text-default {
    color: $login-color;
}

.text-success {
    color: $success-color;
}

.text-danger {
    color: $danger-color;
}

.text-primary {
    color: $accent-color;
}

.text-single-line {
    @include overflow-ellipsis();
    display: block;
    text-align: left;
}

.message-text {
    white-space: normal;
}

.text-md {
    font-size: 17px;
}

.text-line-through {
    text-decoration: line-through;
    opacity: 0.5;
}

.table-text-ghost {
    color: #c5c5c5 !important;
    font-style: italic;
    background: #f3f2f2;
}

td.table-text-ghost {
    font-size: 11px;
}

th.table-text-ghost span {
    color: #c5c5c5 !important;
}

//Forms
.form-sm .form-group {
    margin-bottom: 5px;
}

.form-md .form-group {
    margin-bottom: 8px;
}

.form-md .form-group.m-b-none {
    margin-bottom: 0px;
}

.form-right {
    .form-group label.control-label {
        text-align: right;
        font-weight: 600;

        &:last-child {
            text-align: left;
        }
    }
}

.form-sm .form-group,
.form-md .form-group {
    .control-label {
        text-align: left;
        @include overflow-ellipsis();
        padding-right: 0;
    }

    &.form-group-horizontal > div:not(:last-child) {
        @media (max-width: 1199px) {
            margin-bottom: 5px;
        }
    }
}

.form-group > .row label {
    @include overflow-ellipsis();
}

.form-center-text {
    height: 34px;
    line-height: 34px;
    display: inline-block;
    width: 100%;
}

.form-horizontal.form-md .control-label {
    margin-bottom: 0;

    &.text-left {
        text-align: left;
    }
}

.form-horizontal .control-label-left {
    text-align: left;
    max-width: 250px;
}

.input-horizontal-small-label {
    display: inline-block;
    width: calc(100% - 40px);
}

.input-horizontal-medium-label {
    display: inline-block;
    width: calc(100% - 100px);
}

.padding-left-none {
    padding-left: 0;
}

.padding-right-none {
    padding-right: 0;
}

.padding-bottom-none {
    padding-bottom: 0;
}

.selected-input-item {
    border: 1px solid $success-color;
}

.error-input-item {
    border: 1px solid $danger-color;
}

.document-table table > tbody > tr > td input.datatable-error-input {
    border-bottom: 1px solid $danger-color;
}

.form-section-title {
    font-weight: normal;
    font-size: 20px;
}

.form-edit-element {
    display: none;
    position: relative;
}

.devided-input-50 {
    width: calc(50% - 2px);
    display: inline-block;
}

.prefix-input-small {
    min-width: 67px;
    max-width: 70px;
}

.modal-dropdown-small {
    min-width: 68px;
}

//Icons
.loader-icon {
    display: block;
    color: $main-text-color;
    font-size: 17px;
    position: absolute;
}

.floating-icon {
    position: absolute;
    top: 50%;
    right: 0;
    z-index: 10;

    a,
    i {
        color: $accent-color;
    }
}

.upload-loader-icon {
    position: absolute;
    top: 40%;
    left: 49%;
    z-index: 99;
}

.serialNo-icon {
    background-image: $serialNo-icon;
    padding-right: 18px;
    background-position: calc(100% - 1px) center;
    background-repeat: no-repeat;
}

//Labels
.label-icon > img {
    width: 17px;
}

.label {
    margin: 0;
    padding: 8px 0;
    font-size: smaller;
    min-width: 100px !important;
    display: inline-block !important;
}

.label-primary {
    background-color: $label-primary-background-color;
    color: $label-primary-font-color;
}

.label-default {
    background-color: $label-default-background-color;
    color: $label-default-font-color;
}

.label-success {
    background-color: $label-success-background-color;
    color: $label-success-font-color;
}

.label-danger {
    background-color: $label-danger-background-color;
    color: $label-danger-font-color;
}

.search-icon {
    @include vertically-center();
    right: 25px;
    color: $main-text-color;
}

.print-options-container {
    .print-option-label {
        border-bottom: 1px solid $divider-color;
        color: $main-text-color;
        line-height: 30px;

        &.no-border {
            margin-left: 15px;
            border: 0;
        }

        .classifText {
            display: block;
            overflow: hidden;
            inline-size: max-content;
        }
    }

    .preview-print-option {
        padding-left: 20px;
        border-bottom: 1px solid $divider-color;
        position: relative;

        &.no-border {
            border: 0;
        }

        a {
            color: $main-text-color;
            line-height: 30px;
            padding-left: 25px;
            -webkit-box-decoration-break: clone;
            box-decoration-break: clone;
            display: block;
            overflow: hidden;
            inline-size: max-content;
        }

        &.custom-option-selected {
            background-color: $custom-select-selected-color;
            color: $custom-select-selected-font-color;
        }

        .print-option-border {
            border-right: 2px dotted $divider-color;
            width: 7px;
            height: 100%;
            position: absolute;
        }

        .print-option-border-horizontal {
            border-bottom: 2px dotted $divider-color;
            width: 15px;
            height: calc(50% + 1px);
            position: absolute;
            margin-left: 7px;
        }

        &.p-l-md {
            padding-left: 40px;
        }

        &.p-l-lg {
            padding-left: 50px;
        }

        &.p-l-n {
            padding-left: 0;
        }
    }

    .print-option-group {
        & > div.print-option-group {
            /*padding-left: 20px;*/

            & > div.print-option-label:first-child {
                .print-option-border-horizontal {
                    border-bottom: 2px dotted $divider-color;
                    border-left: 2px dotted $divider-color;
                    width: 15px;
                    height: calc(50% + 1px);
                    position: absolute;
                    margin-left: -15px;
                }
            }
        }

        & > div.preview-print-option:last-child {
            .print-option-border {
                border: none;
            }

            .print-option-border-horizontal {
                border-left: 2px dotted $divider-color;
                margin-left: 5px;
            }
        }

        .print-option-label {
            cursor: pointer;
            position: relative;

            .print-option-border {
                border-right: 2px dotted $divider-color;
                width: 7px;
                height: 30%;
                position: absolute;
                bottom: 0;
            }

            &.custom-option-selected {
                background-color: $custom-select-selected-color;
                color: $custom-select-selected-font-color;
            }
        }

        &.custom-option-selected {
            background-color: $custom-select-selected-color;
            color: $custom-select-selected-font-color;
        }

        &.print-group-closed {
            border-bottom: none;

            .preview-print-option, & > div.print-option-group {
                display: none;
            }

            .print-option-label {
                & .caret {
                    transform: rotate(-90deg);
                }

                .print-option-border {
                    border: none;
                }
            }

            .print-option-border-subcategory {
                border-bottom: 2px dotted $divider-color;
                width: 15px;
                height: 48px;
                position: absolute;
                margin-left: -15px;
            }

            .print-option-border-horizontal-subcategory {
                border-right: 2px dotted $divider-color;
                width: 15px;
                height: 32px;
                position: absolute;
                margin-left: -28px;
                margin-top: 15px;
            }
        }

        .print-option-category {
            margin-left: 15px;
            line-height: 30px;
            border-bottom: 1px solid $divider-color;

            .print-option-border-horizontal-category:not(:first-child) {
                border: none;
            }

            .preview-print-option {
                padding-left: 0px;
            }

            .preview-print-option:last-child, .print-option-group:last-child {
                border-bottom: none;

                .print-option-sub-category, .print-option-border-subcategory {
                    border-bottom: none;
                }

                .print-option-border {
                    border: none;
                }

                .print-option-border-horizontal {
                    border-left: 2px dotted $divider-color;
                    margin-left: 5px;
                }

                .print-option-border-horizontal-subcategory {
                    border: none;
                }
            }

            .print-option-group {
                .print-option-sub-category:first-child {
                    border-top: 1px solid $divider-color;
                    border-bottom: none;
                }
            }

            .print-option-sub-category {
                line-height: 30px;
                border-bottom: 1px solid $divider-color;
                border-left: 2px dotted $divider-color;
                margin-left: 5px;
                padding-left: 15px;

                & > div.preview-print-option:last-child {
                    border-bottom: none;

                    .print-option-border {
                        border: none;
                    }

                    .print-option-border-horizontal {
                        border-left: 2px dotted $divider-color;
                        margin-left: 5px;
                    }
                }
            }
        }
    }

    .print-option-main-group {
        &.print-group-closed {
            .print-option-group {
                display: none;
            }

            .print-option-label {
                & .caret {
                    transform: rotate(-90deg);
                }

                .print-option-border, .print-option-border-main {
                    border: none;
                }
            }
        }

        .print-option-group-category {
            border-left: 2px dotted $divider-color;
            margin-left: 10px;

            &:last-child {
                border: none;

                .category-tree-left-border {
                    border-left: 2px dotted #ddd;
                }
            }

            &.print-group-closed, .print-sub-group-closed {
                .print-option-group {
                    display: none;
                }

                .print-option-label {
                    & .caret {
                        transform: rotate(-90deg);
                    }

                    .print-option-border, .print-option-border-main {
                        border: none;
                    }
                }
            }
        }

        .print-option-border-main {
            border-bottom: 2px dotted $divider-color;
            width: 15px;
            height: 28px;
            position: absolute;
            margin-left: 5px;
            margin-top: 20px;
            border-left: 2px dotted $divider-color;
        }

        .category-tree-left-border {
            width: 15px;
            height: 17px;
            position: absolute;
            border-bottom: 2px dotted $divider-color;
        }

        .sub-category-tree-left-border {
            width: 17px;
            height: 17px;
            position: absolute;
            border-bottom: 2px dotted $divider-color;
            margin-left: -15px;
        }
    }
}

.even-row {
    background: $table-header-background-color;
}

.transparent-icon {
    color: transparent;
}

.clickable-icon {
    cursor: pointer;
}

.icon-wrapper {
    position: relative;
    float: left;
}

.icon-badge {
    background: $warning-color;
    color: $icon-color;
    width: auto;
    height: auto;
    margin: 0;
    border-radius: 50%;
    position: absolute;
    top: -7px;
    right: -10px;
    padding: 1px 3px;
    font-size: 11px !important;
    @include text-unselectable();

    &:empty {
        display: none;
    }
    &.icon-badge-text-s{
        font-size: 12px !important;
    }
}

.filter-icon {
    max-width: 12px;
    max-height: 12px;
    padding-top: 5px;
    margin-left: 2px;
    opacity: 0.3;
    content: $filter-icon;
    cursor: pointer;
}

.eInvoice-icon {
    vertical-align: middle;

    &:before {
        content: $eInvoice-icon;
        cursor: pointer;
    }
}

.input-detail-indicator {
    position: relative;

    .arrow-ne {
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-bottom: 5px solid black;
        transform: rotate(45deg);
        right: -2px;
        top: 0;
        position: absolute;
    }
}

.icon-absolute-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.certificate-icon {
    background-image: $certificate-icon;
    background-repeat: no-repeat;
    background-position: 50%;

    & > img {
        visibility: hidden;
    }
}

.certificate-icon-locked {
    background-image: $certificate-icon-locked;
    background-repeat: no-repeat;
    background-position: 50%;

    & > img {
        visibility: hidden;
    }
}

.label-level {
    padding: 0;
    padding-top: 6px;
}

//Select2
.select2-container {
    width: auto !important;
}

//Datepicker
.datepicker {
    padding: 6px 12px;
    color: $main-text-color;

    .day,
    .month,
    .year {
        &:hover {
            background-color: $btn-disabled-color;
        }

        &.active,
        &.active:hover {
            background-color: $accent-color;
        }
    }

    &.datepicker-dropdown {
        z-index: 2051 !important;
    }
}

.datepicker-small {
    max-width: 130px;

    & .control-label {
        text-align: left;
    }
}

//Modals
.modal-sm {
    width: 40%;
}

.modal-50 {
    width: 50%;

    @media (max-width: $max-screen-md) {
        width: 70%;
    }

    @media (max-width: $max-screen-sm) {
        width: 90%;
    }
}

.modal-z-index-3000 {
    z-index: 3000 !important;
}

.modal-md {
    width: 60%;
}

.modal-xl {
    width: 70%;
}

.modal-xxl {
    width: 82%;
}

.modal-full {
    width: 90%;
}

.modal-max-1250 {
    max-width: 1250px;
}

.modal-body-scrollable {
    overflow-y: auto;
    max-height: calc(100vh - 250px)
}

.modal-100 {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
}

.min-height-100 {
    min-height: 100vh !important;
}

.modal-stock-recalc {
    .project-list {
        min-height: 250px;
    }

    .dataTables_wrapper {
        min-height: unset;
    }
}

.modal-partial-cancel {
    width: 912px;

    .project-list {
        min-height: 250px;
        max-height: 250px;
    }

    .dataTables_wrapper {
        min-height: unset;
    }
}

.modal-connect-documents {
    .project-list {
        min-height: 300px;
        max-height: 300px;
    }

    .dataTables_wrapper {
        min-height: unset;
    }
}

.modal-adv-pay-connect {
    .project-list {
        min-height: 300px;
        max-height: 300px;
    }

    .dataTables_wrapper {
        min-height: unset;
    }
}

.modal-ident-serial-no-issue {
    .dataTables_wrapper {
        min-height: unset;
    }
}

@media (max-width: $max-screen-sm) {

    .modal-xl,
    .modal-xxl,
    .modal-full {
        width: 99%;
    }

    .inmodal .modal-dialog {
        margin-top: 50px;
    }
}

@media (max-width: $max-screen-xs) {
    .inmodal .modal-dialog {
        margin: 0;
        margin-top: 50px;
    }
}


.inmodal .modal-header {
    padding: 20px 15px;

    &.padding-bottom-none {
        padding-bottom: 0;
    }
}

.inmodal .modal-body {
    background-color: white;
}

.model-infinite-body {
    max-height: 70vh;
    overflow: auto;
    padding: 0;
    border: 1px solid $divider-color;
    margin: 0px 30px 30px 30px;

    &.ajpes-search-container {
        max-height: 85vh;
    }
}

.model-infinite-body-title {
    margin: 20px 30px 0px 30px;
    padding: 15px 0;
}

.model-simple-title {
    font-size: 16px;
    font-weight: bold;
}

.modal {
    .close {
        color: $main-text-color;
    }

    .modal-content,
    .modal-body {
        background-color: $content-background-color;
    }

    .modal-header {
        border-bottom: 1px solid $divider-color;
    }

    .modal-footer {
        border-top: 1px solid $divider-color;
    }
}

//Selectpicker - multi select
.bootstrap-select,
.bootstrap-select.open {
    .selectpicker {

        & + .dropdown-toggle.btn-default:hover,
        & + btn-default:hover,
        & + .btn-default:active,
        & + .btn-default:active:hover,
        & + .btn-default,
        & + .btn-default:hover,
        & + .btn-default:focus,
        & + .dropdown-toggle.btn-default {
            //border: 1px solid #e5e6e7;
            background-color: $input-background-color;
            color: $main-text-color;

            & + .dropdown-menu.open {
                border-radius: 0;
                border: 1px solid $custom-select-border-color;

                .bs-actionsbox {
                    padding: 4px;

                    .btn-group button {
                        display: none;

                        &:first-child {
                            text-align: left;
                            padding: 0;
                            display: block;
                            background-color: transparent;
                            color: gray;
                            border: 0;
                        }
                    }
                }

                ul > li {
                    &.selected > a {
                        background-color: $custom-select-selected-color;
                        color: $custom-select-selected-font-color;
                    }

                    & > a {
                        margin: 0;
                        padding: 2px 15px 2px 5px;
                        line-height: 18.5px;

                        &:hover {
                            background-color: $custom-select-hover-color;
                            color: $custom-select-hover-font-color;
                        }
                    }
                }
            }
        }
    }
}

//Modal
.vertical-alignment-helper {
    display: table;
    height: 100%;
    width: 100%;
}

.modal-dialog-centered {
    display: table-cell;
    vertical-align: middle;
}

.modal-content {
    width: inherit;
    height: inherit;
    margin: 0 auto;
}

.modal-clean {
    .modal-header {
        .modal-title {
            font-weight: 600;
            text-align: center;
            margin-top: 15px;
            margin-bottom: 15px;
            display: inline-block;
            width: calc(100% - 20px);
            font-size: 24px;
        }

        .modal-title + button {
            display: inline-block;
            width: 20px;
        }
    }

    .modal-body {
        .modal-description {
            margin-bottom: 30px;
            margin-top: 5px;
            font-weight: 600;
        }

        .modal-form {
            width: 80%;
            margin: auto;

            .form-group {
                margin-bottom: 10px;
            }
        }

        .form-submit {
            width: 50%;
            margin: auto;
            margin-top: 30px;
            margin-bottom: 15px;
            padding: 8px;
        }

        .form-ghost-button {
            text-align: center;
            margin-bottom: 15px;
        }
    }
}

.modal-scroller {
    max-height: calc(100vh - 1px);
    overflow-y: auto;
}

//Validation
.form-group .validation-summary-errors {
    ul {
        padding-inline-start: 0 !important;
    }
}

//Watermark
.document-watermark-wrapper {
    overflow: hidden;

    .document-watermark {
        position: absolute;
        width: 100%;
        font-size: 7vw;
        color: rgba(0, 0, 0, 0.5);
        text-align: center;
        top: 400px;
        transform: rotate(-40deg);
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        text-transform: uppercase;
    }
}

//Pdf viewer
#preview-wrapper {
    background-color: $content-background-color;
    min-height: 300px;

    .pdf-viewer {
        width: 100%;
        height: calc(100vh - 260px);
        min-height: 300px;
        position: relative;

        & > p {
            display: block;
            height: calc(100vh - 260px);
            background-color: $content-background-color;
        }
    }
}

.attachments-media-viewer-container {
    border-top: 1px solid $divider-color;
    z-index: 1;
    width: 100%;
    height: 100%;
    min-height: 170px;
    background-color: $content-background-color;

    #preview-wrapper .pdf-viewer {
        height: calc(100vh);
    }
}

//Form controls
.form-control.form-control-medium {
    width: 160px;
}

//Dropdown
.dropdown .dropdown-backdrop {
    display: none;
}

.dropdown-submenu {
    position: relative;

    .dropdown-menu-left {
        transform: translate(-100%, 0);
        top: 0px;
        right: auto;
    }

    .dropdown-menu-right {
        right: -100%;
        top: 0px;
        left: auto;
    }

    .dropdown-menu {
        max-height: 45vh;
        overflow: auto;

        &.dropdown-menu-full {
            max-height: unset;
            overflow: visible;
        }
    }
}

.dropdown-menu {
    background-color: $input-background-color;

    li {
        color: $main-text-color;

        .dropdown-menu-icon {
            width: 100%;
            text-align: right;

            span:first-child {
                float: left;
            }
        }

        &.divider {
            background-color: $divider-color;
        }

        &:hover,
        &:active,
        &:focus {
            background-color: $table-hover-row-background-color;
            color: $main-text-color;
        }

        & > a {
            text-decoration: none;
            color: $main-text-color;

            &:hover,
            &:active,
            &:focus {
                background-color: $table-hover-row-background-color;
                color: $main-text-color;
            }
        }

        & > a > img {
            max-width: 28px;
            margin-right: 5px;

            & + span {
                vertical-align: middle;
            }

            &.country-flag {
                max-width: 24px;
            }
        }

        .print-link {
            padding-left: 10px;
            padding-right: 5px;
            display: inline-block;
            width: calc(100% - 25px);
        }

        .preview-icon {
            padding-left: 0px;
            padding-right: 5px;
            visibility: hidden;

            i {
                color: $accent-color;
            }
        }

        &.print-option:hover {
            .preview-icon {
                visibility: visible;
            }
        }
    }

    .divider {
        margin: 0;
    }
}

.caret-right {
    border-bottom: 4px solid transparent;
    border-top: 4px solid transparent;
    border-left: 4px solid;
}

.selectpicker-container {
    .dropdown-toggle .caret {
        right: 0px;
    }
}

.filter-option-inner-inner {
    text-overflow: ellipsis;
    margin-right: 5px;
}

//Other
.overflow-parent {
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-overflow {
    overflow: unset !important;
    text-overflow: unset !important;
    white-space: unset !important;
}

.advance-payment-modal-footer {
    label.value-label {
        font-weight: unset;
    }

    input {
        max-width: 100px;
    }

    .btn {
        margin-top: -4px;
    }
}

@media (max-width: 991px) {
    .row-md {
        margin: 0;
    }
}

.img-placeholder {
    min-height: 100px;
    background-color: whitesmoke;
}

.clickable-input {
    cursor: pointer !important;
    font-weight: normal;
    border-bottom: 1px solid $divider-color;
    border-radius: 0;
    color: $main-text-color;
    background-color: $input-background-color;
}

.obligatory-input {
    border-left: 3px solid $accent-color;
}

.sk-spinner-three-bounce div {
    background-color: $accent-color;
}

.attachments-grid {
    display: grid;

    .attachment-item {
        margin-left: 15px;
        margin-top: 5px;
        color: $main-text-color;
        cursor: pointer;

        i {
            width: 13px;
            margin-right: 6px;
        }

        &.attachment-item-new {
            color: $success-color;
        }
    }
}

.packaging-weight-unit {
    position: absolute;
    top: 8px;
    right: -5px;
}

.note-text-bg {
    background-color: $menu-color;
    color: $light-color;
    font-weight: 500;
    padding: 5px;
    border: 0;
}

// Collabsible
.collapsible {
    color: white;
    cursor: pointer;
    border: none;
    text-align: left;
    outline: none;
}

.collabsible-content {
    display: none;
}

.mb-8 {
    margin-bottom: 8px;
}

@media (min-width: 992px) {
    .col-md-no-spacing {
        padding-left: 0px;
        padding-right: 0px;
    }
}

//Browser message
.browser-message {
    display: none;
    @include center-screen();
    height: 100%;
    width: 100%;
    background-color: rgba(white, 0.9);
    -webkit-box-shadow: 3px 3px 20px -8px rgba(0, 0, 0, 0.55);
    -moz-box-shadow: 3px 3px 20px -8px rgba(0, 0, 0, 0.55);
    box-shadow: 3px 3px 20px -8px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    z-index: 100;
    text-align: center;

    a {
        text-decoration: underline;
    }

    .browser-message-content {
        @include center-screen();
        min-width: 300px;
        width: 25%;
        font-size: 15px;
        font-weight: 500;
    }

    .browser-message-icon {
        width: 10vw;
        min-width: 85px;
        max-width: 180px;
        margin-bottom: 25px;
    }

    .browser-message-logo {
        bottom: 50px;
        position: absolute;
        transform: translate(-50%, -50%);
        width: 100px;
    }
}

//Well
.well-bg {
    background-color: transparent;

    .well-text-margin {
        margin-top: 15px;
    }
}

//Icons
.icon-help {
    background-image: $icon-help;
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: 80%;
    height: 80px;

    & > img {
        visibility: hidden;
    }

    &.icon-full-size {
        background-size: 100%;
        height: 60px;
    }
}

.icon-continue {
    background-image: $icon-continue;
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: 80%;
    height: 80px;

    & > img {
        visibility: hidden;
    }
}

.icon-date {
    background-image: $icon-date;
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: 80%;
    height: 80px;

    & > img {
        visibility: hidden;
    }
}

.icon-cancel-invoice {
    background-image: $icon-cancel-invoice;
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: 80%;
    height: 80px;

    & > img {
        visibility: hidden;
    }
}

.icon-remove-file {
    background-image: $icon-remove-file;
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: 70%;
    height: 80px;

    &.icon-lg {
        height: 120px;
    }

    & > img {
        visibility: hidden;
    }
}

.icon-arrow-right {
    background-image: $icon-arrow-right;
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: 100%;
    height: 60px;

    & > img {
        visibility: hidden;
    }
}

.iris-title {
    background-color: $disabled-header-field;
    padding-top: 5px;
    padding-bottom: 5px;
}

// Input with select
.inputSelectContainer {
    position: relative;

    .inputSelect {
        position: absolute;
    }

    .inputOnSelect {
        border-right: 0;
        position: absolute;
        width: calc(100% - 20px);

        &:disabled {
            width: calc(100% - 1px);
        }
    }
}

.border-left-success {
    border-left: 3px solid $success-color;
}

.primary-background {
    background-color: $table-hover-row-background-color;
}

/*Pace*/
.pace .pace-progress {
    background-color: $accent-color;
}

.border-left-none {
    border-left: none;
}

.border-right-none {
    border-right: none;
}

.border-top-divider {
    border-top: 2px solid $table-border-color;
}


.vertical-scroll {
    overflow-y: auto;
    max-height: 75%;
}

.position-inherit {
    position: inherit;
}

.adjusted-modal-dialog {
    max-width: 600px;
    margin: 0 auto !important;
}

.adjusted-modal-dialog > .modal-content {
    max-width: 600px;
}

.adjusted-modal-dialog-td {
    width: 20%;
    text-align: center;
}

@media only screen and (max-width: $max-screen-xs) {
    .adjusted-modal-dialog {
        max-width: 480px;
    }

    .adjusted-modal-dialog > .modal-content {
        max-width: 480px;
    }
}

.tabs-wrapper {
    position: relative;
    margin: 0 auto;
    overflow: hidden;
    padding: 5px;
    height: 50px;
}

.tabs-list {
    position: absolute;
    left: 0px;
    top: 0px;
    min-width: 600px;
    margin-left: 12px;
    margin-top: 0px;
}

.tabs-list li {
    display: table-cell;
    position: relative;
    text-align: center;
    cursor: grab;
    cursor: -webkit-grab;
    color: #efefef;
    vertical-align: middle;
}

.scroller {
    text-align: center;
    cursor: pointer;
    display: none;
    padding: 10px;
    padding-top: 16px;
    white-space: no-wrap;
    vertical-align: middle;
    background-color: $content-background-color;
    color: $accent-color;
}

.scroller-right {
    float: right;
    border-bottom: 2px solid $divider-color;
    border-left: 2px solid $divider-color;
}

.scroller-left {
    float: left;
    border-bottom: 2px solid $divider-color;
    border-right: 2px solid $divider-color;
}

.paw-username-error-action {
    padding-top: 4px;
    padding-bottom: 4px;
    border: 1px solid $divider-color !important;
    border-radius: 4px;
    margin-top: 4px;

    .paw-username-error-action-icon {
        margin-right: 4px;
    }
}



.paw-username-verification-msg {
    padding-top: 4px;

    .paw-username-connect-icon {
        color: orange;
        margin-right: 4px;
    }
}

.document-meta-data-lookup {
    table {
        th, td {
            &.tpl-col-10 {
                width: 10%;
            }

            &.tpl-col-20 {
                width: 20%;
            }

            &.tpl-col-25 {
                width: 25%;
            }

            &.tpl-col-30 {
                width: 30%;
            }

            &.tpl-col-33 {
                width: 33.33%;
            }

            &.tpl-col-40 {
                width: 40%;
            }

            &.tpl-col-50 {
                width: 50%;
            }

            &.tpl-col-60 {
                width: 60%;
            }

            &.tpl-col-70 {
                width: 70%;
            }

            &.tpl-col-75 {
                width: 75%;
            }

            &.tpl-col-80 {
                width: 80%;
            }

            &.tpl-col-90 {
                width: 90%;
            }

            &.tpl-col-100 {
                width: 100%;
            }
        }
    }
}

.paw-select2-right-align {
    left: unset !important;
    right: 0;
}

.paw-select2-multiselect {
    .select2-selection__rendered {
        height: 34px !important;
    }

    input.select2-search__field {
        font-weight: normal;
        color: $main-text-color;

        &::placeholder {
            color: $main-text-color;
        }
    }

    .select2-selection__choice {
        display: none;
    }

    .select2-selection__arrow {
        position: absolute;
        bottom: 0;
        right: 12px;
        top: 0;
        width: 4px;

        b {
            border-color: #999 transparent transparent transparent;
            border-style: solid;
            border-width: 4px 4px 0 4px;
            height: 0;
            left: 0;
            margin-left: -4px;
            margin-top: -2px;
            position: absolute;
            top: 50%;
            width: 0;
        }
    }

    .select2-selection__clear {
        margin-right: 22px;
        margin-top: 8px;
    }

    .paw-custom-selection {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        padding-left: 12px;
        padding-right: 4px;
        white-space: nowrap;
        width: calc(100% - 12px);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    &.paw-select2-multiselect-allow-clear {
        .paw-custom-selection {
            width: calc(100% - 30px);
        }
    }

    &.select2-container--focus {
        .paw-custom-selection {
            display: none;
        }
    }
}

.paw-select2-elt-selected {
    background-color: $table-hover-row-background-color;

    .paw-select2-elt-selection-checked {
        position: absolute;
        right: 0;
        padding-right: 6px;
        top: 50%;
        transform: translateY(-50%)
    }
}

.paw-slot {
    .paw-select2-multiselect {
        &:not(.select2-container--focus) {
            .select2-selection--multiple .select2-selection__rendered {
                border-bottom: 1px solid transparent;
            }
        }

        input.select2-search__field {
            padding-left: 0 !important;
        }
    }

    .paw-custom-selection {
        padding-left: 0;
    }
}
