/* Mobile select element fixes */
/* This is a comprehensive fix for select dropdowns on mobile */

/* Global reset for all select elements */
select {
  display: inline-block !important;
  position: relative !important;
  width: 100% !important;
  min-width: 100% !important;
  min-height: 44px !important; /* Minimum touch target size */
  padding: 0.75rem !important;
  font-size: 16px !important; /* Prevents iOS zoom on focus */
  line-height: 1.25 !important;
  color: #333 !important;
  vertical-align: middle !important;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 16px 12px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 0.375rem !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  z-index: 20 !important;
}

/* Profile page specific fixes */
.profile-form select,
div.my-5 select {
  max-width: 100% !important;
  transform: none !important;
  min-width: 100% !important;
  font-size: 16px !important;
  text-indent: 1px !important;
  text-overflow: ellipsis !important;
  box-sizing: border-box !important;
}

/* Make sure the dropdown options appear properly */
select option {
  font-size: 16px !important;
  padding: 8px !important;
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
  select {
    font-size: 16px !important; /* Prevent zoom on iOS */
    text-indent: 1px;
    text-overflow: ellipsis;
    box-sizing: border-box;
  }
}

/* Fix for Android */
@supports not (-webkit-touch-callout: none) {
  select {
    padding-right: 25px !important;
  }
}

/* Reset z-index for all form elements */
input, select, textarea, button, .form-input, .form-control, [class*="shadow"] {
  z-index: auto !important;
}

/* Ensure dropdowns always appear above other elements */
[data-dropdown-target="menu"] {
  z-index: 9999 !important;
}
