.clearfix() {
    &:before,
    &:after {
        content: " "; // 1
        display: table; // 2
    }

    &:after {
        clear: both;
    }
}

.wphr-clear {
    clear: both;
}

.wphr-button-danger {
    background: #e14d43 !important;
    border-color: #d02c21 #ba281e #ba281e !important;
    color: white !important;
    -webkit-box-shadow: 0 1px 0 #ba281e !important;
    -moz-box-shadow: 0 1px 0 #ba281e !important;
    -o-box-shadow: 0 1px 0 #ba281e !important;
    -ms-box-shadow: 0 1px 0 #ba281e !important;
    box-shadow: 0 1px 0 #ba281e !important;
    text-shadow: 0 -1px 1px #ba281e, 1px 0 1px #ba281e, 0 1px 1px #ba281e, -1px 0 1px #ba281e !important;
}

.wphr_form_generic() {

    ol, li {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .photo-container {
        display: inline-block;
        width: 128px;
        position: relative;

        img {
            max-width: 80px;
            height: auto;
        }

        .wphr-remove-photo {
            position: absolute;
            top: 0;
            left: 0;
            background: rgba(0, 0,0, 0.5);
            width: 80px;
            height: 80px;
            color: red;
            text-align: center;
            text-decoration: none;
            font-size: 50px;
            padding-top: 30px;
            display: none;
        }

        &:hover {
            .wphr-remove-photo {
                display: inline-block;
            }
        }
    }

    ol.form-fields {
        .clearfix();

        > li {
            float: left;
            width: 100%;
            padding-bottom: 5px;

            > label {
                width: 15%;
                display: inline-block;
                vertical-align: top;
            }

            select {
                max-width: 55%;
            }
        }

        &.two-col {
            li {
                width: 50%;

                label {
                    width: 30%;
                }

                &:nth-child(2n+1) {
                    clear: both;
                }
            }
        }

        li.name-container {
            width: 100%;
            float: none;

            > label {
                float: left;
                width: 15%;
                margin-top: 22px;
            }

            ol {
                float: left;
                width: 85%;

                label {
                    display: block;
                    color: #aaa;
                    width: 100%;
                }

                li.middle-name {
                    width: 185px;

                    input {
                        width: 98%;
                    }
                }
            }
        }
    }

    fieldset {
        margin-bottom: 20px;
        padding-top: 15px;
        border-top: 1px solid #eee;

        &.no-border {
            border-top: none;
        }

        legend {
            font-weight: bold;
            padding-right: 20px;
            margin-bottom: 10px;
        }
    }

    ol.fields-inline {
        li {
            display: inline-block;
        }
    }
}

.select2-container--default {
    .select2-selection--single {
        border: 1px solid #ddd;
    }
}

@import "crm.less";
@import "hrm.less";
// @import "accounting.less";
@import "wphr-dropdown.less";

#wp-admin-bar-wphr-mode-switch .ab-icon.dashicons-randomize {
    padding-top: 7px !important;
}

.wphr-hide {
    display:none;
}

.wphr-loader {
    position: absolute;
    width: 20px;
    height: 20px;
    background: url('../../assets/images/spinner-2x.gif') center center no-repeat;
    z-index: 99;
    background-size: 20px;
}

span.required {
    color: red;
}

.clearfix {
    .clearfix();
}

table.wphr-table {
    &.full-width {
        width: 100%;
    }
}

.wphr-license-status.has-error,
.wphr-license-status.has-error p {
    color: red;
}

/*----------------------------------------
  Table style in settings area
----------------------------------------*/
.vtable-wrap {

    .list-table-inner {
        form {

        }
    }

    .vtbale-table-wrapper {
        position: relative;

        table.vtable {
            position: relative;
            width: 100%;
            height: 100%;

            tbody.vtbale-tbody {
                tr.vtable-ajax-loading {
                    height: 50px;
                }
            }
        }

        .vtable-loader-bg {
            width: 100%;
            height: 100%;
            background: #fafafa;
            position: absolute;
            top: 0px;
            left:0px;
            opacity: 0.4;
        }

        .vtable-loader {
            position: absolute;
            width: 30px;
            height: 30px;
            background: url('../../assets/images/spinner-2x.gif') center center no-repeat;
            z-index: 99;
            background-size: 30px;
            top:38%;
            left:50%;
        }

    }

}

