@import "../third-party/css/bootstrap/variables";
@import "../third-party/css/bootstrap/mixins";
@import "../third-party/css/bootstrap/forms";
@import "../third-party/css/bootstrap/panels";
@import "../third-party/css/bootstrap/labels";
@import "custom-variables";
@import "utils";

.form-group {
    position: relative;
    &.with-tooltip {
        padding-right: 15px;
    }
}
.form-horizontal {
    .form-group {
        margin-bottom: 20px;
    }

    img {
        max-width: 100%;
        max-height: 150px;
    }

    .control-label {
        @media all and (max-width: 992px) {
            margin-bottom: 5px !important;
            text-align: left;
        }
    }

    .form-group {
        .cr-styled:not(.cr-styled__radio) {
            margin-top: 10px;
        }
    }

    .cr-styled__radio {
        padding-top: 0 !important;
    }

    .ui-multiselect {
        width: 100% !important;
    }

    .form-gorup__complex,
    .complex .form-group {
        margin-left: 0;
        margin-right: 0;
    }

    .form-gorup__complex {
        position: relative;
        &:before {
            border: 1px solid #fff;
            position: absolute;
            top: -21px;
            z-index: 9;
            content: '';
            width: 100%;
        }
    }

    .complex {
        margin-bottom: 20px;
        border-bottom: 1px solid #ddd;
    }

    .delete_file.deletebutton {
        position: relative;
    }

    .input-group {
        width: 100%;
        .ui-datepicker-trigger {
            right: 10px;
        }
    }
    .input-group {
        .ui-datepicker-trigger {
            right: 10px;
        }

        input[type="file"] {
            position: fixed;
            left: -10000px;
        }

        &__file {
            margin-bottom: 10px;

            input[type="text"] {
                pointer-events: none;
            }
        }

        .btn-change {
            .fa {
                margin-right: 10px;
            }
        }

        .deletebutton {
            .fa-trash-o {
                margin-right: 10px;
            }
        }

        a.form-control {
            position: relative;
            z-index: 2;
            float: left;
            width: 100%;
            margin-bottom: 0;
            display: table-cell;
            word-break: break-all;
            overflow: hidden;
            padding: 8px 12px;
        }
    }

    .ui-datepicker-trigger {
        position: absolute;
        right: 25px;
        left: auto;
        z-index: 9;
        top: 8px;
    }

    .numerical-block,
    .quarter {
        @media all and (min-width: 767px) {
            & + [data-toggle="tooltip"] {
                position: relative;
                display: inline-block;
            }
        }
    }

    .input-group__file,
    .ui-multiselect,
    .half,
    select {
        @media all and (min-width: 992px) {
            max-width: 50% !important;

            & + [data-toggle="tooltip"] {
                position: relative;
                display: inline-block;
            }
        }
    }

    .numerical-block,
    .half,
    .quarter {
        min-width: 180px;
        width: 100%;
        position: relative;
        float: left;

        .ui-datepicker-trigger {
            right: 15px;
        }
    }

    .numerical-block {
        @media all and (min-width: 767px) {
            max-width: 20%;

        }
    }

    .numerical-block__discount {
        @media all and (max-width: 767px) {
            width: calc(100% - 75px);
            min-width: 160px;
        }
    }

    .numerical-block__property {
        margin-left: 15px;
        float: left;
        width: 60px;

        select {
            max-width: 100% !important;
        }
    }

    .quarter {
        @media all and (min-width: 767px) {
            max-width: 25%;
        }

        .quarter {
            max-width: 100%;
            min-width: auto;
        }
    }

    .quarter + .quarter {
        @media all and (min-width: 767px) {
            margin-left: 30px;
        }
    }

    .ui-multiselect,
    .half,
    select {
        float: left;
    }

    .radio-inline {
        & + [data-toggle="tooltip"] {
            position: relative;
            display: inline-block;
            top: 3px;
        }
    }

    .ui-multiselect {
        width: 100% !important;
        min-height: 34px;
        height: auto !important;
        padding-left: 12px;
        padding-right: 12px;
        border-radius: 2px;
        background: $input-default-bg !important;
        color: $input-default-color;
        border: 1px solid $input-default-border;
        font-weight: 500;

        &:focus {
            outline: none;
        }

        &.ui-state-active {
            border: $input-default-border-focused;
            background: #fff !important;
            box-shadow: none;
        }
    }

    .note {
        font-size: 10px;
        font-weight: normal;
    }

    .fa-caret-down {
        position: absolute;
        right: 8px;
        top: 9px;
        color: $default-color;
    }

    .theme-banner__preview-image {
        margin-bottom: 15px;
    }

    .theme-banner .control-label {
        margin-bottom: 15px;
        display: block;
        text-align: left;
    }

    .inputName.col-md-3 {
        @media all and (max-width: 992px) {
            text-align: left;
        }
    }

    .mce-flow-layout-item > div {
        white-space: initial;
    }

    .products {
        line-height: 34px;

        .numerical-block {
            margin-right: 5px;
        }

        [data-toggle="tooltip"] {
            top: 3px;
        }
    }
}

