/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* TomSelect / Combobox custom styles for DaisyUI integration */

/* Wrapper needs solid background */
.ts-wrapper {
  background-color: white;
  border-radius: 0.5rem;
}

.ts-wrapper.multi .ts-control {
  background-color: white;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  min-height: 3rem;
  padding: 0.5rem;
  gap: 0.25rem;
}

.ts-wrapper.multi .ts-control:focus-within {
  border-color: #6366f1;
  outline: 2px solid rgba(99, 102, 241, 0.2);
  outline-offset: 2px;
}

.ts-wrapper .ts-control > input {
  color: #1f2937;
}

.ts-wrapper .ts-control > input::placeholder {
  color: #9ca3af;
}

/* Dropdown - must have solid background and high z-index */
.ts-dropdown {
  background-color: white !important;
  border: 1px solid #d1d5db !important;
  border-radius: 0.5rem !important;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1) !important;
  margin-top: 0.25rem;
  z-index: 9999 !important;
}

.ts-dropdown .ts-dropdown-content {
  max-height: 15rem;
  overflow-y: auto;
  padding: 0.25rem 0;
  background-color: white !important;
}

.ts-dropdown .option {
  padding: 0.5rem 0.75rem;
  color: #1f2937;
  background-color: white !important;
  cursor: pointer;
}

.ts-dropdown .option:hover,
.ts-dropdown .option.active {
  background-color: #f3f4f6 !important;
}

.ts-dropdown .option.selected {
  background-color: #eef2ff !important;
}

/* Selected items (badges) */
.ts-wrapper.multi .ts-control > .item {
  background-color: #6366f1;
  color: white;
  border-radius: 1rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.875rem;
  margin: 0;
}

.ts-wrapper.multi .ts-control > .item .remove {
  border-left: none;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 0.25rem;
}

.ts-wrapper.multi .ts-control > .item .remove:hover {
  color: white;
}

/* Checkbox options plugin styling */
.ts-dropdown .option input[type="checkbox"] {
  margin-right: 0.5rem;
}

/* Phosphor Icons - make icons respect w-* h-* Tailwind classes */
[class*="ph-"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Map Tailwind width classes to font-size for icon scaling */
.ph.w-3, .ph-bold.w-3 { font-size: 0.75rem; }   /* 12px */
.ph.w-4, .ph-bold.w-4 { font-size: 1rem; }      /* 16px */
.ph.w-5, .ph-bold.w-5 { font-size: 1.25rem; }   /* 20px */
.ph.w-6, .ph-bold.w-6 { font-size: 1.5rem; }    /* 24px */
.ph.w-8, .ph-bold.w-8 { font-size: 2rem; }      /* 32px */
.ph.w-12, .ph-bold.w-12 { font-size: 3rem; }    /* 48px */