td.wphr-settings-table-wrapper {
    padding: 0 15px 10px 0;;
}

table.wphr-settings-table {
    th {
        padding: 9px 7px!important;
        vertical-align: middle;
    }

    th.wphr-settings-table-status,
    td.wphr-settings-table-status {
        width: 1em;
    }

    td {
        padding: 7px;
        line-height: 2em;
        vertical-align: middle;
    }

    th.wphr-settings-table-name,
    td.wphr-settings-table-name {
        padding-left: 15px !important;

        a {
            font-weight: 700;
        }
    }

    tr:nth-child(odd) td {
        background: #f9f9f9;
    }
}

/*----------------------------------------
  A simple 6 column grid framework
----------------------------------------*/
.wphr-grid-container {
    width: 100%;

    * {
        box-sizing: border-box;
    }

    .row {
        .clearfix();
    }

    [class*='col-'] {
        float: left;
        min-height: 1px;
        width: 16.66%;
        padding: 12px;
    }

    .col-1 { width: 16.66%; }
    .col-2 { width: 33.33%; }
    .col-3 { width: 50%;    }
    .col-4 { width: 66.66%; }
    .col-5 { width: 83.33%; }
    .col-6 { width: 100%;   }

    // responsive
    // tablets
    @media all and (max-width:800px){
        .col-1{ width: 33.33%;    }
        .col-2{ width: 50%;        }
        .col-3{ width: 83.33%;    }
        .col-4{ width: 100%;    }
        .col-5{ width: 100%;    }
        .col-6{ width: 100%;      }

        .row .col-2:last-of-type{
            width: 100%;
        }

        .row .col-5 ~ .col-1{
            width: 100%;
        }
    }

    // small devices
    @media all and (max-width:650px){
        .col-1{ width: 50%;        }
        .col-2{ width: 100%;    }
        .col-3{ width: 100%;    }
        .col-4{ width: 100%;    }
        .col-5{ width: 100%;    }
        .col-6{ width: 100%;      }
    }
}

.wphr {

    .wphr-single-container {
        .clearfix();
        margin-top: 10px;

        .wphr-area-left {
            width: 72%;
            min-width: 463px;
            float: left;
            margin-right: 10px;

            &.full-width {
                width: 100%;
                float: none;
                margin-right: 0;
            }

            .wphr-profile-top {
                .clearfix();
                margin-bottom: 45px;

                .wphr-avatar {
                    float: left;
                    width: 128px;
                    position: relative;

                    .inactive {
                        background: url('../images/inactive.png') no-repeat;
                        background-position: 50%;
                        position: absolute;
                        bottom: 0px;
                        left: 0px;
                        background-size: 105px 31px;
                        height: 31px;
                        width: 100%;
                        -ms-transform: rotate(-8deg); /* IE 9 */
                        -webkit-transform: rotate(-8deg); /* Chrome, Safari, Opera */
                        transform: rotate(-8deg);
                    }


                    img {
                        max-width: 100%;
                        margin-top: 15px;
                    }
                }

                .wphr-user-info {
                    float: left;
                    margin-left: 25px;
                    width: 60%;

                    a {
                        text-decoration: none;
                    }
                }
            }
        }

        .wphr-area-right {
            float: right;
            width: 25%;
        }
    }

    .postbox {
        h3.hndle {
            font-size: 14px;
            padding: 8px 12px;
            margin: 0;
            line-height: 1.4;
        }

        .handlediv::before {
            content: '\f142';
            right: 12px;
            font: 400 20px/1 dashicons;
            speak: none;
            display: inline-block;
            padding: 8px 10px;
            top: 0;
            position: relative;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            text-decoration: none!important;
        }

        &.company-postbox {
            #major-publishing-actions {
                margin: -12px -12px -23px -12px;
            }
        }
    }

    table.form-table td {
        padding: 6px 10px;
    }

    .wphr-hr-new-leave-request-wrap {
        margin: 20px 0px;
    }
}