.ui-widget {
    font-family: inherit !important;
    color: $default-color !important;
}

.ui-menu {
    border-radius: 2px;
    border: 1px solid #ccc !important;
    padding: 4px !important;

    .ui-menu-item {
        padding: 2px 10px !important;
        font-size: $font-size-base;
        border-radius: 2px;
        font-weight: 400;
        cursor: pointer;
        @include prefix(transition, all 0.2s ease-out 0s, moz webkit o ms);

        &.ui-state-focus {
            border: none !important;
            background: #666 !important;
            color: #fff !important;
            font-weight: 400;
        }
    }
}

#connectionSettings .form-group {
    &:first-of-type,
    &:last-of-type {
        display: block !important;
    }
}

.edit-language {
    padding-top: 15px;
}

a.empty {
    pointer-events: none;
}

/* input */
input[readonly][type="text"],
.textField,
input[type="text"],
input[type="password"],
textarea {
    font-weight: 400;
    display: inline-block;

    @extend .form-control;
    @include form-control-focus;

    @include reset-form-control;
}

textarea,
textarea.form-control {
    height: auto;
    min-height: 100px;
}

/* select */
select {
    font-weight: 400;

    @extend .form-control;
    @include form-control-focus;

    @include reset-form-control;
}

.panel {
    max-width: 700px;
    padding: 20px 30px;
    border: 1px solid $panel-default-border;
    margin-bottom: 20px;
    -webkit-box-shadow: 0 0 8px 0 rgba(0,0,0,0.06), 0 1px 0 0 rgba(0,0,0,0.02);
    -ms-box-shadow: 0 0 8px 0 rgba(0,0,0,0.06), 0 1px 0 0 rgba(0,0,0,0.02);
    -o-box-shadow: 0 0 8px 0 rgba(0,0,0,0.06), 0 1px 0 0 rgba(0,0,0,0.02);
    box-shadow: 0 0 8px 0 rgba(0,0,0,0.06), 0 1px 0 0 rgba(0,0,0,0.02);

    &--medium {
        max-width: 600px;
    }

    &--max {
        max-width: 100%;
    }

    &--small {
        max-width: 300px;
    }

    &--auto {
        width: auto;
        max-width: initial;
        display: inline-block;

        table {
            width: auto !important;
        }
    }
}

.panel-heading {
    font-size: 16px;
    padding: 0 0 15px;
    margin-bottom: 20px;
}

.panel-title {
    color: $default-color;
}

.panel-body {
    padding: 0;
}

.table {
    .ui-datepicker-trigger {
        position: absolute;
        left: initial !important;
    }
}

.table-clear {
    th,
    td {
        border: 0 !important;

        &:first-child {
            text-align: right;
        }
    }

    table:not(.table--custom) {
        td:last-child {
            width: 100%;
        }
    }

    td {
        padding: 0 0 15px 4px;
        vertical-align: top;
        position: relative;
    }

    #application-settings {
        .cr-styled {
            margin-bottom: 10px;
        }

        td {
            padding-bottom: 0;
            text-align: left;
        }
    }

    .required {
        vertical-align: top;
    }

    .ui-datepicker-trigger {
        right: 10px;
        top: 6px;
    }

    .complex {
        .inputField {
            position: relative;
        }

        fieldset {
            padding: 15px;
        }
    }
}

