/* Custom Select2 overrides to match hero search styling */

/* Base single-selection box */
.select2-container--default .select2-selection--single {
  height: 56px; /* equal to py-4 input */
  border: none !important;
  padding-left: 48px; /* room for location icon */
  display: flex;
  align-items: center;
  font-size: 1rem; /* tailwind text-base */
  color: #111827; /* gray-900 */
  background-color: transparent;
}

/* Multi-select styling */
.select2-container--default .select2-selection--multiple {
  min-height: 32px;
  max-height: 80px;
  border: 1px solid #d1d5db !important;
  border-radius: 0.375rem;
  background-color: #ffffff;
  padding: 4px 6px;
  transition: all 0.2s ease-in-out;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  overflow-y: auto;
}

.select2-container--default .select2-selection--multiple:focus-within {
  border-color: #f97316 !important;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Multi-select choice tags */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
  border: 1px solid #ea580c;
  border-radius: 0.25rem;
  padding: 3px 8px;
  margin: 1px 2px 1px 0;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(249, 115, 22, 0.2);
  transition: all 0.2s ease-in-out;
  white-space: nowrap;
  flex-shrink: 0;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(249, 115, 22, 0.3);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: white !important;
  font-weight: bold;
  margin-right: 1px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  padding: 1px 2px;
  font-size: 0.75rem;
  line-height: 1;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-in-out;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  color: white !important;
  transform: scale(1.1);
}

/* Multi-select placeholder */
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
  color: #9ca3af;
  line-height: 28px;
  padding-left: 4px;
}

/* Remove focus outline so we can rely on shadow/outline from parent if needed */
.select2-container--default .select2-selection--single:focus {
  outline: none;
  box-shadow: none;
}

/* Rendered value */
.select2-container--default .select2-selection__rendered {
  line-height: 16px !important;
  padding-left: 0 !important; /* already padded parent */
}

/* Placeholder color */
.select2-container--default .select2-selection__placeholder {
  color: #9ca3af; /* gray-400 */
}

/* Dropdown arrow positioning */
.select2-container--default .select2-selection__arrow {
  height: 100% !important;
  right: 12px !important;
}

/* Dropdown panel */
.select2-container--default .select2-dropdown {
  border: 1px solid #d1d5db; /* gray-300 */
  border-radius: 0 0 0.375rem 0.375rem;
  font-size: 0.95rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Highlighted option */
.select2-container--default .select2-results__option--highlighted {
  background-color: #f97316;
  color: #fff;
}

/* Selected option in dropdown */
.select2-container--default .select2-results__option[aria-selected=true] {
  background-color: #fed7aa;
  color: #ea580c;
}

/* Service Coverage & Licensing section enhancements */
.service-coverage-section {
  position: relative;
}

.service-coverage-section .section-header {
  margin-bottom: 1.5rem;
}

.service-coverage-section .field-group {
  position: relative;
}

/* Enhanced field labels */
.service-coverage-section label {
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
  display: block;
  font-size: 0.875rem;
}

/* Helper text styling */
.service-coverage-section .helper-text {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* Selection change animation */
.service-coverage-section .field-group.selection-changed {
  animation: selectionPulse 0.3s ease-in-out;
}

@keyframes selectionPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Enhanced dropdown styling */
.select2-container--default .select2-results__option {
  padding: 8px 12px;
  transition: background-color 0.2s ease;
}

.select2-container--default .select2-results__option:hover {
  background-color: #fef3c7;
}

/* Custom scrollbar for dropdown */
.select2-results__options::-webkit-scrollbar {
  width: 6px;
}

.select2-results__options::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.select2-results__options::-webkit-scrollbar-thumb {
  background: #f97316;
  border-radius: 3px;
}

.select2-results__options::-webkit-scrollbar-thumb:hover {
  background: #ea580c;
} 

.select2-container .select2-search--inline .select2-search__field {
  height: 26px;
}