/* Consortium partner inline-create modal — mirrors .expert-modal (a centered
   native <dialog> opened via showModal()), plus the attach-rows layout used on
   the project edit form. */
.cp-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(32rem, 92vw);
  max-height: 90vh;
  overflow: auto;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border-input);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}
.cp-modal::backdrop { background: rgba(0, 0, 0, 0.35); }

.cp-modal-header { margin-bottom: 1rem; }
.cp-modal-header h3 { margin: 0 0 0.15rem; }
.cp-modal-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gray-mid);
}

.cp-modal-error {
  margin: 0 0 0.75rem;
  color: var(--danger);
  font-size: 0.85rem;
}

.cp-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

/* Attached-partner rows on the project edit form: the partner <select> grows
   and the remove control sits beside it, rather than being pushed to the page
   edge by a grid. */
.cp-row {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  max-width: 42rem;
  margin-bottom: 0.75rem;
}
.cp-row .form-field { flex: 1 1 auto; }
.cp-row-action {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.4rem; /* line the controls up with the select, not its label */
}

/* "Add partner" gets a little breathing room from the rows and the lead select. */
.cp-add-partner { margin: 0.25rem 0 0; }

/* The contract-lead select reads as one field, not a full-width bar. */
.cp-lead-field {
  margin-top: 1.5rem;
  max-width: 28rem;
}
