/* Shared Tagify chip strip + picker (history, offline, chat, visitors, visitors-history) */
/* loaded in index.html */
.history-chat-labels-section .history-chat-labels-tagify.tagify {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.001rem;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
  min-height: 0 !important;
}
.history-chat-labels-section .history-chat-labels-tagify.tagify:focus,
.history-chat-labels-section .history-chat-labels-tagify.tagify:focus-within,
.history-chat-labels-section .history-chat-labels-tagify.tagify:hover {
  border: none !important;
  box-shadow: none !important;
}
.history-chat-labels-section .tagify_tag_big_onwc {
  padding: 0.105rem 0.1rem;
  line-height: 1.57rem;
  cursor: default;
}
.history-chat-labels-section .tagify_tag_big_onwc .tagify__tag-text {
  font-size: 0.88rem;
  font-weight: 500;
}
.history-chat-labels-section .history-label-tag.tagify__tag > div::before {
  background: var(--hl-tag-bg, #607d8b) !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08) inset !important;
}
.history-label-picker .history-label-picker-tags .history-label-tag.tagify__tag {
  cursor: pointer;
}
.history-label-picker .history-label-picker-tags .tagify__tag__removeBtn.invisible {
  inline-size: 4px !important;
  min-inline-size: 4px !important;
  width: 4px !important;
  min-width: 4px !important;
  pointer-events: none !important;
  flex-shrink: 0 !important;
  opacity: 0 !important;
}
.history-label-picker .history-label-picker-tags .tagify__tag__removeBtn.invisible::after {
  display: none !important;
}
.history-chat-labels-section .history-label-tag.tagify__tag .tagify__tag-text {
  color: var(--hl-tag-fg, #ffffff) !important;
}
.history-chat-labels-section .history-label-tag.tagify__tag .tagify__tag__removeBtn {
  color: var(--hl-tag-fg, #ffffff) !important;
}
.history-chat-labels-section .history-label-tag.tagify__tag .tagify__tag__removeBtn:hover {
  color: var(--hl-tag-fg, #ffffff) !important;
}
.history-chat-labels-section .history-label-add-chip {
  margin-left: 5px;
  line-height: 1;
  padding: 0.22rem 0.42rem;
  gap: 0.001rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  color: var(--bs-body-color, #212529);
  background-color: transparent;
}
.history-chat-labels-section .history-label-add-chip .history-label-add-chip-icon {
  font-size: 1rem;
  line-height: 1;
  vertical-align: middle;
}
.history-chat-labels-section .history-label-add-chip:hover {
  border-color: var(--bs-primary, #696cff);
  color: var(--bs-primary, #696cff);
}
[data-bs-theme="dark"] .history-chat-labels-section .history-label-add-chip {
  border-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.92);
}
[data-bs-theme="dark"] .history-chat-labels-section .history-label-add-chip:hover {
  border-color: var(--bs-primary, #696cff);
  color: var(--bs-primary, #73a6ff);
}
.history-label-picker .history-label-picker-inner {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.5rem;
  padding: 0.5rem 0.65rem;
  background-color: var(--bs-body-bg, #fff);
  display: flex;
  flex-direction: column;
}
[data-bs-theme="dark"] .history-label-picker .history-label-picker-inner {
  border-color: rgba(255, 255, 255, 0.12);
  background-color: rgba(255, 255, 255, 0.04);
}
.history-label-picker .history-label-picker-tags {
  max-height: 180px;
  overflow: hidden;
  position: relative;
}
.history-label-picker-inner-header {
  margin: -0.25rem -0.25rem 0.1rem 0;
  line-height: 0;
  min-height: 0;
}
.history-label-picker-close {
  line-height: 1 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.history-label-picker-close .ri {
  font-size: 0.99rem;
  line-height: 1;
}
.history-label-picker-close:hover,
.history-label-picker-close:focus {
  color: var(--bs-body-color, #212529) !important;
}
[data-bs-theme="dark"] .history-label-picker-close:hover,
[data-bs-theme="dark"] .history-label-picker-close:focus {
  color: rgba(255, 255, 255, 0.9) !important;
}
.history-label-picker .history-label-picker-tags .history-label-tag.tagify__tag:hover > div::before {
  filter: brightness(1.08);
}

/* Visitor list + visitors history: wrapped rows of <label-chip> (must live here — index.html does not load css/pages/visitors.css) */
.visitor-list-label-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0;
}

/* Visitors history table name column: nowrap on <td> prevented chip wrapping */
table.datatables-history td.visitors-history-visitor-cell {
  white-space: normal;
  vertical-align: middle;
}

/* Shared label filter dropdown trigger + compact clear action */
.owc-labels-filter-trigger-btn {
  min-height: calc(2.25rem + 2px);
  font-size: 0.9375rem;
  display: inline-flex;
  align-items: center;
}

.owc-labels-filter-clear-btn {
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  line-height: 1;
  border-color: rgba(var(--bs-secondary-rgb), 0.28);
  color: var(--bs-secondary-color, var(--bs-secondary));
  background-color: rgba(var(--bs-secondary-rgb), 0.08);
}

.owc-labels-filter-clear-btn:hover,
.owc-labels-filter-clear-btn:focus,
.owc-labels-filter-clear-btn:active {
  color: var(--bs-secondary-color, var(--bs-secondary));
  background-color: rgba(var(--bs-secondary-rgb), 0.14);
  border-color: rgba(var(--bs-secondary-rgb), 0.38);
}

/* Labels filter dropdown list - Perfect Scrollbar above clickable items */
.owc-labels-filter-scroll.ps {
  position: relative;
}
.owc-labels-filter-scroll.ps > .ps__rail-y {
  z-index: 10;
  pointer-events: none;
  opacity: 1 !important;
  display: block !important;
}
.owc-labels-filter-scroll.ps > .ps__rail-y > .ps__thumb-y {
  z-index: 11;
  pointer-events: auto;
  opacity: 1 !important;
}
.owc-labels-filter-scroll .dropdown-item {
  position: relative;
}
