/* GI #292 — Fleet equipment picker (assignment + Create New). */

.eq-picker {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.eq-picker-label {
  font-weight: 600;
  color: var(--color-text, #161a1f);
}

.eq-picker-control {
  position: relative;
}

.eq-picker-input {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid var(--color-border, #d8dde3);
  border-radius: 10px;
  background: #fff;
  color: var(--color-text, #161a1f);
  padding: 0.55rem 0.75rem;
  font: inherit;
}

.eq-picker-input:focus {
  outline: 2px solid rgba(200, 16, 46, 0.28);
  border-color: var(--color-brand-red, #c8102e);
}

.eq-picker-panel {
  position: absolute;
  z-index: 60;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid var(--color-border, #d8dde3);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(22, 26, 31, 0.12);
  max-height: min(320px, 55vh);
  overflow: auto;
  padding: 0.35rem;
}

.eq-picker-item,
.eq-picker-create {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 44px;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  color: var(--color-text, #161a1f);
  cursor: pointer;
}

.eq-picker-item:hover,
.eq-picker-item:focus,
.eq-picker-item.is-active {
  background: #f4f6f8;
  outline: none;
}

.eq-picker-item-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.eq-picker-unit {
  font-weight: 700;
}

.eq-picker-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted, #66707a);
}

.eq-picker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

.eq-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  background: #eef1f4;
  color: #3d4550;
}

.eq-chip--ok {
  background: #e4f4ea;
  color: #1f6b4a;
}

.eq-chip--warn {
  background: #fff3d6;
  color: #8a5a00;
}

.eq-chip--danger {
  background: #fde8ec;
  color: #c8102e;
}

.eq-picker-empty {
  padding: 0.7rem 0.75rem;
  font-size: 0.85rem;
  color: var(--color-text-muted, #66707a);
}

.eq-picker-create {
  color: var(--color-brand-red, #c8102e);
  font-weight: 700;
  border-top: 1px solid var(--color-border, #d8dde3);
  margin-top: 0.25rem;
  border-radius: 0 0 8px 8px;
}

.eq-picker-create:hover,
.eq-picker-create:focus {
  background: #fde8ec;
  outline: none;
}

.eq-picker-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--color-text-muted, #66707a);
}

.eq-picker-selected {
  font-size: 0.8rem;
  color: var(--color-text-muted, #66707a);
}

.eq-create-drawer {
  margin-top: 0.45rem;
  padding: 0.75rem;
  border: 1px solid var(--color-border, #d8dde3);
  border-radius: 12px;
  background: #fff;
  display: grid;
  gap: 0.55rem;
}

.eq-create-drawer h5 {
  margin: 0;
  font-size: 0.95rem;
}

.eq-create-drawer label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.eq-create-drawer input,
.eq-create-drawer select {
  min-height: 44px;
  border: 1px solid var(--color-border, #d8dde3);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-weight: 500;
}

.eq-create-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.eq-create-actions .btn,
.eq-create-submit {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.eq-create-submit {
  background: var(--color-brand-red, #c8102e);
  color: #fff;
}

.eq-create-cancel {
  background: #eef1f4;
  color: #161a1f;
}

.eq-create-error {
  margin: 0;
  color: #c8102e;
  font-size: 0.82rem;
}

.eq-lifecycle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.eq-lifecycle-panel {
  margin-top: 0.65rem;
  padding: 0.85rem;
  border: 1px solid var(--color-border, #d8dde3);
  border-radius: 12px;
  background: #fff;
  max-width: 28rem;
}

.eq-lifecycle-panel label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 600;
}

.eq-lifecycle-panel input {
  min-height: 44px;
  border: 1px solid var(--color-border, #d8dde3);
  border-radius: 10px;
  padding: 0.4rem 0.7rem;
  font: inherit;
}

.eq-lifecycle-reasons {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--color-text-muted, #66707a);
}

@media (max-width: 430px) {
  .eq-picker-panel {
    max-height: min(280px, 50vh);
  }
  .eq-picker-chips {
    justify-content: flex-start;
  }
  .eq-picker-item {
    flex-direction: column;
  }
}
