/*
 * 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.
 */

/* Tom Select Custom Styling */
.ts-wrapper {
  width: 100% !important;
}

.ts-control {
  border: 1px solid #d1d5db !important;
  border-radius: 0.375rem !important;
  padding: 0.5rem !important;
  min-height: 2.75rem !important;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
  transition: all 0.2s ease !important;
}

.ts-control:focus,
.ts-wrapper.focus .ts-control {
  border-color: #2563eb !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

.ts-control .item {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 0.375rem !important;
  padding: 0.375rem 0.75rem !important;
  margin: 0.125rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.375rem !important;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1) !important;
  transition: all 0.2s ease !important;
}

.ts-control .item:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1) !important;
}

.ts-control .item .remove {
  color: white !important;
  opacity: 0.8 !important;
  border: none !important;
  padding: 0 !important;
  margin-left: 0.25rem !important;
  font-size: 1.125rem !important;
  line-height: 1 !important;
  transition: opacity 0.2s ease !important;
}

.ts-control .item .remove:hover {
  opacity: 1 !important;
  background: transparent !important;
}

.ts-dropdown {
  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 !important;
  animation: slideDown 0.2s ease !important;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ts-dropdown-content {
  max-height: 300px !important;
}

.ts-dropdown .option {
  padding: 0.625rem 0.75rem !important;
  font-size: 0.875rem !important;
  transition: all 0.15s ease !important;
  cursor: pointer !important;
}

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

.ts-dropdown .option.selected {
  background: #dbeafe !important;
  color: #1e40af !important;
  font-weight: 500 !important;
}

.ts-dropdown .optgroup-header {
  background: #f9fafb !important;
  color: #6b7280 !important;
  font-weight: 600 !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 0.5rem 0.75rem !important;
}

.ts-wrapper.single .ts-control {
  background: white !important;
}

/* Placeholder styling */
.ts-control input::placeholder {
  color: #9ca3af !important;
}

/* Color-coded chips for different select types */
#task_organisation_ids + .ts-wrapper .ts-control .item {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

#task_organisation_ids + .ts-wrapper .ts-control .item:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
}

#task_discipline_ids + .ts-wrapper .ts-control .item {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

#task_discipline_ids + .ts-wrapper .ts-control .item:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
}

#task_location_ids + .ts-wrapper .ts-control .item {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
}

#task_location_ids + .ts-wrapper .ts-control .item:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
}

/* Flowbite Datepicker Custom Styling */
.datepicker {
  font-family: 'Poppins', sans-serif !important;
}

.datepicker-picker {
  background: white !important;
  border: 1px solid #d1d5db !important;
  border-radius: 0.5rem !important;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1) !important;
}

.datepicker-header {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  border-radius: 0.5rem 0.5rem 0 0 !important;
  padding: 1rem !important;
}

.datepicker-controls .button {
  color: white !important;
  font-weight: 600 !important;
}

.datepicker-controls .button:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 0.375rem !important;
}

.datepicker-view .days-of-week {
  background: #f9fafb !important;
  border-bottom: 1px solid #e5e7eb !important;
}

.datepicker-view .dow {
  color: #111827 !important;
  font-weight: 700 !important;
  opacity: 1 !important;
}

.datepicker-cell {
  border-radius: 0.375rem !important;
  transition: all 0.2s ease !important;
}

.datepicker-cell:not(.disabled):hover {
  background: #dbeafe !important;
  color: #1e40af !important;
}

.datepicker-cell.selected,
.datepicker-cell.selected:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: white !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 4px 0 rgb(0 0 0 / 0.2) !important;
}

.datepicker-cell.today {
  background: #eff6ff !important;
  color: #1e40af !important;
  font-weight: 700 !important;
}

.datepicker-cell.today:not(.selected):hover {
  background: #dbeafe !important;
}

.datepicker-cell.disabled {
  color: #d1d5db !important;
}

.datepicker-cell.prev,
.datepicker-cell.next {
  color: #9ca3af !important;
}

.datepicker-footer {
  background: #f9fafb !important;
  border-top: 1px solid #e5e7eb !important;
  padding: 0.75rem !important;
}

.datepicker-footer .button {
  background: #3b82f6 !important;
  color: white !important;
  padding: 0.5rem 1rem !important;
  border-radius: 0.375rem !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}

.datepicker-footer .button:hover {
  background: #2563eb !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1) !important;
}