ul.wphr-list {
    width: 100%;

    &.list-inline {
        li {
            display: inline-block;
            margin-right: 10px;
        }
    }

    &.list-two-side {
        li {
            clear:both;

            span {
                float: right;
            }
        }

    }

    &.list-sep {
        li {
            border-bottom: 1px dotted #eee;
            padding: 0px 0px 8px;

            &:last-child {
                border-bottom: none;
            }
        }
    }

    &.two-col {
        .clearfix();

        li {
            line-height:1.5em;
            float:left;
            display:inline;
            width: 50%;
        }
    }

    &.separated {
        label {
            min-width: 28%;
            display: inline-block;
            vertical-align: top;
        }

        span.sep {
            width: 15px;
            display: inline-block;
        }
    }

    &.blur {
        label {
            color: #777;
        }
    }

    &.blocked {
        li {
            margin-bottom: 8px;
        }

        > li > label {
            display: block;
            padding-bottom: 5px;
        }
    }

    &.no-style {
        li {
            list-style: none;
        }
    }

    li.two-col {
        .clearfix();

        .cols {
            float: left;
            width: 48%;
            margin-right: 2%;

            &.last {
                margin-right: 0;
            }
        }
    }
}

ul.wphr-dashboard-announcement {
    li {
        padding:5px;
        position:relative;

        .announcement-title {
            padding-right: 90px;

            a {
                font-size: 15px;
                text-decoration: none;
            }

            span.announcement-date {
                font-size: 12px;
                font-weight: normal;
                margin-right: 50px;
            }
        }

        p {
            margin: 2px 0px 0px;
        }

        .announcement-row-actions {
            visibility: hidden;
            position: absolute;
            top: 5px;
            right: 10px;

            a {
                color: #222;
                text-decoration: none;
                width: auto;
                display: inline-block;
                margin-left: 10px;

                .dashicons {
                    font-size: 18px;
                    line-height: 1.2;
                }
            }
        }

        &.read {

            .announcement-row-actions {

                .mark-read {
                    display: none;
                }
            }
        }

        &:first-child {
            border-bottom: 1px solid #eee;
        }

        &.unread {
            background :#fafafa;
        }

        &:hover {
            background: #fafafa;
            .announcement-row-actions {
                visibility: visible;
            }
        }
    }
}

table.vendor-list-table {
    th.col-username, td.col-username {
        width: 40%;
    }

    th.col-balance, td.col-balance {
        width: 15%;
    }
}

table.invoice-list-table {
    td.col-inv-no, th.col-inv-no {
        width: 12%;
    }
}

table.audit-log-table {
    td.col-action, th.col-action {
        width: 8%;
    }

    td.col-amount, th.col-amount {
        width: 12%;
    }

    td.col-date, th.col-date {
        width: 11%;
    }
}

.company-accounts {
    .account {
        .clearfix();

        .inside {
            padding: 0 11px;
        }
    }

    h2 {
        a {
            text-decoration: none;
            font-size: 12px;
            background: #e0e0e0;
            border-radius: 2px;
            padding: 0px 8px;
            margin-left: 4px;
            font-weight: 600;

            &:hover {
                background: #363b3f;
                color: #fff;
            }
        }
    }

    .logo-area {
        float: left;
        width: 15%;
        margin-right: 15px;

        img {
            max-width: 100%;
        }
    }

    .content-area {
        float: left;
        width: 80%;
    }
}

.wphr-company-single {

    #company-locations {
        margin-top: 15px;
    }

    .postbox.company-location {
        width: 240px;
        min-width: 220px;
        float: left;
        margin-right: 15px;
        margin-bottom: 15px;

        .inside {
            min-height: 90px;
        }

        .actions {
            text-align: right;
            padding: 0 5px 5px 0;

            a {
                text-decoration: none;
                color: #999;

                &:hover {
                    color: #0099d5;
                }
            }
        }
    }
}

