/* /search category bottom drawer + tree */
.search-cat-drawer-trigger {
    background: #fff;
    border: 1px solid #e2e5ec;
    border-radius: 4px;
    height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 0.5rem;
    cursor: pointer;
}

.search-cat-drawer[hidden] {
    display: none !important;
}

.search-cat-drawer {
    position: fixed;
    inset: 0;
    z-index: 1080;
}

.search-cat-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.search-cat-drawer-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(78vh, 640px);
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.28s ease;
}

.search-cat-drawer.is-open .search-cat-drawer-panel {
    transform: translateY(0);
}

.search-cat-drawer-handle {
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: #d7dbe3;
    margin: 10px auto 0;
}

.search-cat-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 8px;
    border-bottom: 1px solid #eef0f4;
}

.search-cat-drawer-body {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 8px 24px;
}

.search-cat-tree-all {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: #fff5f5;
    color: #e62e04;
    font-weight: 600;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
}

.search-cat-tree-node {
    border-bottom: 1px solid #f3f4f7;
}

.search-cat-tree-row {
    display: flex;
    align-items: center;
    min-height: 44px;
    gap: 2px;
}

.search-cat-tree-toggle,
.search-cat-tree-spacer {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.search-cat-tree-toggle i {
    transition: transform 0.18s ease;
    font-size: 16px;
}

.search-cat-tree-toggle.is-open i {
    transform: rotate(90deg);
}

.search-cat-tree-label {
    flex: 1 1 auto;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 10px 8px 10px 0;
    color: #1f2937;
    min-width: 0;
}

.search-cat-tree-label.is-active {
    color: #e62e04;
    font-weight: 600;
}

.search-cat-tree-children {
    padding-left: 36px;
    background: #fafbfc;
}

.search-cat-tree-children .search-cat-tree-row {
    min-height: 40px;
}

.search-cat-tree-loading,
.search-cat-tree-empty {
    padding: 10px 12px 10px 36px;
    color: #94a3b8;
    font-size: 13px;
}

body.search-cat-drawer-open {
    overflow: hidden;
}
