/* Custom SlimSelect styles to match Tailwind form inputs exactly */
/* Ultra-high specificity to override all form classes */

/* Main container - force override ALL conflicting form styles */
.ss-main.ss-main.ss-main {
  /* Force override all form styling with maximum specificity */
  appearance: none !important;
  border-width: 1px !important;
  border-style: solid !important;
  /*border-color: #111827 !important;  border-gray-900 to match forms */
  border-color: rgb(209 213 219 / var(--tw-border-opacity));
  border-radius: 0.5rem !important; /* rounded (override rounded-lg) */
  width: 100% !important;
  min-height: 41px !important; /* Match form input height */
  padding: 0.5rem 0.75rem !important; /* py-2 px-3 */
  background-color: #ffffff !important; /* bg-white */
  color: #111827 !important; /* text-gray-900 */
  line-height: 1.5 !important; /* leading-6 */
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important; /* shadow */
  transition-property: border-color !important;
  transition-timing-function: ease-in-out !important;
  transition-duration: 0.2s !important;
  /* Force override any ring styles */
  --tw-ring-offset-shadow: 0 0 #0000 !important;
  --tw-ring-shadow: 0 0 #0000 !important;
  --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
  --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px 0 var(--tw-shadow-color) !important;
}

/* Focus states - match the form input focus styles exactly with highest specificity */
.ss-main.ss-main.ss-main.ss-focused,
.ss-main.ss-main.ss-main:focus-within,
.ss-main.ss-main.ss-main:focus {
  outline: none !important;
  outline-offset: 0 !important;
  border-color: #3b82f6 !important; /* focus:border-blue-500 */
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important; /* keep shadow, no ring */
  /* Force disable any ring effects */
  --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/) !important;
  --tw-ring-offset-width: 0px !important;
  --tw-ring-offset-color: #fff !important;
  --tw-ring-color: rgb(59 130 246 / 0) !important;
  --tw-ring-offset-shadow: 0 0 #0000 !important;
  --tw-ring-shadow: 0 0 #0000 !important;
}

/* Remove the internal single-selected styling since we're styling the container */
.ss-main .ss-single-selected {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  font-size: inherit !important;
  color: inherit !important;
  outline: none !important;
}

/* Dropdown content - enhanced shadow and positioning */
.ss-main .ss-content {
  border: 1px solid #d1d5db; /* border-gray-300 */
  border-radius: 0.375rem; /* rounded-md */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
  background-color: #ffffff;
  z-index: 50;
  margin-top: 0.25rem; /* mt-1 */
}

/* Options styling - consistent with dropdown interactions */
.ss-content .ss-list .ss-option {
  padding: 0.5rem 0.75rem; /* py-2 px-3 */
  font-size: 0.875rem; /* text-sm */
  color: #374151; /* text-gray-700 */
  cursor: pointer;
  transition-property: color, background-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.ss-content .ss-list .ss-option:hover,
.ss-content .ss-list .ss-option.ss-highlighted {
  background-color: #3b82f6; /* bg-blue-500 */
  color: #ffffff; /* text-white */
}

.ss-content .ss-list .ss-option.ss-disabled {
  color: #9ca3af; /* text-gray-400 */
  cursor: not-allowed;
  background-color: transparent;
}

.ss-content .ss-list .ss-option.ss-disabled:hover {
  background-color: transparent;
  color: #9ca3af;
}

/* Search input - exact match to form input styling */
.ss-content .ss-search {
  padding: 0.5rem; /* p-2 */
}

.ss-content .ss-search input {
  width: 100%;
  border-width: 1px;
  border-color: #d1d5db; /* border-gray-300 */
  border-radius: 0.375rem; /* rounded-md */
  padding: 0.5rem 0.75rem; /* py-2 px-3 */
  font-size: 0.875rem; /* text-sm */
  line-height: 1.25rem;
  color: #111827; /* text-gray-900 */
  background-color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
  margin: 0;
}

.ss-content .ss-search input:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-color: #3b82f6; /* focus:border-blue-500 */
  box-shadow: 0 0 0 1px #3b82f6, 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* focus:ring-blue-500 + shadow-sm */
}

.ss-content .ss-search input::placeholder {
  color: #9ca3af; /* placeholder-gray-400 */
}

/* Arrow styling - consistent with form selects */
.ss-main .ss-arrow {
  border-color: #6b7280 transparent transparent transparent; /* text-gray-500 */
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.ss-main.ss-open-above .ss-arrow {
  border-color: transparent transparent #6b7280 transparent;
}

.ss-main:hover .ss-arrow {
  border-top-color: #374151; /* hover:text-gray-700 */
}

.ss-main.ss-focused .ss-arrow,
.ss-main .ss-single-selected:focus + .ss-arrow {
  border-top-color: #3b82f6; /* focus:text-blue-500 */
}

/* Placeholder text - matches form placeholder styling */
.ss-main .ss-values .ss-placeholder {
  color: #9ca3af; /* placeholder-gray-400 */
  font-size: 0.875rem; /* text-sm */
}

/* Multi-select values (pills/badges) - consistent with theme */
.ss-main .ss-values .ss-value {
  background-color: #dbeafe; /* bg-blue-50 */
  border: 1px solid #93c5fd; /* border-blue-200 */
  border-radius: 0.375rem; /* rounded-md */
  padding: 0.125rem 0.5rem; /* py-0.5 px-2 */
  margin: 0.125rem; /* m-0.5 */
  font-size: 0.75rem; /* text-xs */
  font-weight: 500; /* font-medium */
  color: #1d4ed8; /* text-blue-700 */
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 1rem);
}

.ss-main .ss-values .ss-value .ss-value-text {
  color: #1d4ed8; /* text-blue-700 */
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.ss-main .ss-values .ss-value .ss-value-delete {
  margin-left: 0.25rem; /* ml-1 */
  color: #6b7280; /* text-gray-500 */
  font-weight: 600;
  cursor: pointer;
  transition-property: color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.ss-main .ss-values .ss-value .ss-value-delete:hover {
  color: #dc2626; /* hover:text-red-600 */
}

/* Disabled state */
.ss-main.ss-disabled .ss-single-selected {
  background-color: #f9fafb; /* bg-gray-50 */
  color: #6b7280; /* text-gray-500 */
  cursor: not-allowed;
}

.ss-main.ss-disabled .ss-arrow {
  border-top-color: #9ca3af; /* text-gray-400 */
}
