/* Featuron Customer & Equipment Autosuggest Styles */

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

.autosuggest-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 2100;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  max-height: 280px;
  overflow-y: auto;
  margin-top: 2px;
  padding: 4px 0;
}

.autosuggest-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.1s ease;
}

.autosuggest-item:last-child {
  border-bottom: none;
}

.autosuggest-item:hover,
.autosuggest-item.active {
  background: #f0fdf4;
}

.autosuggest-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.autosuggest-name {
  font-weight: 700;
  font-size: 13px;
  color: #047A3D;
}

.autosuggest-name mark {
  background: #bbf7d0;
  color: #047A3D;
  padding: 0 1px;
  border-radius: 2px;
  font-weight: 800;
}

.autosuggest-sub {
  font-size: 11px;
  color: #64748b;
  display: flex;
  gap: 8px;
}

.autosuggest-sub b {
  color: #334155;
}

.autosuggest-badge {
  font-family: 'Barlow', Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
  padding: 2px 7px;
  border-radius: 12px;
  white-space: nowrap;
}

.autosuggest-badge.has-inst {
  background: #dcfce7;
  color: #15803d;
}

.autosuggest-empty {
  padding: 12px;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  font-style: italic;
}

/* Equipment Autosuggest Hint Pill */
.inst-suggest-hint {
  font-size: 10.5px;
  color: #047A3D;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Instrument Autosuggest Dropdown Items */
.inst-autosuggest-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background 0.1s ease;
}

.inst-autosuggest-item:last-child {
  border-bottom: none;
}

.inst-autosuggest-item:hover,
.inst-autosuggest-item.active {
  background: #f0fdf4;
}

.inst-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.inst-item-name {
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
}

.inst-key-icon {
  font-size: 13px;
  vertical-align: middle;
  margin-right: 2px;
}

.inst-item-name mark {
  background: #bbf7d0;
  color: #047A3D;
  padding: 0 1px;
  border-radius: 2px;
  font-weight: 800;
}

.inst-item-badge {
  font-size: 11px;
  font-weight: 600;
  background: #e2e8f0;
  color: #334155;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.inst-item-sub {
  font-size: 11px;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.inst-item-sub b {
  color: #1e293b;
}

.inst-sync-notice {
  font-size: 11px;
  color: #047A3D;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 4px 10px;
  border-radius: 6px;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  animation: fadeInNotice 0.3s ease;
}

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

/* Flash highlight when field is autofetched */
.field-flash-success {
  animation: flashSuccess 1.5s ease-out;
}

@keyframes flashSuccess {
  0% {
    background-color: #bbf7d0 !important;
    outline: 2px solid #22c55e;
  }
  100% {
    background-color: inherit;
    outline: none;
  }
}

