/* Selectize Dark Mode - Color overrides for selectize.bootstrap5.css */

/* Input field dark mode */
[data-bs-theme="dark"] .selectize-input {
  background: #212529 !important;
  border-color: #495057 !important;
  color: #ffffff !important;
}

[data-bs-theme="dark"] .selectize-input:focus {
  background: #212529 !important;
  border-color: #86b7fe !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

[data-bs-theme="dark"] .selectize-input.disabled {
  background-color: #495057 !important;
  opacity: 0.6;
}

/* Dropdown dark mode */
[data-bs-theme="dark"] .selectize-dropdown {
  background: #212529 !important;
  border-color: #495057 !important;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3) !important;
}

[data-bs-theme="dark"] .selectize-dropdown .option,
[data-bs-theme="dark"] .selectize-dropdown .optgroup-option {
  color: #ffffff !important;
}

[data-bs-theme="dark"] .selectize-dropdown .option:hover,
[data-bs-theme="dark"] .selectize-dropdown .optgroup-option:hover {
  background-color: #343a40 !important;
}

[data-bs-theme="dark"] .selectize-dropdown .option.active,
[data-bs-theme="dark"] .selectize-dropdown .optgroup-option.active,
[data-bs-theme="dark"] .selectize-dropdown .option.selected,
[data-bs-theme="dark"] .selectize-dropdown .optgroup-option.selected {
  background-color: #0d6efd !important;
  color: #ffffff !important;
}

[data-bs-theme="dark"] .selectize-dropdown .optgroup-header {
  background: #343a40 !important;
  color: #adb5bd !important;
  border-top-color: #495057 !important;
}

[data-bs-theme="dark"] .selectize-dropdown .create {
  color: #adb5bd !important;
}

[data-bs-theme="dark"] .selectize-dropdown .active.create {
  color: #ffffff !important;
}

/* Multi-select dark mode */
[data-bs-theme="dark"] .selectize-control.multi .selectize-input > div {
  background: #495057 !important;
  color: #ffffff !important;
  border-color: #6c757d !important;
}

[data-bs-theme="dark"] .selectize-control.multi .selectize-input > div.active {
  background: #0d6efd !important;
  color: #ffffff !important;
  border-color: #0d6efd !important;
}

/* Arrow dark mode */
[data-bs-theme="dark"] .selectize-control.single .selectize-input:after {
  border-color: #ffffff transparent transparent transparent !important;
}

[data-bs-theme="dark"] .selectize-control.single .selectize-input.dropdown-active:after {
  border-color: transparent transparent #ffffff transparent !important;
}

/* Error states dark mode */
[data-bs-theme="dark"] .is-invalid .selectize-input {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
}

[data-bs-theme="dark"] .is-invalid .selectize-input:focus {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
}

/* Clear button dark mode */
[data-bs-theme="dark"] .selectize-control.plugin-clear_button .clear {
  color: #ffffff !important;
}

/* Remove button dark mode */
[data-bs-theme="dark"] .selectize-control.plugin-remove_button .item .remove {
  border-left-color: #6c757d !important;
}

[data-bs-theme="dark"] .selectize-control.plugin-remove_button .item .remove:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .selectize-control.plugin-remove_button .item.active .remove {
  border-left-color: transparent !important;
}

/* Loading spinner dark mode */
[data-bs-theme="dark"] .selectize-dropdown .spinner:after {
  border-color: #6c757d transparent #6c757d transparent !important;
}

/* Highlight text dark mode */
[data-bs-theme="dark"] .selectize-dropdown [data-selectable] .highlight {
  background: rgba(255, 237, 40, 0.4) !important;
}

/* Dropdown header dark mode */
[data-bs-theme="dark"] .selectize-dropdown.plugin-dropdown_header .selectize-dropdown-header {
  background: #343a40 !important;
  border-bottom-color: #495057 !important;
  color: #adb5bd !important;
}

[data-bs-theme="dark"] .selectize-dropdown.plugin-dropdown_header .selectize-dropdown-header-close {
  color: #adb5bd !important;
}

[data-bs-theme="dark"] .selectize-dropdown.plugin-dropdown_header .selectize-dropdown-header-close:hover {
  color: #ffffff !important;
}

/* Drag and drop dark mode */
[data-bs-theme="dark"] .selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {
  background: rgba(255, 255, 255, 0.1) !important;
  box-shadow: inset 0 0 12px 4px #212529 !important;
}

/* Auto position dark mode */
[data-bs-theme="dark"] .selectize-dropdown.plugin-auto_position.selectize-position-top {
  border-top-color: #495057 !important;
  border-bottom-color: #495057 !important;
  box-shadow: 0 -6px 12px rgba(0, 0, 0, 0.3) !important;
}

[data-bs-theme="dark"] .selectize-control.plugin-auto_position .selectize-input.selectize-position-top.dropdown-active {
  border-top-color: #495057 !important;
}

/* Optgroup columns dark mode */
[data-bs-theme="dark"] .selectize-dropdown.plugin-optgroup_columns .optgroup {
  border-right-color: #495057 !important;
}
