/*
 * This is a manifest file that'll be compiled into application.css.
 * ...
 */

/* Tom Select Tailwind Overrides */
.ts-wrapper {
  border: none !important;
  padding: 0 !important;
}

.ts-control {
  border: 1px solid #d1d5db !important; /* gray-300 */
  border-radius: 0.375rem !important; /* rounded-md */
  padding: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  min-height: 2.25rem !important; /* Matches py-2 + text-sm */
  background-color: #ffffff !important;
}

.ts-control input {
  padding: 0.5rem 0.75rem !important; /* py-2 px-3 */
  font-size: 0.875rem !important;
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.ts-wrapper.focus .ts-control {
  border-color: #3b82f6 !important; /* blue-500 */
  box-shadow: 0 0 0 1px #3b82f6 !important; /* Minimal focus ring */
}

.ts-dropdown {
  border-radius: 0.375rem !important;
  margin-top: 0.25rem !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid #e5e7eb !important; /* gray-200 */
}

.ts-dropdown .active {
  background-color: #f3f4f6 !important; /* gray-100 */
  color: inherit !important;
}

.ts-control .item {
  margin: 0 !important;
  padding: 0.5rem 0.75rem !important;
  background: transparent !important;
  border-radius: 0 !important;
  font-size: 0.875rem !important;
  border: none !important;
  color: #111827 !important; /* gray-900 */
  line-height: 1.25rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

/* Position the remove button on the right */
.ts-control .item .remove {
  margin-left: auto !important;
  border-left: none !important;
  padding: 0 !important;
  font-size: 1.125rem !important; /* Slightly smaller for better alignment */
  line-height: 1 !important;
  color: #9ca3af !important; /* gray-400 */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  height: 20px !important;
  text-decoration: none !important;
}

.ts-control .item .remove:hover {
  color: #ef4444 !important; /* red-500 */
  background: transparent !important;
}

/* Completely hide the input when an item is selected */
.ts-wrapper.has-items .ts-control > input {
  display: none !important;
}

/* Ensure the control looks like a static field when it has an item */
.ts-wrapper.has-items .ts-control {
  cursor: default !important;
}
