/* =========================================
   CRM SEARCH WRAPPER
========================================= */

.crm-search-wrapper {
    position: relative;
    width: 430px;
}


/* =========================================
   SEARCH BOX
========================================= */

.crm-search-box {
    width: 100%;
    height: 46px;

    display: flex;
    align-items: center;

    background: #fff;

    border: 1px solid #e1e5eb;
    border-radius: 10px;

    padding: 0 10px;

    transition: .2s;
}

.crm-search-box:focus-within {
    border-color: #0d6efd;

    box-shadow:
        0 0 0 3px rgba(13, 110, 253, .08);
}


/* =========================================
   SEARCH ICON
========================================= */

.crm-search-icon {
    color: #6c757d;

    font-size: 20px;

    margin-right: 8px;

    flex-shrink: 0;
}


/* =========================================
   CUSTOMER / ENQUIRY SELECT
========================================= */

.crm-search-select {
    height: 32px;

    min-width: 105px;

    border: 0;

    border-right: 1px solid #e3e6ea;

    outline: 0;

    background-color: transparent;

    color: #343a40;

    font-size: 12px;

    font-weight: 600;

    padding: 0 10px 0 0;

    cursor: pointer;

    flex-shrink: 0;
}

.crm-search-select:focus {
    outline: none;
    box-shadow: none;
}


/* =========================================
   SEARCH INPUT
========================================= */

.crm-search-input {
    flex: 1;

    min-width: 0;

    height: 100%;

    border: 0 !important;

    outline: 0 !important;

    background: transparent !important;

    box-shadow: none !important;

    padding: 0 10px;

    font-size: 13px;

    color: #212529;
}

.crm-search-input::placeholder {
    color: #9ca3af;
}


/* =========================================
   CLEAR BUTTON
========================================= */

.crm-search-clear {
    display: none;

    width: 25px;

    height: 30px;

    border: 0;

    background: transparent;

    color: #9ca3af;

    font-size: 18px;

    cursor: pointer;

    padding: 0;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;
}

.crm-search-clear:hover {
    color: #495057;
}


/* =========================================
   JQUERY UI AUTOCOMPLETE
========================================= */

.crm-search-wrapper .ui-autocomplete {

    position: absolute !important;

    top: calc(100% + 8px) !important;

    left: 0 !important;

    width: 100% !important;

    max-height: 620px;

    overflow-y: auto;

    overflow-x: hidden;

    padding: 0 !important;

    margin: 0 !important;

    background: #fff !important;

    border: 1px solid #e5e7eb !important;

    border-radius: 12px !important;

    box-shadow:
        0 15px 40px rgba(0, 0, 0, .12) !important;

    z-index: 999999 !important;

    list-style: none !important;
}


/* =========================================
   SCROLLBAR
========================================= */

.crm-search-wrapper .ui-autocomplete::-webkit-scrollbar {
    width: 5px;
}

.crm-search-wrapper .ui-autocomplete::-webkit-scrollbar-track {
    background: transparent;
}

.crm-search-wrapper .ui-autocomplete::-webkit-scrollbar-thumb {
    background: #d9dee5;
    border-radius: 10px;
}


/* =========================================
   JQUERY UI DEFAULT RESET
========================================= */

.crm-search-wrapper .ui-menu {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.crm-search-wrapper .ui-menu-item {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.crm-search-wrapper .ui-menu-item-wrapper {
    padding: 10px !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit !important;
    font-weight: normal !important;
}


/* =========================================
   KEYBOARD SELECTED ITEM
========================================= */

.crm-search-wrapper
.ui-menu-item-wrapper.ui-state-active {
    padding: 10px !important;
    margin: 0 !important;
    border: 0 !important;

    background: #f1f6ff !important;
    color: inherit !important;
}


/* Keyboard selected result */

.crm-search-wrapper
.ui-menu-item-wrapper.ui-state-active
.crm-auto-result {
    background: #f1f6ff !important;
}


/* Keyboard selected name */

.crm-search-wrapper
.ui-menu-item-wrapper.ui-state-active
.crm-auto-name {
    color: #0d6efd !important;
}


/* Keyboard selected icon */

.crm-search-wrapper
.ui-menu-item-wrapper.ui-state-active
.crm-auto-icon {
    background: #dceaff !important;
    color: #0d6efd !important;
}


/* Keyboard selected arrow */

.crm-search-wrapper
.ui-menu-item-wrapper.ui-state-active
.crm-auto-arrow {
    color: #0d6efd !important;
}


/* =========================================
   AUTOCOMPLETE RESULT
========================================= */

.crm-auto-result {

    width: 100%;

    min-height: 62px;

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 10px 14px;

    box-sizing: border-box;

    background: #fff;

    border-bottom: 1px solid #edf0f3;

    cursor: pointer;

    transition:
        background .15s ease,
        transform .1s ease;
}


/* Last result */

.crm-search-wrapper
.ui-menu-item:last-child
.crm-auto-result {
    border-bottom: 0;
}


/* Hover */

.crm-search-wrapper
.ui-menu-item:hover
.crm-auto-result {
    background: #f7f9fc;
}


/* =========================================
   RESULT ICON
========================================= */

.crm-auto-icon {

    width: 38px;

    height: 38px;

    min-width: 38px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 9px;

    background: #edf4ff;

    color: #0d6efd;

    font-size: 19px;

    flex-shrink: 0;
}


/* =========================================
   RESULT CONTENT
========================================= */

.crm-auto-content {

    flex: 1;

    min-width: 0;

    overflow: hidden;
}


/* Name */

.crm-auto-name {

    color: #303640;

    font-size: 13px;

    font-weight: 600;

    line-height: 18px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* Mobile + Email */

.crm-auto-meta {

    margin-top: 2px;

    color: #929aa5;

    font-size: 10px;

    line-height: 15px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================================
   RIGHT ARROW
========================================= */

.crm-auto-arrow {

    width: 24px;

    height: 30px;

    display: flex;

    align-items: center;

    justify-content: center;

    color: #555d68;

    font-size: 18px;

    flex-shrink: 0;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1199px) {

    .crm-search-wrapper {
        width: 380px;
    }

}

@media (max-width: 991px) {

    .crm-search-wrapper {
        width: 100%;
    }

}