@import './ca-input.colors.scss';
@import 'theme/variables.scss';
// -------------------- Input Control --------------------

.input-control {
    width: 100%;
    height: 26px;
    border: none;
    outline: none;
    border-radius: 2px;
    padding: 4px 6px;
    font-size: 14px;
    font-weight: 400;
    background-color: $default-input;
    color: $default-content;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    &::-moz-selection {
        background-color: $default-content-background-selection;
        color: $default-content;
    }

    &::selection {
        background-color: $default-content-background-selection;
        color: $default-content;
    }

    &.center {
        text-align: center;
    }

    &.uppercase {
        text-transform: uppercase;
    }

    &.lowercase {
        text-transform: lowercase;
    }

    &:hover {
        background-color: $default-on-input-hover;
    }

    &:focus {
        background-color: $default-focus-input;
        color: $default-focus-content;

        transition: 0.2s ease-in-out;

        &::-webkit-input-placeholder {
            color: $default-focus-placeholder;
        }
        &::-moz-placeholder {
            color: $default-focus-placeholder;
        }

        &:-ms-input-placeholder {
            color: $default-focus-placeholder;
        }

        &::-ms-input-placeholder {
            color: $default-focus-placeholder;
        }

        &::placeholder {
            color: $default-focus-placeholder;
        }

        &::-moz-selection {
            background-color: $default-focus-content-selection;
            color: $default-focus-content;
        }

        &::selection {
            background-color: $default-focus-content-selection;
            color: $default-focus-content;
        }

        &.blue-dropdown {
            background-color: $default-focus-input-blue-commands;
        }
    }

    &.valid-focus-in,
    &.dropdown-placeholder-active,
    &.multiSelect-dropdown-active {
        background-color: $valid-focus-input;
        color: $valid-focus-content;

        &::-webkit-input-placeholder {
            color: $valid-focus-placeholder-native;
        }
        &::-moz-placeholder {
            color: $valid-focus-placeholder-native;
        }

        &:-ms-input-placeholder {
            color: $valid-focus-placeholder-native;
        }

        &::-ms-input-placeholder {
            color: $valid-focus-placeholder-native;
        }

        &::placeholder {
            color: $valid-focus-placeholder-native;
        }

        &::-moz-selection {
            background-color: $valid-focus-content-background-selection;
            color: $valid-focus-content;
        }

        &::selection {
            background-color: $valid-focus-content-background-selection;
            color: $valid-focus-content;
        }
    }

    &.valid-focus-out-filled {
        &:not(.transparent) {
            background-color: $valid-input;
        }
        color: $valid-content;
        &.input-dropdown-table {
            background-color: $default-focus-content;
        }
        &::-moz-selection {
            background-color: $valid-content-background-selection;
            color: $valid-content;
        }

        &::selection {
            background-color: $valid-content-background-selection;
            color: $valid-content;
        }

        &:hover {
            background-color: $valid-input-hover;
        }
    }

    &.invalid-focus-in,
    &.invalid-search-in-dropdown-focus-in {
        background-color: $invalid-focus-input;
        color: $invalid-focus-content;

        &::-moz-selection {
            background-color: $invalid-focus-content-background-selection;
            color: $invalid-focus-content;
        }

        &::selection {
            background-color: $invalid-focus-content-background-selection;
            color: $invalid-focus-content;
        }
    }

    &.invalid-focus-out-filled,
    &.invalid-focus-out-empty {
        background-color: $invalid-input;
        color: $invalid-content;

        &::-moz-selection {
            background-color: $invalid-content-background-selection;
            color: $invalid-content;
        }

        &::selection {
            background-color: $invalid-content-background-selection;
            color: $invalid-content;
        }

        &:hover {
            background-color: $invalid-input-hover;
        }
    }

    &.invalid-focus-out-empty-table {
        &:hover {
            color: $invalid-content;
            background-color: $invalid-input-hover;
        }
    }

    &.inactive-empty {
        background-color: $inactive-empty-input;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        pointer-events: none;
    }

    &.inactive-filled {
        background-color: $inactive-filled-input;
        color: $inactive-filled-content;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        pointer-events: none;

        &::-moz-selection {
            background-color: $inactive-filled-content-background-selection;
            color: $inactive-filled-content;
        }

        &::selection {
            background-color: $inactive-filled-content-background-selection;
            color: $inactive-filled-content;
        }
    }

    &.datetimeclass:not(.inactive-filled) {
        letter-spacing: 1px;
        pointer-events: none;
        opacity: 0;
    }

    // -------------------

    &.has-placeholderIcon {
        padding-left: 37px;
    }

    &.dropdown-input-image-truck {
        padding-left: 63px;
    }

    &.dropdown-input-image-truck-focus {
        &::-webkit-input-placeholder {
            padding-left: 63px;
        }

        &::-moz-placeholder {
            padding-left: 63px;
        }

        &:-ms-input-placeholder {
            padding-left: 63px;
        }

        &::-ms-input-placeholder {
            padding-left: 63px;
        }

        &::placeholder {
            padding-left: 63px;
        }
    }

    &.dropdown-input-image-trailer {
        padding-left: 68px;
    }

    &.dropdown-input-image-trailer-focus {
        &::-webkit-input-placeholder {
            padding-left: 68px;
        }

        &::-moz-placeholder {
            padding-left: 68px;
        }

        &:-ms-input-placeholder {
            padding-left: 68px;
        }

        &::-ms-input-placeholder {
            padding-left: 68px;
        }

        &::placeholder {
            padding-left: 68px;
        }
    }

    &.dropdown-input-image-color {
        padding-left: 29px;
    }

    &.dropdown-input-image-user {
        padding-left: 30px;
    }

    &.dropdown-input-image-pm {
        padding-left: 37px;
    }

    &.dropdown-input-image-without-text-transparent,
    &.multiple-input-values {
        color: $input-transparent-color;
    }

    &.input-32-font-20 {
        font-weight: 700;
        font-size: 20px;
    }

    &.details-pages {
        height: 32px;
        background: $default-focus-input;
        color: $default-focus-placeholder;

        .input-dropdown-arrow:hover {
            background: $default-focus-input;
        }

        &:hover {
            background: $default-focus-input;
        }

        &::-webkit-input-placeholder {
            color: $default-focus-placeholder;
        }
        &::-moz-placeholder {
            color: $default-focus-placeholder;
        }

        &:-ms-input-placeholder {
            color: $default-focus-placeholder;
        }

        &::-ms-input-placeholder {
            color: $default-focus-placeholder;
        }

        &::placeholder {
            color: $default-focus-placeholder;
        }
    }

    &.disable-select-on-focus-out {
        &::-moz-selection {
            background-color: transparent;
        }
        &::selection {
            background-color: transparent;
        }
    }

    &.hide-placeholder-in-multiple-placeholder-input {
        &::-webkit-input-placeholder {
            opacity: 0;
            color: $input-transparent-color;
        }
        &::-moz-placeholder {
            opacity: 0;
            color: $input-transparent-color;
        }
        &:-ms-input-placeholder {
            opacity: 0;
            color: $input-transparent-color;
        }
        &::-ms-input-placeholder {
            opacity: 0;
            color: $input-transparent-color;
        }
        &::placeholder {
            opacity: 0;
            color: $input-transparent-color;
        }
    }

    // Multiple Input Placeholders
    &.multiple-input-placeholder {
        pointer-events: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    // Multiple Items
    &.load-dispatches-ttd,
    &.load-broker,
    &.load-shipper,
    &.load-shipper-contact {
        position: absolute;
        bottom: 1.5px;
        background-color: $input-transparent-color;
        display: grid;
        align-items: center;

        span {
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }
    }

    &.double-text-dropdown {
        position: absolute;
        top: 50%;
        transform: translateY(-48%);
        background-color: transparent;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-right: 26px;

        span {
            &:last-child {
                .multiple-input-text {
                    color: $bw5;
                    font-size: 11px;
                    font-weight: 400;

                    &.focusable-text {
                        color: $ta-blue-7;
                        font-size: 11px;
                        font-weight: 400;
                    }
                }
            }

            &.focusable-text {
                color: $ta-blue-7;
            }
        }
    }

    &.load-dispatches-ttd {
        grid-template-columns: repeat(2, 156px) 150px 122px;
        padding-top: 3px;
        svg {
            height: 16px;
            width: 44px;

            path {
                fill: $valid-placholderText;
            }
        }

        span {
            &:nth-child(1),
            &:nth-child(2) {
                .multiple-input-text {
                    max-width: 70px;
                    overflow: hidden;
                    white-space: nowrap;
                    text-overflow: ellipsis;
                }
            }

            &:nth-child(3) {
                .multiple-input-text {
                    max-width: 100px;
                    overflow: hidden;
                    white-space: nowrap;
                    text-overflow: ellipsis;
                }
            }

            &:last-child {
                justify-content: flex-end;
                .multiple-input-text {
                    color: $valid-placholderText !important;
                    font-size: 11px;
                    font-weight: 400;
                    line-height: 24px;

                    &.focusable-text {
                        color: $ta-blue-7;
                        font-size: 11px;
                        font-weight: 400;
                    }
                }
            }

            &.focusable-text {
                color: $ta-blue-7;
            }

            span {
                line-height: 23px;
                position: relative;
            }
        }

        .focusable-svg {
            svg {
                #Ellipse_9856,
                #Ellipse_9857,
                #Ellipse_9858,
                path {
                    fill: $ta-blue-7;
                }
            }
        }

        .focusable-image {
            opacity: 0.6;
        }

        .trailerContainer {
            width: max-content !important;
            padding: 0px !important;
            margin: 0px !important;
        }
    }

    &.payroll-deduction-truck {
        .focusable-svg {
            svg {
                #Ellipse_9856,
                #Ellipse_9857,
                #Ellipse_9858,
                path {
                    fill: $ta-blue-7;
                }
            }
        }
    }

    &.load-broker {
        display: grid;
        grid-template-columns: 229px 115px 48px;
        align-items: center;
        height: 24px;

        span {
            &:nth-child(1) {
                white-space: nowrap;
                text-overflow: ellipsis;
                overflow: hidden;
            }

            &:nth-child(2),
            &:nth-child(3) {
                justify-content: flex-end;
            }

            &:nth-child(3) {
                .multiple-input-text {
                    &.counter {
                        max-width: -webkit-max-content;
                        max-width: -moz-max-content;
                        max-width: max-content;
                        height: 18px;
                        border-radius: 30px;
                        text-align: center;
                        font-size: 11px;
                        font-weight: 400;
                        color: $bw5;
                        background-color: $dark-2;
                        padding: 1px 6px;

                        &.counter-focus {
                            color: $ta-blue-7;
                            background-color: $ta-blue-10;
                        }

                        &.counter-one {
                            max-width: none !important;
                            width: 19px !important;
                        }
                    }
                }
                position: relative;
                bottom: 1px;
            }
        }
    }

    &.load-broker-contact,
    &.load-shipper-contact {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background-color: transparent !important;
        display: grid;
        align-items: center;
        grid-template-columns: 165px 94px;
        align-items: center;
        grid-column-gap: 20px;
        -moz-column-gap: 20px;
        column-gap: 20px;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        height: 25px;
        padding-right: 35px;

        span {
            overflow: hidden;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            span {
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
            &:nth-child(2) {
                justify-self: flex-end;
                font-size: 11px;
                font-weight: 400;
                line-height: 24px;
                span {
                    color: $valid-placholderText !important;
                }
            }
        }
    }

    &.text-suffix {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background-color: transparent !important;
        display: flex;
        align-items: center;
        column-gap: 4px;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        height: 25px;
        padding-right: 35px;

        span {
            overflow: hidden;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            span {
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
            &:nth-child(2) {
                justify-self: flex-end;
                font-size: 14px;
                font-weight: 400;
                line-height: 18px;
                span:not(.focusable-text) {
                    color: $valid-placholderText !important;
                }

                span:not(.focusable-text)::before {
                    content: '• ';
                }

                span {
                    &.ca-add-dot {
                        &::before {
                            content: '• ';
                        }
                    }
                }
            }
        }
    }

    &.load-shipper-contact {
        grid-template-columns: 283px 38px;
    }

    &.load-shipper {
        grid-template-columns: 394px 180px;
        -moz-column-gap: 2px;
        column-gap: 2px;
        padding-right: 25px;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        height: 25px;

        span {
            &:nth-child(2),
            &:nth-child(3) {
                justify-content: flex-end;
                font-size: 11px;
                color: $valid-placholderText !important;
                font-weight: 400;
            }

            &:nth-child(2) {
                span {
                    color: $valid-placholderText !important;

                    &.focusable-text {
                        color: $ta-blue-7;
                    }
                }
            }

            &:nth-child(3) {
                .multiple-input-text {
                    &.counter {
                        max-width: -webkit-max-content;
                        max-width: -moz-max-content;
                        max-width: max-content;
                        height: 18px;
                        border-radius: 30px;
                        text-align: center;
                        font-size: 11px;
                        font-weight: 400;
                        color: $bw5;
                        background-color: $dark-2;
                        padding: 1px 6px;
                        position: relative;
                        bottom: 1px;

                        &.counter-focus {
                            color: $ta-blue-7;
                            background-color: $ta-blue-10;
                        }

                        &.counter-one {
                            max-width: none !important;
                            width: 19px !important;
                        }
                    }
                }
            }
        }

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

    &.cursor-on-right-side {
        text-align: right;
        padding-right: 32px;
    }

    &.merge-dropdown-body-with-input {
        &::-webkit-input-placeholder {
            color: $grey-6;
        }

        &::-moz-placeholder {
            color: $grey-6;
        }

        &:-ms-input-placeholder {
            color: $grey-6;
        }

        &::-ms-input-placeholder {
            color: $grey-6;
        }

        &::placeholder {
            color: $grey-6;
        }
    }
    // -------------------
    &.input-commands {
        background-color: $default-focus-input !important;
        color: $default-focus-content !important;

        &.blue-commands {
            background-color: $default-focus-input-blue-commands !important;
        }
    }

    &.dropdown-label-active {
        background-color: $default-focus-input !important;
        color: $default-focus-content !important;
    }

    &.dispatch-dropdown {
        width: calc(100% - 24px);
        background-color: $ta-black-2 !important;
    }
}

//------------------------- Input Number Hide Arrows -------------------------
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0 !important;
}

input[type='number']::-webkit-inner-spin-button:hover,
input[type='number']::-webkit-outer-spin-button:hover,
input[type='number']::-webkit-inner-spin-button:focus,
input[type='number']::-webkit-outer-spin-button:focus {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0 !important;
}

// This is to hide number default
input[type='number'] {
    -moz-appearance: textfield !important;
}
input[type='number']:hover,
input[type='number']:focus {
    -moz-appearance: textfield !important;
}

.load-dispatches-ttd-owner {
    position: absolute;
    left: 13px;
    bottom: 7px;
    width: 10px;
    height: 10px;

    svg {
        width: 10px !important;
        height: 10px !important;
    }
}

.time-picker-opacity {
    opacity: 1 !important;
}

.dispatch-history-default-color {
    background: $ta-light-grey-5 !important;
    transition: background 0.3s ease-in-out;
}

.dispatch-history-row-hover {
    background: $bw2 !important;
    transition: background 0.3s ease-in-out;
}
