// ==========================================================================
// Existing Field/Notification Modal
// ==========================================================================

.fui-edit-notification-modal .fui-modal-content,
.fui-edit-field-modal .fui-modal-content {
    flex: 1;
}

// .fui-modal-sidebar {
//     position: absolute;
//     top: 0;
//     left: 0;
//     height: 100%;
//     overflow: auto;
// }

// .fui-edit-field-modal .fui-modal-content {
//     margin-left: 225px;
// }

.fui-existing-item-modal {
    .fui-modal-body {
        // overflow: visible;
    }

    .fui-modal-content,
    .fui-modal-sidebar {
        overflow: auto;
    }
}

.fui-notice-wrap {
    padding: 12px 24px 0;
}

.fui-notice {
    border: 1px solid transparent;
    padding: 0.5rem 0.75rem;
    position: relative;
    border-radius: 4px;
    font-size: 12px;

    &.warning {
        border-color: #f6ad55;
        color: #c05621;
        background: #fffaf0;
    }

    &.error {
        border-color: #ef9898;
        color: #f05053;
        background: #fff6f6;
    }

    &.success {
        border-color: #7ed321;
        color: #65a91a;
        background: #ecf8de;
    }
}

.fui-modal-content-wrap {
    flex: 1;
    display: flex;
    height: 100%;
}

.fui-existing-item-heading-wrap {
    position: relative;
    margin-bottom: 10px;

    &::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        height: 1px;
        background: #e2e8f0;
        transform: translateY(-50%);
    }
}

.fui-existing-item-heading {
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 11px;
    position: relative;
    background: #fff;
    padding-right: 10px;
    z-index: 1;
    color: #98afc5;
}

.fui-existing-item {
    border-radius: 4px;
    border: 2px solid #cbd6e2;
    color: #33475b;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 400;
    background-color: #fff;
    position: relative;
    cursor: pointer;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    z-index: 11;
    user-select: none;
    transition: all 0.2s ease;

    &:hover {
        border-color: darken(#cbd6e2, 10%);
    }

    &.sel {
        border-color: #0D99F2;
        // background: #e1f6ff;
    }

    &.disabled {
        cursor: auto;
        pointer-events: none;

        // Setting the opacity seems to have pretty bad performance implications here.
        // opacity: 1;
        opacity: 0.3;
        // color: #cbd0d4;
        // border-color: #f2f4f7;

        // .fui-existing-item-handle,
        // .fui-existing-item-type {
        //     color: #e5eaef;
        // }
    }
}

.fui-existing-item-wrap {
    max-width: 90%;
}

.fui-existing-item-title {
    font-weight: 500;
    display: block;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.fui-existing-item-handle {
    font-size: 10px !important;
    border-radius: 13px;
    margin-left: 4px;
    line-height: 18px;
    display: inline-block;
    color: #98a6bd;
}

.fui-existing-item-type {
    font-size: 12px;
    color: #8394a5;
    display: block;
    white-space: nowrap;
    text-overflow: ellipsis;
    // max-width: 85%;
    overflow: hidden;
}

.fui-existing-item-right {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.fui-existing-item-icon {
    width: 16px;
    height: 16px;
    margin-left: 10px;

    svg {
        width: 100%;
        height: 100%;
    }
}