.wphr-ui-dialog {
    &.ui-dialog {
        padding: 0;
        z-index: 160000;

        .ui-dialog-titlebar-close {
            top: 22%;
            right: 0;
            width: 45px;
            height: 45px;
        }

        .ui-dialog-title {
            line-height: 30px;
            color: #5d6d74;
            font-size: 20px;
            text-shadow: 0 1px 1px #fff;
            font-weight: 400;
        }
    }

    &.ui-widget-content {
        // border: 1px solid #ddd;
        border: none;
    }

    &.ui-corner-all, .ui-corner-all {
        border-radius: 0 !important;
    }

    .ui-widget-header {
        border: none;
        border-bottom: 1px solid #ddd;
        background: #fff;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);

        .ui-state-default {
            border: none;
            border-left: 1px solid #ddd;
            background: #fff;
        }
    }
}

.ui-widget-overlay {
    z-index: 159999;
    background: #000;
    opacity: .7;
}

.wphr-modal {
    background: #fff;
    position: fixed;
    top: 10%;
    bottom: 10%;
    right: 15%;
    left: 15%;
    // display: block;
    display: none;
    box-shadow: 0 1px 20px 5px rgba(0, 0, 0, 0.1);
    z-index: 160000;

    * { box-sizing: border-box; }

    &.smaller {
        bottom: 30%;
        top: 15%;
        left: 30%;
        right: 30%;
    }

    &.medium {
        bottom: 20%;
        top: 10%;
        left: 25%;
        right: 25%;
    }

    .loader {
        position: absolute;
        width: 100%;
        height: 100%;
        background: #fff url('../../assets/images/spinner-2x.gif') center center no-repeat;
        z-index: 99;
        display: none;
        background-size: 20px;
    }

    .close {
        position: absolute;
        top: 0;
        right: 0;
        font: 300 1.71429em "dashicons" !important;
        color: #777;
        content: '\f335';
        display: inline-block;
        padding: 10px 20px;
        z-index: 5;
        text-decoration: none;
        height: 50px;
        border-left: 1px solid #ddd;

        &:hover {
            background: #eee;
            opacity: 0.8;
        }

        &:active {
            background: #eee;
            opacity: 0.4;
        }
    }

    .modal-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 50px;
        z-index: 4;
        border-bottom: 1px solid #ddd;
        padding-left: 15px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);

        h2 {
            line-height: 50px;
            text-align: left;
            margin-top: 0;
            color: #5d6d74;
            font-size: 20px;
            text-shadow: 0 1px 1px #fff;
        }

        .modal-suggession {
            position: absolute;
            top:50px;
            left:0px;
            padding: 10px;
            color: #8a6d3b;
            background-color: #fcf8e3;
            border:1px solid #faebcc;
            width:100%;
        }
    }

    .content-container {
        position: absolute;
        top: 50px;
        right: 0;
        bottom: 50px;
        left: 0;
        overflow: auto;
        padding: 2.14286em 5em;
    }

    .content {
        margin: 0 auto;
        max-width: 900px;
        text-align: left;

        .row {
            .clearfix();
            margin-bottom: 12px;

            label {
                min-width: 130px;
                line-height: 1.5em;
                display: inline-block;
                vertical-align: top;
                float: left;

                &.block {
                    display: block;
                }
            }

            select {
                max-width: 62%;
            }

            span.checkbox {
                float: left;
                width: 63%;

                label {
                    margin-bottom: 10px;
                    min-width: 100%;

                }
            }

            span.description {
                display: block;
                margin-left: 130px;
                padding: 5px 0 0 0;
            }
        }

        img {
            max-width: 100%;
            height: auto;
        }
    }

    p {
        font-size: 1.10em;
    }

    footer {
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        padding: 12px 20px;
        border-top: 1px solid #ddd;
        background: #fff;
        text-align: right;

        ul {
            margin: 0;
        }
        li {
            display: inline-block;
            margin: 0;

            .wphr-loader {
                position: relative;
                margin-right: 7px;
                padding-top: 18px;
                top: 5px;
            }
        }
    }
    .button-secondary,
    .button-primary:active {
        // fixing weird core bug thingy
        vertical-align: baseline;
    }
}

