/* Timeline widget */

#datasearch .panel {
    margin-bottom: 5px;
}

#datasearch .panel .panel-heading {
    padding: 5px 5px;
}

#datasearch .panel .panel-heading .panel-title {
    font-size: 13px;
}

#datasearch #timeline_results {
    display: inline-block;
    height: 200px;
    width: 100%;
}

#datasearch .timeline-toggle > i::after {
    /* Non-breaking space */
    content: "\a0";
}

/* Search bar */

#datasearch .row .form-group {
    margin-bottom: 5px;
}

#datasearch #datasearch_search_bar .label-xs {
    font-size: 80%;
}

.ui-autocomplete {
    max-height: 200px;
    overflow-x: hidden;
    overflow-y: auto;
    position: fixed;
}

.ui-autocomplete-category {
    color: #999;
    font-weight: bold;
    line-height: 1.42857;
    margin: 0;
    padding: 5px 6px;
}

.ui-autocomplete > li.datasearch-field {
    color: #333;
    line-height: 1.42857;
    padding: 3px 20px;
}

.ui-autocomplete > li.datasearch-field:hover {
    background-color: #428BCA;
    color: #FFF;
}

.ui-autocomplete > .history-query-delete {
    border: none;
    color: #d9534f;  /* Bootstrap red */
    float: left;
    font-size: 1.1em;
    line-height: 1.42857;
    padding-left: 10px;
    padding-right: 10px;
}

#datasearch #datasearch_search_bar {
    margin-bottom: 5px;
    padding-right: 10px;
    padding-top: 0;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    #datasearch #datasearch_search_bar {
        position: static;
    }
}

/* Results table */

#datasearch .hl {
    background-color: #A8F2FD;
    color: #333;
}

#datasearch .selected, #datasearch .selected .hl {
    background-color: #FDE9A8;
    color: #333;
}

#datasearch table img {
    margin: 0 2px;
}

#datasearch #datasearch_table.table-nowrap tr.jqgrow > td {
    white-space: nowrap;
}

#datasearch #datasearch_table .expert-mode {
    display: none;
}

#datasearch #datasearch_table.table-expert .expert-mode {
    display: block;
}

#datasearch #datasearch_table.table-expert .basic-mode {
    display: none;
}

/* Subgrid details */

#datasearch .tablediv {
    line-height: 0;
}

#datasearch .subgrid-data table.subgrid {
    background: none;
    margin-bottom: 0;
    table-layout: auto;
}

#datasearch #datasearch_table .ui-jqgrid .ui-subgrid > td {
    white-space: normal;
}

#datasearch table.subgrid td.field,
#datasearch table.subgrid td.filter {
    white-space: nowrap;
    width: 1%;
}

#datasearch table.subgrid td.field i {
    opacity: .4;
}

#datasearch table.subgrid td.filter i {
    cursor: pointer;
}

/*
 * IDMEF OBJECT
 */

#datasearch table ul:hover .dp-1000 {
    display: block;
    visibility: visible;
}

#datasearch table ul .dp-1000 {
    display: none;
    visibility: hidden;
}

#datasearch table ul {
    margin-bottom: 0;
    padding-left: 0;
}

#datasearch table ul li {
    display: inline;
}

/*
 * No label on the first ul
 */

#datasearch table td > ul:first-child:not(:last-child):after {
    content: " ";
}

#datasearch table li:not(:last-child):after {
    content: " ";
}

#datasearch table ul:not(:first-child):before {
    content: " (";
}

#datasearch table ul:not(:first-child):after {
    content: ")";
}

#datasearch table label {
    margin-bottom: 0;
}

#datasearch table ul > li.text > label {
    display: none;
}

#datasearch table label.assessment,
#datasearch table label.impact {
    display: none;
}

#datasearch table ul.impact:before,
#datasearch table ul.impact:after {
    content: "";
}

#datasearch table ul.list > ul.object > label,
#datasearch ul.user_id > label {
    display: none;
}

#datasearch table ul {
    display: inline;
}

#datasearch table ul.source + ul.source,
#datasearch table ul.target + ul.target {
    border-top: 1px dashed gray;
    display: block;
}

#datasearch table ul.source:first-child,
#datasearch table ul.target:first-child {
    border-top: 0;
}

#datasearch table td > ul > label {
    display: none;
}

/* One click action */

#datasearch #PopoverOption {
    display: none;
    position: fixed;
    word-wrap: break-word;
    z-index: 100;
}

#datasearch #PopoverOption .popover {
    display: block;
    font-size: small;
}

#datasearch #PopoverOption .popover .top > .arrow {
    border-bottom-width: 1px;
}

#datasearch #PopoverOption .popover .bottom > .arrow {
    border-top-width: 11px;
}

#datasearch .dropdown-submenu {
    width: 100%;
}

#datasearch .dropdown-submenu > .dropdown-menu {
    font-size: small;
    margin-left: -1px;
    margin-top: -6px;
    max-width: inherit;
    top: 0;
}

#datasearch .dropdown-submenu.disabled:hover > .dropdown-menu {
    display: none;
}

#datasearch .popover.menu-left .dropdown-submenu > a:before {
    border-color: transparent;
    border-right-color: #ccc;
    border-style: solid;
    border-width: 5px 5px 5px 0;
    content: " ";
    display: block;
    float: left;
    height: 0;
    margin-left: -10px;
    margin-top: 5px;
    width: 0;
}

#datasearch .popover.menu-left .dropdown-submenu > a:after {
    all: unset;
}

#datasearch .popover.menu-left .dropdown-submenu > a {
    text-align: right;
}

/* Informations div content */

#datasearch .oca-infos > .dropdown-menu {
    width: fit-content;
}

#datasearch .oca-infos .ajax-spinner {
    transform: translate(-50%, 0);
}

#datasearch .oca-infos .panel-heading {
    padding: 5px 15px;
    text-align: center;
}

#datasearch .oca-infos .panel-body {
    padding: 0;
}

#datasearch .oca-infos .tab-content {
    max-height: 300px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 5px;
}

#datasearch .oca-infos .tab-content .panel {
    margin: 0;
    padding: 0;
}

#datasearch .oca-infos .tab-content table {
    margin-bottom: 0;
}

#datasearch .oca-infos .tab-content table td {
    line-height: inherit;
    vertical-align: middle;
}

#datasearch .oca-infos .tab-content table ul li {
    display: block;
}

#datasearch .oca-infos .nav > li > a {
    padding: 5px 15px;
}

#datasearch_groupby .select2-selection {
    height: 20px;
}

#datasearch_groupby ul.select2-selection__rendered > li {
    float: none;
    display: inline-block;
}

#datasearch_groupby ul.select2-selection__rendered {
    text-overflow: clip;
}

#datasearch_groupby ul.select2-selection__rendered:hover {
    overflow: auto;
}