.panel-default > .panel-heading {
    background-color: $panel-default-bg;
    border-color: $panel-default-border;
}



/* Custom Radio/Checkbox */
.cr-styled {
    display: inline-block;
    margin: 0 2px;
    line-height: 20px;
    font-weight: normal;
    cursor: pointer;
    @include prefix(user-select, none, moz ms o webkit);

    &__radio {
        margin-bottom: 5px;
    }

    .fa {
        display: inline-block;
        height: 18px;
        width: 18px;
        cursor: pointer;
        vertical-align: middle;
        border: 2px solid #ccc;
        border-radius: 3px;
        text-align: center;
        padding-top: 1px;
        margin-top: -4px;
        margin-right: 3px;
        font-size: 12px;
    }

    input {
        position: fixed;
        z-index: -1;
        left: -9999px;
    }

    input[type=checkbox]:checked + .fa:before {
        content: "\f00c";
    }

    input[type=radio] + .fa {
        border-radius: 18px;
        font-size: 11px;
        line-height: 13px;
    }

    input[type=radio]:checked + .fa:before {
        content: "\f111";
    }

    input[type=checkbox]:checked + .fa,
    input[type=radio]:checked + .fa {
        border-color: #6e8cd7;
        color: #6e8cd7;
    }
}

.text-danger {
    color: $btn-delete-bg;
    margin-bottom: 20px;
}

.radio-inline + .radio-inline,
.checkbox-inline + .checkbox-inline {
    margin-left: 0;
}

.job-alert__type-select {
    width: 80px;
    display: inline-block;
    vertical-align: bottom;
    margin-bottom: 10px;
}

.mce-tinymce {
    .mce-btn-group {
        &:not(:first-child) {
            border-left: none;
        }
    }

    .mce-statusbar {
        border: none;
    }

    .mce-path {
        display: none;
    }

    .mce-container, .mce-container-body {
        border-radius: 2px;
    }

    .mce-edit-area iframe {
        width: 99% !important;
    }
}

[data-toggle="tooltip"] {
    cursor: pointer;
    display: block;
    position: absolute;
    font-size: 18px;
    top: 8px;
    color: #a1a1a1;
    right: -6px;
    width: 16px;
}

.tooltip-checkbox {
    left: 50px;
    top: 6px;
    right: initial;
}

.tooltip__refine-search {
    @media all and (max-width: 767px) {
        top: 26px;
    }
}

.tooltip-job8 {
    right: 5px;
    top: 14px;
}

.tooltip {
    min-width: 180px;
    a {
        color: #fff;
        text-decoration: underline;
        word-break: break-word;
    }
}

.banner-tooltip {
    @media all and (min-width: 992px) {
        left: 50%;
        margin-left: 6px;
        position: absolute !important;
    }
}

#preloader_image_circular_16_for_Logo {
    position: absolute;
    right: -25px;
    bottom: 4px;
}

.custom-feed__url {
    word-break: break-all;
}
.day:not(.old) {
    color: #333;

    &.active {
        color: #fff;
    }

    &.disabled {
        color: #999;
        cursor: default;
    }
}


.old {
    color: #999;
}

.ui-datepicker-trigger {
    cursor: pointer;
}

.form-range {
    @media all and (max-width: 767px) {
        &:first-child {
            margin-bottom: 15px;
        }
    }

    .input-group-addon {
        width: 55px;
    }
}

.complex-title {
    font-size: 18px;
    padding-bottom: 15px;
    margin-bottom: 20px;
    margin-top: 0;
    border-bottom: 1px solid #ddd;
}

.xml-feeds__btns {
    padding-top: 10px;
    @media all and (min-width: 992px) {
        text-align: right;
    }
}

#message-modal {
    .modal-footer {
        border-top: none;
    }
}

.productTypeComment p,
.listing-feeds a {
    word-break: break-word;
}

.CodeMirror-linenumber {
    min-width: 35px !important;
}