.wphr-modal-backdrop {
    position: fixed;
    z-index: 159999;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 360px;
    background: #000;
    opacity: .7;
    display: none;
}

form.wphr-form {
    ol.wphr-form-fields,
    ul.wphr-form-fields {
        list-style: none;
        margin-left: 0;

        &.two-col {
            .clearfix();

            li {
                line-height:1.5em;
                float:left;
                display:inline;
                width: 50%;
            }
        }
    }

    .wphr-form-field {
        .clearfix();
        padding: 10px 0;

        > label {
            float: left;
            min-width: 150px;
            font-weight: bold;
            vertical-align: top;;
            color: #23282d;
            font-size: 14px;
        }

        .description {
            margin-left: 5px;
        }

        &.invalid {
            background-color: rgba(255, 0, 0, 0.08);
        }
    }

    .block {
        .wphr-form-field {
            > label {
                float: none;
                display: block;
                margin-bottom: 10px;
            }
        }
    }
}

ul.edit-address {

    li {
        display: block;
        clear: both;
        padding-bottom: 5px;
    }

    label {
        display: block;
    }

    li.city-wrap {
        .clearfix();
        width: 100%;

        input {
            max-width: 90%;
        }

        span {
            float: left;
            width: 30%;
        }
    }
}

.terminate-form-wrap {
    .row {
        label {
            width: 155px !important;
        }
    }
}

.align-right {
    text-align: right !important;
}

.align-left {
    text-align: left !important;
}

.wphr-text-center {
    text-align: center;
}

.wphr-left {
    float: left;
}

.wphr-right {
    float: right;
}

.input-group {
    display: table;

    input, select {
        margin: 0;
    }

    .input-group-addon {
        width: 1%;
        white-space: nowrap;
        vertical-align: middle;
        background-color: #f5f5f5;
        padding: 2px 12px;
        display: table-cell;
        border: 1px solid #ddd;
        text-align: center;

        &:first-child {
            border-right: 0;
        }

        &:last-child {
            border-left: 0;
        }
    }
}

.wphr-settings {
    .wphr-subsubsub {
        list-style: none;
        font-size: 13px;
        color: #666;
    }
    .wphr-subsubsub li {
        display: inline-block;
        padding: 0px;
        margin: 0px;
        white-space: nowrap;

        a {
            text-decoration: none;
            border: none;
            line-height: 2;
            padding: .2em;
        }
    }

    .wphr-nav-tab-active {
        color: #000;
        font-weight: 600;
    }

    .wphr-settings-title-before-field {
        margin: 6px 0;
    }

    .wphr-settings-radio {
        margin-top: 3px;
    }

    p.description {
        font-size: 12px;
        color: #777;
    }
}

.wphr-attachment-area {
    overflow: auto;
    padding: 2px 2px;

    width: 32%;


    .wphr-drop-jon {
        border: 1px dashed #b4b9be;
        .wphr-pre-load-image-wrap {
            background: red;
            height: 100px;
            width: 100px;
        }
        .bar {
            background-color: #83b4d8;
            border-radius: 3px;
            box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
            height: 5px;
            width: 0;
            z-index: 9;
        }
        .wphr-attc-link-text {
            text-align: center;
            padding: 12px 0;
        }
        .wphr-image-wrap {
            float: left;
            position: relative;
            padding-left: 17px;
            padding-top: 10px;
            .wphr-img-progress {
                border: 1px solid #ddd;
                padding: 5px;
                border-radius: 5px;
                background: #fff;
                width: 80px;
                height: 80px;
            }

            .attachment-name {

                img {
                    border: 1px solid #ddd;
                    padding: 5px;
                    border-radius: 5px;
                    background: #fff;
                    max-width: 150px;
                }
            }
            .caption {
                background: #000;
                border: medium none;
                border-radius: 0;
                color: red;
                display: none;
                height: 80px;
                left: 23px;
                line-height: 150%;
                opacity: 0.5;
                padding-top: 0;
                position: absolute;
                text-align: center;
                text-decoration: none;
                top: 16px;
                width: 80px;
            }

            &:hover .caption {
                display: inline-block;
            }

            .wphr-del-attc-button {
                color: red;
                display: block;
                font-size: 28px;
                font-weight: bold;
                padding-top: 30px;
                text-decoration: none;
            }

        }

    }
}

