/* ================================
   Company Search Dropdown Styles
   ================================ */

/* Wrapper should be relative to position dropdown */
.billing-field-wrapper {
  position: relative;
  width: 100%;
}

/* Dropdown container */
.company-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 2px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  width: 100%; /* 👈 Always match billing field width */
  box-sizing: border-box;
}

/* Individual company item */
.company-item {
  display: flex;
  justify-content: space-between; /* left: text, right: tick */
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.company-item:hover {
  background: #f5f5f5;
}

/* Company name & registration block */
.company-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.company-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-reg {
  font-size: 12px;
  color: #777;
  white-space: nowrap;
}

/* Tick icon */
.company-tick {
  color: green;
  margin-left: 10px;
  flex-shrink: 0;
  font-size: 14px;
}

/* ================================
   Preloader Spinner
   ================================ */

.company-preloader {
  display: none; /* hidden by default */
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-top: 2px solid #0073aa;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 1100;
}

@keyframes spin {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}

.field-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.validation-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  display: none;
}

.validation-icon.valid {
  color: green;
  display: inline;
}

.validation-icon.invalid {
  color: red;
  display: inline;
}

.field-preloader {
  display: none;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-top: 2px solid #0073aa;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 1100;
}

@keyframes spin {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}




