/*!
 * jQuery ComboTree Plugin 
 * Author:  Erhan FIRAT
 * Mail:    erhanfirat@gmail.com
 * Licensed under the MIT license
 * Version: 1.3.1
 */

:root {
  --ct-bg: #fff;
  --ct-border-color: #e1e1e1;
  --ct-border-radius: 0.5rem;
  --ct-tree-hover: #efefef;
  --ct-selection: #418eff;
  --ct-padding: 0.5rem;
}

.ct-wrapper {
  position: relative;
  text-align: left !important;
  box-sizing: border-box;
}

.ct-wrapper * {
  box-sizing: border-box !important;
}

.ct-input-wrapper {
  position: relative;
}

.ct-input-box {
  /* Right padding clears BOTH trailing buttons (arrow + the single-select "×"),
     so a long ledger name never runs underneath them. */
  padding: var(--ct-padding) 3rem var(--ct-padding) var(--ct-padding);
  /* border-radius: var(--ct-border-radius); */
  border: 1px solid var(--ct-border-color);
  width: 100%;
}

.ct-arrow-btn {
  position: absolute;
  right: 0px;
  bottom: 0px;
  top: 0px;
  padding: 0.5rem;
  border: none;
  background: none;
  cursor: pointer;
}
.ct-arrow-btn:hover {
  color: var(--ct-selection);
}
.ct-arrow-btn:active {
  color: var(--ct-selection);
}
/* General-sibling (~), not adjacent (+): on a single-select picker the "×"
   clear button is inserted between the input and the arrow button, so an
   adjacent-sibling selector would stop matching the arrow entirely. */
.ct-input-box:focus ~ .ct-arrow-btn {
  color: var(--ct-selection);
}
/* Mirror the wrapped <input>'s own disabled look onto the arrow button beside
   it — the button is a separate element the input's native disabled styling
   never reaches, and the plugin JS guards its click handler on the input's
   disabled state to match. */
.ct-input-box:disabled ~ .ct-arrow-btn {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Clear ("×") button — single-select pickers only, and only while something is
   selected (JS toggles display). Sits in its own slot to the left of the arrow
   button, which is pinned to right:0 and ~1.5rem wide. */
.ct-clear-btn {
  position: absolute;
  right: 1.5rem;
  top: 0px;
  bottom: 0px;
  padding: 0.5rem 0.25rem;
  border: none;
  background: none;
  cursor: pointer;
  line-height: 1;
  color: #999;
  display: none;
}
.ct-clear-btn:hover {
  color: var(--ct-selection);
}
/* A disabled field has nothing the user may clear — hide rather than dim, so a
   read-only form shows no dead control. !important beats the inline display
   the JS toggle writes. */
.ct-input-box:disabled ~ .ct-clear-btn {
  display: none !important;
}

.ct-drop-down-container,
.ct-drop-down-container *,
.ct-arrow-btn {
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE10+/Edge */
  user-select: none; /* Standard */
}

.ct-drop-down-container {
  display: none;
  background: var(--ct-bg);
  border: 1px solid var(--ct-border-color);
  position: absolute;
  width: 100%;
  z-index: 999;
  max-height: 250px;
  overflow-y: auto;
  box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.3);
}

.ct-drop-down-container ul {
  padding: 0;
  margin: 0;
}

.ct-drop-down-container li {
  list-style-type: none;
  padding-left: 0;
  cursor: pointer;
}

.ct-drop-down-container .ct-item-parent li {
  padding-left: 1rem;
}

.ct-drop-down-container li .not-selectable {
  color: #777;
}

/* Per-node group/leaf/locked icon (prepended by appInitPickers). Slightly
   smaller than the label so it reads as an affordance, not part of the name. */
.ct-drop-down-container .ct-tree-item-icon {
  font-size: 0.85rem;
}

/* One-shot pulse drawing the eye to a pre-selected node when the dropdown is
   first opened on an edit form. Removed by JS once it has played. */
.ct-drop-down-container span.ct-list-item-title.ct-highlight-selected {
  animation: ct-pulse-selected 1.5s ease-out;
  border-radius: 2px;
}
@keyframes ct-pulse-selected {
  0% {
    background-color: var(--ct-selection);
    color: var(--ct-bg);
  }
  100% {
    background-color: transparent;
    color: inherit;
  }
}

.ct-drop-down-container li:hover {
  background-color: var(--ct-tree-hover);
}
.ct-drop-down-container li:hover ul {
  background-color: var(--ct-bg);
}
.ct-drop-down-container li span.ct-list-item-title.ct-tree-item-hover,
.ct-drop-down-container label.ct-tree-item-hover {
  background-color: var(--ct-selection);
  color: var(--ct-bg);
  border-radius: 2px;
}
.ct-drop-down-container
  li
  span[data-selectable="false"].ct-list-item-title.ct-tree-item-hover,
.ct-drop-down-container label.ct-tree-item-hover {
  background-color: var(--ct-border-color);
  color: #777;
  cursor: default;
}

span.ct-list-item-title,
.ct-drop-down-container .select-all {
  display: block;
  padding: 0.25rem 1rem;
  margin-left: 1rem;
}
.ct-drop-down-container label {
  cursor: pointer;
  width: 100%;
  display: block;
}
.ct-drop-down-container .ct-list-item-title input,
.ct-drop-down-container .select-all input {
  position: relative;
  top: 2px;
  margin: 0px 4px 0px 0px;
}

.ct-parent-plus {
  position: absolute;
  display: inline-block;
  width: 1rem;
  padding-top: 0.25rem;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  text-align: center;
}

.ct-input-box:focus {
  border: 1px solid var(--ct-selection);
  outline-width: 0;
}

.ct-drop-down-container input.ct-multiples-filter {
  width: 100%;
  padding: var(--ct-padding);
  border: none;
  border-bottom: 1px solid var(--ct-border-color);
}

.ct-no-items-found {
  padding: 0.5rem 1rem;
  color: #999;
  font-style: normal;
  text-align: center;
}