.wphr-activation-cloud-prompt {
    width: 100%;
    margin: 0 !important;
    padding: 0;
    border: 1px solid #e5e5e5;
    background-color: #fff;
    font-weight: normal;
    box-shadow: none;
    -webkit-box-shadow: none;
    display: -ms-flex;
    display: -webkit-flex;
    display: flex;

    * {
        box-sizing: border-box;
    }

    .activation-prompt-text {
        width: 60%;
        background-color: #f8f8f8;
        padding: 16px 20px;
        border-right: 1px solid #e5e5e5;
    }

    input[type="email"] {
        width: 200px;
        min-height: 32px;
    }

    .button-primary {
        margin-right: 10px;
    }

    .wphr-button-xs {
        font-size: small;
    }

    .activation-form-container {
        width: 40%;
        padding-top: 9px;
        padding-right: 20px;
        margin-left: 30px;
        text-align: right;
    }
}

.wphr-progress-status-indicator {
    .status {
        text-align: center; font-size: 16px;
        #progress-total {
            font-weight: bold; color: #3b99fc;
        }
        #completed-total {
            color: green;
        }
        #failed-total {
            color: red;
        }
    }
    .progress {
        progress {
            width:100%;
        }
    }
}

trix-editor ul {
    list-style-type: disc;
    margin-left: 2em;
}

// toastr - notification
// --------------------------------------------------
.wp-admin #toast-container {

    &.toast-top-right {
        top: 40px;
        right: 18px;
    }

    & > div {
        opacity: 1;
    }

    & > :hover {
        opacity: .9;
    }
}

// Dashboard Info Box
// --------------------------------------------------
.wphr-info-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-left: -12px;
    margin-right: -12px;

    .wphr-info-box-item {
        padding-left: 12px;
        padding-right: 12px;
        flex: 1;
        margin-bottom: 20px;

        .wphr-info-box-item-inner {
            position: relative;
            height: 100%;
            background-color: #fff;
            border: 1px solid #e5e5e5;
            padding-bottom: 30px;

            .wphr-info-box-content {
                height: 100%;

                .wphr-info-box-content-row {
                    height: 100%;
                    display: flex;
                    flex-wrap: wrap;
                    justify-content: space-between;

                    .wphr-info-box-content-left {
                        flex: 1;
                        padding: 12px;
                        align-self: center;
                        text-align: center;

                        h3 {
                            font-size: 37px;
                            margin: 10px 0 10px 0;
                            line-height: 1;
                        }

                        p {
                            font-size: 14px;
                        }
                    }

                    .wphr-info-box-content-right {
                        flex: 1;
                        padding: 20px 12px;
                    }
                }

                .wphr-info-box-list {
                    margin: 0;
                    padding: 0;
                    list-style-type: none;

                    li {
                        margin-bottom: 5px;

                        a {
                            text-decoration: none;
                        }

                        &:last-child {
                            margin-bottom: 0;
                        }
                    }
                }
            }

            .wphr-info-box-footer {
                position: absolute;
                bottom: 0;
                left: 0;
                width: 100%;

                a {
                    display: block;
                    background-color: #0073aa;
                    color: #fff;
                    text-align: center;
                    text-decoration: none;
                    padding: 6px;
                    height: 30px;

                    &:hover {
                        background-color: darken(#0073aa, 10%);
                    }
                }
            }
        }
    }

}

@import "responsive.less";
