/* Salient-inspired light theme with modern gradients */

/* Form Elements */
.form-input {
  @apply block w-full px-4 py-3 bg-white border border-gray-300 rounded-lg text-gray-900 placeholder-gray-400 focus:ring-2 focus:ring-cyan-500 focus:border-transparent transition shadow-sm;
}

.form-label {
  @apply block text-sm font-bold text-gray-700 mb-2;
}

.form-select {
  @apply block w-full px-4 py-3 bg-white border border-gray-300 rounded-lg text-gray-900 focus:ring-2 focus:ring-cyan-500 focus:border-transparent transition shadow-sm;
}

.form-textarea {
  @apply block w-full px-4 py-3 bg-white border border-gray-300 rounded-lg text-gray-900 placeholder-gray-400 focus:ring-2 focus:ring-cyan-500 focus:border-transparent transition shadow-sm;
}

/* Cards */
.card {
  @apply bg-white border border-gray-200 rounded-xl shadow-sm;
}

.card-header {
  @apply text-xl font-bold text-gray-900;
}

/* Buttons */
.btn-primary {
  @apply px-6 py-3 bg-gradient-to-r from-cyan-600 to-blue-600 text-white font-bold rounded-lg hover:from-cyan-500 hover:to-blue-500 transition cursor-pointer shadow-lg shadow-cyan-500/30;
}

.btn-secondary {
  @apply px-6 py-3 bg-gray-100 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-200 transition font-semibold;
}

.btn-danger {
  @apply px-6 py-3 bg-red-50 border border-red-200 text-red-700 rounded-lg hover:bg-red-100 transition font-semibold;
}

/* Utility Classes for consistent spacing */
.section-spacing {
  @apply space-y-6;
}

/* Tom Select copies the original select's classes onto .ts-wrapper, so the
   wrapper carries border, padding, radius and font size exactly like a native
   select next to it. The control is reduced to a transparent text row, and
   the chevron sits where the native select draws it (right 0.75rem). The
   library ships 13px and a Selectize-style panel, so those rules are
   restated here. */
.ts-wrapper {
  display: inline-flex;
  vertical-align: middle;
  min-width: 0;
  min-height: 0;
}
.ts-dropdown.single {
  min-width: max-content;
}
:is(.ts-wrapper, body) .ts-dropdown .optgroup-header {
  padding: 0.375rem 0.75rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgb(107 114 128);
  background: transparent;
}
:where(.ts-wrapper.single) {
  background-color: #fff;
}
.ts-wrapper .ts-control,
.ts-wrapper .ts-control input,
.ts-wrapper .ts-control .item,
:is(.ts-wrapper, body) .ts-dropdown,
:is(.ts-wrapper, body) .ts-dropdown .option,
:is(.ts-wrapper, body) .ts-dropdown .no-results {
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  color: rgb(17 24 39);
}
.ts-wrapper .ts-control input::placeholder {
  color: rgb(156 163 175);
  opacity: 1;
}
.ts-wrapper.single .ts-control,
.ts-wrapper.single.input-active .ts-control {
  --ts-pr-min: 0px;
  --ts-pr-clear-button: 0px;
  --ts-pr-caret: 1.75rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  min-height: 1lh;
  flex-wrap: nowrap;
}
.ts-wrapper .ts-control:focus,
.ts-wrapper .ts-control:focus-visible {
  outline: none;
}
.ts-wrapper.single .ts-control .item {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ts-wrapper.single.focus {
  border-color: rgb(59 130 246);
  box-shadow: 0 0 0 1px rgb(59 130 246);
  outline: none;
}
.ts-wrapper.single .ts-control::after {
  content: none;
}
.ts-wrapper.single::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.75rem;
  width: 1.25rem;
  height: 1.25rem;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
  background: center / 1.25rem 1.25rem no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%239ca3af' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}
.ts-wrapper.single.dropdown-active::after {
  transform: translateY(-50%) rotate(180deg);
}
.ts-dropdown.single {
  margin-top: 0.25rem;
  border: 1px solid rgb(229 231 235);
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  z-index: 40;
  overflow: hidden;
}
body > .ts-dropdown.single {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.ts-dropdown-content {
  max-height: 16rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}
:is(.ts-wrapper, body) .ts-dropdown .option,
:is(.ts-wrapper, body) .ts-dropdown .no-results {
  padding: 0.375rem 0.75rem;
}
:is(.ts-wrapper, body) .ts-dropdown .no-results {
  color: rgb(107 114 128);
  font-size: 0.875rem;
}
:is(.ts-wrapper, body) .ts-dropdown .highlight {
  background: transparent;
  font-weight: 600;
  border-radius: 0;
}
:is(.ts-wrapper, body) .ts-dropdown .option.active {
  background-color: rgb(37 99 235);
  color: #fff;
}
:is(.ts-wrapper, body) .ts-dropdown .option.active .highlight {
  color: inherit;
  background: transparent;
}

/* Charge rows stay collapsed or filtered without the two states fighting. */
[data-filtered="true"] {
  display: none !important;
}
