.select-search-wrapper {
  /*position: relative;
  width: 65%;
  max-width: 400px;
  font-family: Arial, sans-serif;
  font-size: 1.3rem;
  line-height: 1.3rem;
  color: #333;
  */
  float: left;
  width: 68%;
  margin: 0px 0px 5px -5px !important;
  padding: 10px 0 10px 5px !important;
  box-sizing: border-box;
}

.select-search-input {
  /*width: 65%;*/
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1.3rem;
  font-family: Arial, sans-serif;
  line-height: 1.3rem;
  color: #333;
  box-sizing: border-box;
  -webkit-appearance: none; /* Prevents iOS styling */
  appearance: none;
}

.custom-dropdown {
  position: absolute;
  top: 100%;
  /*left: 0;
  right: 0;*/
  float: right;
  width: 69%; /*added*/
  background: white;
  background: #eee;
  border: 1px solid #ddd;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-top: 2px;
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-family: Arial, sans-serif;
  font-size: 1.3rem;
  line-height: 1.3rem;
}

.dropdown-item {
  padding: 8px 12px; /* Reduced padding */
  cursor: pointer;
  min-height: 32px; /* Reduced minimum height */
  border-bottom: 1px solid #eee;
  font-family: Arial, sans-serif;
  font-size: 1.3rem;
  line-height: 1.3rem;
  color: #333;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dropdown-item .main-text {
  margin-bottom: 2px; /* Reduced margin */
  font-family: Arial, sans-serif;
  font-size: 1.3rem;
  line-height: 1.3rem;
}

.dropdown-item .alternative-match {
  font-size: 1.1rem;
  color: #666;
  font-style: italic;
  font-family: Arial, sans-serif;
  line-height: 1.3rem;
  margin-top: 2px; /* Reduced margin */
}

.dropdown-item mark {
  background-color: #fff3cd;
  padding: 1px 2px;
  border-radius: 2px;
  font-family: Arial, sans-serif;
  font-size: 1.3rem;
  line-height: 1.3rem;
  color: #333;
}

.dropdown-item:hover,
.dropdown-item.active {
  background-color: #f5f5f5;
}

/* Mobile improvements */
@media (max-width: 768px) {
  .select-search-wrapper {
      width: 90%;
      max-width: 400px;
  }
  
  .dropdown-item {
      padding: 8px 12px; /* Consistent padding on mobile */
      min-height: 32px; /* Consistent height on mobile */
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
  }
  
  .custom-dropdown {
      border: 1px solid #ddd; /* Thinner border */
      -webkit-transform: translateZ(0); /* Prevents Safari scaling */
      transform: translateZ(0);
  }
  
  .dropdown-item .alternative-match {
      margin-top: 2px;
      font-size: 1.1rem;
  }
}

/* iOS specific */
@supports (-webkit-touch-callout: none) {
  .select-search-input,
  .dropdown-item,
  .custom-dropdown {
      /* Prevents iOS text size adjustment and zoom */
      -webkit-text-size-adjust: 100%;
      text-size-adjust: none;
  }
  
  .dropdown-item {
      /* Prevents expansion on touch */
      transform: translateZ(0);
      -webkit-transform: translateZ(0);
  }
  
  .custom-dropdown {
      /* Smooth scrolling while preventing expansion */
      -webkit-overflow-scrolling: touch;
      transform: translateZ(0);
      -webkit-transform: translateZ(0);
  }
}

/* Ensure proper font sizing for select element */
#search {
  font-family: Arial, sans-serif;
  font-size: 1.3rem;
  line-height: 1.3rem;
  color: #333;
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none; /* Prevents iOS styling */
  appearance: none;
}

/* Base HTML font size */
html {
  font-size: 62.5%; /* Makes 1rem = 10px */
  -webkit-text-size-adjust: 100%; /* Prevents iOS font scaling */
}
