/* ------------------------------------------------------------------
 * LocalBizz - Searchable multiselect dropdown (select2-style)
 * Progressive enhancement for taxonomy checklists on the front-end
 * submit form, the admin listing editor, and the Service Type term
 * page. The real checkboxes stay in the DOM (moved into the panel),
 * so form submission and the category -> service-type dependency are
 * untouched. Styled to match the theme's native "Add Category" field.
 * ------------------------------------------------------------------ */

.lbduh-dropdown {
   position: relative;
   width: 100%;
   max-width: 100%;
   font-size: 14px;
   box-sizing: border-box;
}
.lbduh-dropdown * { box-sizing: border-box; }

/* The visible box (mirrors select2 selection box) */
.lbduh-dropdown__control {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   gap: 5px;
   min-height: 44px;
   width: 100%;
   padding: 6px 34px 6px 10px;
   background: #fff;
   border: 1px solid #e2e4e7;
   border-radius: 8px;
   cursor: pointer;
   position: relative;
   transition: border-color .15s ease, box-shadow .15s ease;
}
.lbduh-dropdown__control:hover { border-color: #cfd2d6; }
.lbduh-dropdown.is-open .lbduh-dropdown__control {
   border-color: #ED5548;
   box-shadow: 0 0 0 3px rgba(237,85,72,.12);
}

.lbduh-dropdown__placeholder {
   color: #9aa0a6;
   padding: 4px 2px;
   line-height: 1.4;
}

/* Selected items as removable pills */
.lbduh-tag {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   max-width: 100%;
   padding: 4px 9px;
   font-size: 13px;
   line-height: 1.3;
   color: #333;
   background: #f2f3f5;
   border: 1px solid #e2e4e7;
   border-radius: 6px;
}
.lbduh-tag__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbduh-tag__x {
   flex: 0 0 auto;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 16px; height: 16px;
   font-size: 14px;
   line-height: 1;
   color: #8a9098;
   border-radius: 50%;
   cursor: pointer;
}
.lbduh-tag__x:hover { color: #fff; background: #ED5548; }

.lbduh-dropdown__caret {
   position: absolute;
   right: 12px;
   top: 50%;
   margin-top: -3px;
   width: 0; height: 0;
   border-left: 5px solid transparent;
   border-right: 5px solid transparent;
   border-top: 6px solid #9aa0a6;
   transition: transform .15s ease;
   pointer-events: none;
}
.lbduh-dropdown.is-open .lbduh-dropdown__caret { transform: rotate(180deg); }

/* The dropdown panel */
.lbduh-dropdown__panel {
   position: absolute;
   z-index: 99999;
   top: calc(100% + 5px);
   left: 0;
   width: 100%;
   min-width: 240px;
   background: #fff;
   border: 1px solid #e2e4e7;
   border-radius: 8px;
   box-shadow: 0 10px 30px rgba(0,0,0,.14);
   display: none;
   overflow: hidden;
}
.lbduh-dropdown.is-open .lbduh-dropdown__panel { display: block; }

.lbduh-dropdown__search-wrap { padding: 8px; border-bottom: 1px solid #f0f1f3; }
.lbduh-dropdown__search {
   width: 100%;
   padding: 8px 11px;
   border: 1px solid #e2e4e7;
   border-radius: 6px;
   font-size: 13px;
   outline: none;
   background: #fff;
}
.lbduh-dropdown__search:focus { border-color: #ED5548; }

.lbduh-dropdown__list {
   max-height: 260px;
   overflow-y: auto;
   margin: 0 !important;
   padding: 5px !important;
   list-style: none !important;
}
.lbduh-dropdown__list > li {
   margin: 0 !important;
   padding: 7px 9px !important;
   border-radius: 6px;
   list-style: none !important;
   cursor: pointer;
}
.lbduh-dropdown__list > li:hover { background: #fbe9e7; }
.lbduh-dropdown__list > li.lbduh-checked { background: #f6f7f8; }
.lbduh-dropdown__list label { cursor: pointer; margin: 0; font-weight: normal; }

.lbduh-dropdown__list > li.lbduh-hidden-search { display: none !important; }
.lbduh-dropdown__list > li.lbduh-hidden-dep { display: none !important; }

.lbduh-dropdown__empty {
   display: none;
   padding: 14px;
   text-align: center;
   color: #9aa0a6;
   font-size: 13px;
}
.lbduh-dropdown.is-no-results .lbduh-dropdown__empty { display: block; }
.lbduh-dropdown.is-no-results .lbduh-dropdown__list { display: none; }

/* Hide the source container we harvested from (term page) */
.lbduh-source-hidden { display: none !important; }

/* Admin term page: keep it inside the table cell width */
.term-php .lbduh-dropdown, .post-type-business_listing .lbduh-dropdown { max-width: 520px; }
