/* Category drill-down picker
   Injected on admin pages by system/category_drilldown.ocmod.xml
   Replaces the type-to-search category autocomplete with a scrollable,
   searchable drill-down dropdown. */

.category-drilldown {
    position: relative;
    display: inline-block;
    width: 100%;
}

.cd-toggle {
    text-align: left;
}

.cd-toggle .fa {
    margin-right: 6px;
}

.cd-panel {
    position: absolute;
    z-index: 1050;
    left: 0;
    top: 100%;
    width: 100%;
    min-width: 320px;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}

.cd-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid #eee;
    min-height: 40px;
}

.cd-back {
    flex: 0 0 auto;
}

.cd-breadcrumb {
    flex: 1 1 auto;
    font-size: 12px;
    color: #777;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cd-search {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.cd-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 260px;
    overflow-y: auto;
}

.cd-list li {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid #f4f4f4;
}

.cd-list li:hover {
    background: #f8f8f8;
}

.cd-name {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 8px;
}

.cd-actions {
    flex: 0 0 auto;
    white-space: nowrap;
}

.cd-actions .btn {
    margin-left: 4px;
}

.cd-choose {
    min-width: 64px;
}

.cd-empty,
.cd-loading {
    padding: 12px 8px;
    color: #999;
    font-size: 12px;
}

.cd-none {
    font-style: italic;
    color: #777;
}
